Reply Subscribe Email Thread

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

2013-04-19, 4:41PM |#1  
OP Recognized Contributor / Themer
TB/BF Penang
Thanks Meter: 4,240
 
More
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, 12382 views)
Last edited by Dzol Cp; 2014-07-29 at 5:43PM.
135 users say Thank You to Dzol Cp for this useful post
2013-04-19, 4:41PM |#2  
OP Recognized Contributor / Themer
TB/BF Penang
Thanks Meter: 4,240
 
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, 8975 views)
Last edited by Dzol Cp; 2014-01-29 at 4:57AM. Reason: MODIFIED VERSION
66 users say Thank You to Dzol Cp for this useful post
2013-04-19, 8:49PM |#3  
Senior Member
Aurora
Thanks Meter: 39
 
More
nice work, thanks.
i'll try
2013-04-20, 11:04AM |#4  
Senior Member
Bandar Lampung
Thanks Meter: 4,932
 
More
Hai mate, finally you share it in this section

Good ,.

Work very nice on my CM10.1
1 users say Thank You to Adi Aisiteru Reborn for this useful post
2013-04-20, 12:17PM |#5  
OP Recognized Contributor / Themer
TB/BF Penang
Thanks Meter: 4,240
 
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
4 users say Thank You to Dzol Cp for this useful post
2013-04-20, 12:50PM |#6  
Senior Member
Bandar Lampung
Thanks Meter: 4,932
 
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:	5897
Size:	22.2 KB
ID:	1897431  
3 users say Thank You to Adi Aisiteru Reborn for this useful post
2013-04-20, 1:55PM |#7  
Senior Member
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; 2013-04-20 at 7:04PM.
1 users say Thank You to riotaruna for this useful post
2013-04-27, 7:41PM |#8  
Member
London
Thanks Meter: 25
 
Donate to Me
More
Awesome, it works great on my ROM for the G300

Thanks for the tutorial

1 users say Thank You to kyan31 for this useful post
2013-04-28, 2:35AM |#9  
Junior Member
Thanks Meter: 0
 
More
Can I do this without PC??
How to do it??
2013-04-28, 4:12AM |#10  
OP Recognized Contributor / Themer
TB/BF Penang
Thanks Meter: 4,240
 
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
2 users say Thank You to Dzol Cp for this useful post
Reply Subscribe
Previous Thread Next Thread