Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,404 Members 48,915 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Dzol Cp
Old
(Last edited by Dzol Cp; 29th July 2014 at 05:43 PM.)
#1  
Dzol Cp's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 3,948
Posts: 1,472
Join Date: Jan 2012
Location: TB/BF Penang
Talking [GUIDE][MOD][SYSTEMUI] How to add 0.00KB/s meter on statusbar GB/ICS/JB/KK 10-08-2013

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, 8472 views)
The Following 129 Users Say Thank You to Dzol Cp For This Useful Post: [ Click to Expand ]
 
Dzol Cp
Old
(Last edited by Dzol Cp; 29th January 2014 at 04:57 AM.) Reason: MODIFIED VERSION
#2  
Dzol Cp's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 3,948
Posts: 1,472
Join Date: Jan 2012
Location: TB/BF Penang
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 View Post
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 View Post
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, 5099 views)
The Following 64 Users Say Thank You to Dzol Cp For This Useful Post: [ Click to Expand ]
 
riotaruna
Old
#3  
riotaruna's Avatar
Senior Member
Thanks Meter 34
Posts: 235
Join Date: Mar 2013
Location: Aurora
nice work, thanks.
i'll try
 
Adi Aisiteru Reborn
Old
#4  
Adi Aisiteru Reborn's Avatar
Senior Member
Thanks Meter 4,454
Posts: 1,648
Join Date: Apr 2013
Location: Bandar Lampung
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: [ Click to Expand ]
 
Dzol Cp
Old
#5  
Dzol Cp's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 3,948
Posts: 1,472
Join Date: Jan 2012
Location: TB/BF Penang
Quote:
Originally Posted by Adi Aisiteru Reborn View Post
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: [ Click to Expand ]
 
Adi Aisiteru Reborn
Old
#6  
Adi Aisiteru Reborn's Avatar
Senior Member
Thanks Meter 4,454
Posts: 1,648
Join Date: Apr 2013
Location: Bandar Lampung
Quote:
Originally Posted by dzolcp View Post
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:	5148
Size:	22.2 KB
ID:	1897431  
The Following 3 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ Click to Expand ]
 
riotaruna
Old
(Last edited by riotaruna; 20th April 2013 at 07:04 PM.)
#7  
riotaruna's Avatar
Senior Member
Thanks Meter 34
Posts: 235
Join Date: Mar 2013
Location: Aurora
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....
The Following User Says Thank You to riotaruna For This Useful Post: [ Click to Expand ]
 
kyan31
Old
#8  
kyan31's Avatar
Member
Thanks Meter 9
Posts: 57
Join Date: Apr 2011
Location: London

 
DONATE TO ME
Awesome, it works great on my ROM for the G300

Thanks for the tutorial

Devices: Samsung Galaxy S4 i9505 & Huawei Ascend G300

Lightning ROM (Android 4.0.3)

Electra (CM10.1 Android 4.2.2)

Male, 15. I develop for the Huawei Ascend G300. You can check out my work on MoDaCo:
The Following User Says Thank You to kyan31 For This Useful Post: [ Click to Expand ]
 
faridevan
Old
#9  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Apr 2013
Can I do this without PC??
How to do it??
 
Dzol Cp
Old
#10  
Dzol Cp's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 3,948
Posts: 1,472
Join Date: Jan 2012
Location: TB/BF Penang
Quote:
Originally Posted by kyan31 View Post
Awesome, it works great on my ROM for the G300

Thanks for the tutorial
Well Done Master!

Quote:
Originally Posted by riotaruna View Post
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 View Post
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: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes