FORUMS

XDA Picks: Best Apps of the Week (June 27 – July 4)

Apps are at the front and center of any smartphone experience, and with over a … more

HTC One M9 Developer Edition Android 5.1 OTA

The Developer Edition of the HTC One M9 is receiving an over-the-air update to Android 5.1. … more

Index Project For XDA Device Subforums

Another ambitious project from the collaborative efforts of Recognized Contributors and Forum … more

The Atlas of XDA

A few weeks ago, we asked you “How Does Your Location Affect Your Life As A Power User?”. In the days that … more

[GUIDE][MOD][SYSTEMUI] How to add 0.00KB/s meter on statusbar GB/ICS/JB/KK 10-08-2013

1,496 posts
Thanks Meter: 4,242
 
By Dzol Cp, Recognized Contributor / Themer on 19th April 2013, 04:41 PM
Post Reply Subscribe to Thread Email Thread
UPDATE NEW SMALI FILES AND LINES ON 2ND POST *TEST AND WORK ON FROYO ROM, GB ROM & MTK DEVICE (WORK ON KITKAT)

I just wanna share how to add speed meter (0.00k/s) data on statusbar simple and fastway

1.Basic knowledge how to compile/decompile using Apktool/Apkmanager/
Tickle My Android(I try it and so easy) Credits to Ticklefish
2.Brain and brave

Method :

-Download smali.zip attachment and extract it
-Decompile your SystemUI.apk
-In your smali,,copy/paste extract file
systemUi/smali/here = smali/fx/dzolcp

-Then go to res/layout/status_bar.xml and add this line (copy from here)

Code:
<fx.dzolcp.Speed android:textAppearance="@style/TextAppearance.StatusBar.Speed" android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
-Example

Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Kecil" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
        <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentRight="true">
            <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
            <ImageView android:layout_gravity="center_vertical" android:id="@id/stat_no_sim" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
            <fx.dzolcp.Speed android:textAppearance="@style/TextAppearance.StatusBar.Speed" android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
-Save and close file.

-Then open res/values/styles.xml

edit this at the end of line or you can copy/paste from here

Code:
<style name="TextAppearance.StatusBar.Speed" parent="@style/TextAppearance.StatusBar.Clock">
      <item name="android:textSize">14.0dip</item>
      <item name="android:textColor">#ffffffff</item>
 </style>
</resources>
-Save and close file.

-Recompile back your SystemUi.apk..

-And let me know the result

Status_bar.xml for SCREENSHOT

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:background="@drawable/status_bar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="3.0dip" android:paddingRight="3.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0">
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.Kecil" android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
            <ImageView android:layout_gravity="center_vertical" android:id="@id/battery" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" />
            <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
            <com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
        </LinearLayout>
        <DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Kecil" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
        <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentRight="true">
            <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
            <ImageView android:layout_gravity="center_vertical" android:id="@id/stat_no_sim" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
            <fx.dzolcp.Speed android:textAppearance="@style/TextAppearance.StatusBar.Speed" android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
        </ImageSwitcher>
        <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
        </com.android.systemui.statusbar.phone.TickerView>
    </LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>




CREDITS TO : REPENCIS For his 0.00k/s smali files

CREDITS TO : ROMWIZ For his nice video tutorial
CREDITS TO : TICKLEFISH For his AWESOME Tools
CREDITS TO : SANJAY KUMAR For his FROYO tutorial
CREDITS TO : BLUE SHARKY For his fix SystemUI FC's tutorial
CREDITS TO : SIEUAN For MTK Devices mod
CREDITS TO : TABOO5200 For latest version - Modified smali's

Not modded for any user anymore * Please include your device name and android version if you want Me to Re-Mod your SystemUI
*Try to upload here via XDA attachment uploader and not to link to any download server out of XDA unless there is no more option
Attached Files
File Type: rar smali.rar - [Click for QR Code] (3.8 KB, 12776 views)
Last edited by Dzol Cp; 29th July 2014 at 05:43 PM.
The Following 136 Users Say Thank You to Dzol Cp For This Useful Post: [ View ]
 
 
19th April 2013, 04:41 PM |#2  
Dzol Cp's Avatar
OP Recognized Contributor / Themer
Flag TB/BF Penang
Thanks Meter: 4,242
 
More
NEW SMALI FILES AND LINES

This new smali will show the KB/s meter only appear when you have data or wifi connection

NEW VERSION *MODIFIED SMALI'S - TEST ONLY ON GB



FOR FROYO ROM



FOR GB ROM



FOR MTK DEVICE



FIX FC FOR JB



Copy this line to res/layout/status_bar.xml

Code:
<com.android.systemui.statusbar.policy.Traffic android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="left|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
this line to add in res/values/ids.xml

Code:
<item type="id" name="traffic">false</item>
and this one as usual res/values/styles.xml

Code:
<style name="TextAppearance.StatusBar.Traffic" parent="@style/TextAppearance.StatusBar.Clock">
        <item name="android:textSize">14.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#ffffffff</item>
        <item name="android:textAllCaps">false</item>
    </style>
