[HOW-TO] Change status bar clock color

Search This thread

fxn

Member
May 26, 2009
47
16
www.fxndev.com
Short step by step write-up about how I changed the status bar clock color to red (because I like red :D)

NOTE BEFORE YOU START:
Standard disclaimer, I don't guarantee anything that might happen after following these steps, and I mean anything!! These steps worked for me and I have tried to include every minute step! My phone is running CM 3.9.9.1 but this should theoretically work on any ROM. But no guarantees.


1. Connect phone using USB and check that you can see your device using: adb devices
2. in your SDK/tools directory from command line do: adb pull /system/framework/services.jar services.jar
3. Make a backup of the services.jar file that just popped in the tools folder just in case!
4. Download smali and baksmali from http://code.google.com/p/smali/ and place them in the tools folder. Rename the files to baksmali.jar and smali.jar to save on typing later
5. Open the services.jar file with something such as winrar or 7zip or whatever you prefer
6. Copy out the classes.dex file to your SKD/tools folder
7. run following from command line: java -jar baksmali.jar -o classout/ classes.dex
8. Now browse to your new folders classout/com/android/server/status
9. Open the file StatusBarIcon.smali in something like notepad or context or any text editor
10. Locate a line that says: .line 46, under this line it should have something like:
const/high16 v6, -0x100
11. Change this to say: const/high16 v6, -0x1
12. Save the file
13. Now back to the command line and from your SDK/tools folder run: java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
14. If the above finishes without errors you should have a file called new-classes.dex in your SDK/tools folder now that is the same size as your classes.dex file.
15. Rename the old classes.dex file to classes-old.dex and rename the new-classes.dex file to classes.dex
16. Open the services.jar file with your archiving tool again from step 5 and replace the existing classes.dex file with our new classes.dex we just created.
17. From command line run: adb remount
18. also from command line: adb push services.jar /system/framework/
19. Finally run: adb shell reboot

Your phone should now restart and after being very very patient (5+ mins i've had) the phone starts and your clock is now Red =o)))

Hope this worked out for you, too tired to change the other texts now...need sleep :(

.FxN

ps. Thanks to Cyanogen (in general), XDA-developers and this thread so; Ohsaka and mianosm and JF
 
Last edited:

setzer715

Senior Member
Jan 29, 2009
1,236
209
North Phoenix
Great write up! My problem is the OS I'm using uses odex files. I'm assuming the part I need to modify is in that file since my services.jar does not have classes.dex and its file size is only 1k. Do you know how to modify the odex file?
 

zapote21

Senior Member
Aug 18, 2009
312
74
Westfield, IN
.line 45
.local v2, layoutParams:Landroid/widget/LinearLayout$LayoutParams;
const/high16 v6, 0x4180

invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextSize(F)V

.line 46
const v6, -0xe0e0f

invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V

.line 47

Ok, I got this far, and this is what I see... Which one is the color? And how do I find the codes for other colors? My clock is white right now... Want to change that...
 

enatefox

Senior Member
Jul 4, 2008
1,846
3
Thanks fxn, worked for my Donut theme.

If you guys need help deodexing, I have a theme thread with full howto (including a link here) to help you out. Post #2 has it all.
 

dying4004

Senior Member
Oct 15, 2009
1,013
32
thnx for this nice thread. i got a request. cud u plz tell me which line to edit to get clock in white in HERO rom?? i am editing rom for my HTC Hero and want to have the clock in White which is in black now. cheers
 

Attachments

  • StatusBarIcon.zip
    2.7 KB · Views: 254

dying4004

Senior Member
Oct 15, 2009
1,013
32
FxN: hi bro cud u plz tell me which file to edit to get black colored clock in status bar of Hero?? it wud be really appreciated. cheers
 

dbu

Senior Member
Mar 25, 2009
224
40
To change it to white just change this line:
const/high16 v6, -0x100
to
const v6, -0x1

I tried you directions and was able to change my clock, but I wanted it to be white, but what you wrote in the quoted post is the same thing you said to to change it to red as now I have a red clock. How do I get it to be white?
 

aupeters

New member
Feb 22, 2010
2
0
help with classout

On a mac, I keep getting "unable to access jarfile" when I enter:
java -jar Users/names/Desktop/android-sdk-mac_86/tools/baksmali.jar -o classout/ classes.dex

Any idea what I'm doing wrong here?
 

VinceOB

Senior Member
Jul 31, 2009
1,492
159
Is this thread still active? Ive got issues with deodexing services.odex file. The problem is, it wont Deodex.
 

MFK DGAF

Senior Member
Nov 9, 2009
65
0
On a mac, I keep getting "unable to access jarfile" when I enter:
java -jar Users/names/Desktop/android-sdk-mac_86/tools/baksmali.jar -o classout/ classes.dex

Any idea what I'm doing wrong here?

i get the same thing but i'm on win 7

i do
C:\Android\AndroidSDK\tools>java -jar baksmali.jar -0 classout/ classes.dex
Invalid or corrupt jarfile baksmali.jar

I downloaded the baksmali (wrapper script) and went to rename and put a .jar at the end of the name.
 

darkcell

Senior Member
Mar 31, 2004
137
4
kewly.deviantart.com
please help...

I tried grab and use services.jar from another rom which has white clock...
also I tried this tutorial, but I can't get my clock to white...
I'm using samsung spica...
 

unCoRrUpTeD

Senior Member
Mar 22, 2010
1,707
238
Fort Worth, TX
i get the same thing but i'm on win 7

i do
C:\Android\AndroidSDK\tools>java -jar baksmali.jar -0 classout/ classes.dex
Invalid or corrupt jarfile baksmali.jar

I downloaded the baksmali (wrapper script) and went to rename and put a .jar at the end of the name.

Try downloading Avabox...In the smali folder there is a folder called backsmali which has the files in it. Just take off the -1.1 at the end. These worked for me.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Short step by step write-up about how I changed the status bar clock color to red (because I like red :D)

    NOTE BEFORE YOU START:
    Standard disclaimer, I don't guarantee anything that might happen after following these steps, and I mean anything!! These steps worked for me and I have tried to include every minute step! My phone is running CM 3.9.9.1 but this should theoretically work on any ROM. But no guarantees.


    1. Connect phone using USB and check that you can see your device using: adb devices
    2. in your SDK/tools directory from command line do: adb pull /system/framework/services.jar services.jar
    3. Make a backup of the services.jar file that just popped in the tools folder just in case!
    4. Download smali and baksmali from http://code.google.com/p/smali/ and place them in the tools folder. Rename the files to baksmali.jar and smali.jar to save on typing later
    5. Open the services.jar file with something such as winrar or 7zip or whatever you prefer
    6. Copy out the classes.dex file to your SKD/tools folder
    7. run following from command line: java -jar baksmali.jar -o classout/ classes.dex
    8. Now browse to your new folders classout/com/android/server/status
    9. Open the file StatusBarIcon.smali in something like notepad or context or any text editor
    10. Locate a line that says: .line 46, under this line it should have something like:
    const/high16 v6, -0x100
    11. Change this to say: const/high16 v6, -0x1
    12. Save the file
    13. Now back to the command line and from your SDK/tools folder run: java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
    14. If the above finishes without errors you should have a file called new-classes.dex in your SDK/tools folder now that is the same size as your classes.dex file.
    15. Rename the old classes.dex file to classes-old.dex and rename the new-classes.dex file to classes.dex
    16. Open the services.jar file with your archiving tool again from step 5 and replace the existing classes.dex file with our new classes.dex we just created.
    17. From command line run: adb remount
    18. also from command line: adb push services.jar /system/framework/
    19. Finally run: adb shell reboot

    Your phone should now restart and after being very very patient (5+ mins i've had) the phone starts and your clock is now Red =o)))

    Hope this worked out for you, too tired to change the other texts now...need sleep :(

    .FxN

    ps. Thanks to Cyanogen (in general), XDA-developers and this thread so; Ohsaka and mianosm and JF
    1
    nice... will try it out latter today... what would be the code for white color text? does this also modifies notification fonts?
    1
    Guys, I'm trying to change it a ICS ROM, followed the steb by step by there's no "status" folder under "classout/com/android/server/..." and also I couldn't find a StatusBarIcon.smali file anywhere. Help :confused:

    it's in:
    SystemUI\smali\com\android\systemui\statusbar