Status_bar.xml for SCREENSHOT


Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:background="@drawable/status_bar_custom_background" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <ViewFlipper android:id="@id/status_bar_flipper" android:layout_width="fill_parent" android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <RelativeLayout android:id="@id/icons" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true">
                <ImageView android:gravity="right|center" android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
                   <TextView android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
                    <LinearLayout android:orientation="horizontal" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
                        <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
                        <com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" />
                    </LinearLayout>
                </LinearLayout>
                <DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/center_clock" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" />
                <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentRight="true">
                    <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true">
                        <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
                        <ImageView android:layout_gravity="center_vertical" android:id="@id/stat_no_sim" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" />
                        <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
                            <com.android.systemui.statusbar.policy.Traffic android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="right|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" /> 
                            <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
                        </LinearLayout>
                        <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
                    </LinearLayout>
                </RelativeLayout>
            </RelativeLayout>
            <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
                    <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
                    <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
                </ImageSwitcher>
                <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
                    <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
                    <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
                </com.android.systemui.statusbar.phone.TickerView>
            </LinearLayout>
        </LinearLayout>
        <RelativeLayout android:layout_width="fill_parent" android:layout_height="@*android:dimen/status_bar_height" android:layout_alignParentLeft="true">
            <DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
            <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true">
                <com.serajr.dataspeedmeter.DataSpeedMeter android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="center" android:id="@id/data_speed_meter" android:layout_width="wrap_content" android:layout_height="fill_parent" />
                <View android:layout_width="8.0dip" android:layout_height="fill_parent" />
                <include android:id="@id/signal_cluster_2" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
                <View android:layout_width="4.0dip" android:layout_height="fill_parent" />
            </LinearLayout>
        </RelativeLayout>
    </ViewFlipper>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>


Quote:
Originally Posted by biopsin

New smali : Works even better, no more traffic spam in catlog..excellent work!

copy the smali files to this
smali/com/android/systemui/statusbar/policy/here


Quote:
Originally Posted by Ticklefish

Yup, that's pretty much it.

framework-res.apk is what I call a "resource apk". It contains information that is needed to be able to decompile certain system apk's.

To make matters more confusing, the creator of apktool (the tool used by most people to decompile apk files) calls these sort of files "framework apk's".

Hopefully you'll start experimenting with decompiling apk's yourself before too long and you'll understand what this is all about. I was a newbie when I registered here and none of this made any sense to me at all! But keep with it, and it will all become second nature to you.

Attached Files
File Type: zip TRAFFIC.zip - [Click for QR Code] (5.6 KB, 9371 views)
Last edited by Dzol Cp; 29th January 2014 at 04:57 AM. Reason: MODIFIED VERSION
The Following 66 Users Say Thank You to Dzol Cp For This Useful Post: [ View ]
19th April 2013, 08:49 PM |#3  
riotaruna's Avatar
Senior Member
Flag Aurora
Thanks Meter: 39
 
More
nice work, thanks.
i'll try
20th April 2013, 11:04 AM |#4  
Adi Aisiteru Reborn's Avatar
Senior Member
Flag Bandar Lampung
Thanks Meter: 4,954
 
More
Hai mate, finally you share it in this section

Good ,.

Work very nice on my CM10.1
The Following User Says Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
20th April 2013, 12:17 PM |#5  
Dzol Cp's Avatar
OP Recognized Contributor / Themer
Flag TB/BF Penang
Thanks Meter: 4,242
 
More
Quote:
Originally Posted by Adi Aisiteru Reborn

Hai mate, finally you share it in this section

Good ,.

Work very nice on my CM10.1

Yeah bro,, what apktool version did you using that you can compile cm10.1?
I always failed.. Can you post few ss here Cm10.1 with k/s meter?? Will be more awesome master
The Following 4 Users Say Thank You to Dzol Cp For This Useful Post: [ View ]
20th April 2013, 12:50 PM |#6  
Adi Aisiteru Reborn's Avatar
Senior Member
Flag Bandar Lampung
Thanks Meter: 4,954
 
More
Quote:
Originally Posted by dzolcp

Yeah bro,, what apktool version did you using that you can compile cm10.1?
I always failed.. Can you post few ss here Cm10.1 with k/s meter?? Will be more awesome master

SCREENSHOT on My CM10.1



And I included it in my combine Mod

My Combine Mod Thread : http://forum.xda-developers.com/show....php?t=2234074

you , ticklefish, & repencis Got Credit

PS : I dont use Apk tool , I usually use Apk Multi tool : http://forum.xda-developers.com/show....php?t=1310151

Attached Thumbnails
Click image for larger version

Name:	Screenshot_2013-04-20-18-43-37.jpg
Views:	5993
Size:	22.2 KB
ID:	1897431  
The Following 3 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
20th April 2013, 01:55 PM |#7  
riotaruna's Avatar
Senior Member
Flag Aurora
Thanks Meter: 39
 
More
I always fail to try this mod for AOKP CM10, can you help me


EDIT : yeahhh finally i can use this mod..
thanks Adi Aisiteru Reborn and dzolcp for tutor....
Last edited by riotaruna; 20th April 2013 at 07:04 PM.
The Following User Says Thank You to riotaruna For This Useful Post: [ View ]
27th April 2013, 07:41 PM |#8  
kyan31's Avatar
Member
Flag London
Thanks Meter: 26
 
Donate to Me
More
Smile
Awesome, it works great on my ROM for the G300

Thanks for the tutorial

The Following User Says Thank You to kyan31 For This Useful Post: [ View ]
28th April 2013, 02:35 AM |#9  
Junior Member
Thanks Meter: 0
 
More
Can I do this without PC??
How to do it??
28th April 2013, 04:12 AM |#10  
Dzol Cp's Avatar
OP Recognized Contributor / Themer
Flag TB/BF Penang
Thanks Meter: 4,242
 
More
Quote:
Originally Posted by kyan31

Awesome, it works great on my ROM for the G300

Thanks for the tutorial

Well Done Master!

Quote:
Originally Posted by riotaruna

I always fail to try this mod for AOKP CM10, can you help me


EDIT : yeahhh finally i can use this mod..
thanks Adi Aisiteru Reborn and dzolcp for tutor....

Congrats!!

Quote:
Originally Posted by faridevan

Can I do this without PC??
How to do it??

No you cant brovv..this require your pc should have latest Java and you should know the basic how to use apktool for compile/decompile
The Following 2 Users Say Thank You to Dzol Cp For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes