colorChange.jar v3.1 - Modify Cyan template text colors [ALL VERSIONS] 11/29

Search This thread

Ohsaka

Senior Member
Jun 8, 2009
754
70
Code:
**************************************************************************
**  Color Changer v3.1 (ALL YOUR VERSIONS ARE BELONG TO US) by Ohsaka  **
**************************************************************************

Usages:
java -Xmx512M -jar colorChangev3.jar <theme.zip> [colorLabels ...] [debug] [zipDebug] [goFull]

< > means required, [ ] means optional
        <theme.zip> - Android theme update file (not a full ROM update)
        [ticker] - ARGB color for ticker notifications on the status bar
        [clock] - ARGB color for the clock text
        [date] - ARGB color for the date
        [ongoing] - ARGB color for "Ongoing" Label
        [latest] - ARGB color for "Notifications" Label
        [none] - ARGB color for "No Notifications" Label
        [clear] - ARGB color for text on Clear Notifications button
        [network] - ARGB color for network name (T-Mobile usually)
        [roam] - Not sure where this color shows up, possibly network name when roaming

Progress Bar Color Change (Must specify BOTH at once)
        [progressBarBackground] - Progress bars background color
        [progressBarForeground] - Progress bars foreground color

        [debug] - Turns on debugging output
        [zipDebug] - Turns on zip debugging output
        [goFull] - Force updater to process a full rom instead of just templates


Example 1) java -Xmx512M -jar colorChangev3.jar themeXYZ.zip ticker=FFFF0000 date=FFFF0000 clock=FFFF0000
        This will change ticker, date, and clock to red

Example 2) java -Xmx512M -jar colorChangev3.jar themeXYZ.zip clear=FFFFFFFF network=FF0000FF
        This will change the clear notifications button text to white and network name (usually T-Mobile) to blue
Example 3) java -Xmx512M -jar colorChangev3.jar themeXYZ.zip clear=FFFFFFFF network=FF0000FF debug zipDebug
        Same as example 2 but with debug and zipDebug turned on

Important: You must add "-Xmx512M" on the command line now, as seen in the examples

3.0 enhancements:
- All inclusive jar now, no external jars needed
- Changed search algorithm, uses text strings less likely to change. Should hopefully make this version work for most future roms.
- Only unzips and edits files when necessary
- Detects OS, will chmod 755 signed file if on Linux. Also has additional error messages reminding user to run as root on Linux
- Cleaned up output logging, hopefully more useful
- Added "debug" and "zipDebug" parameters to turn on debug output
- Other stuff that I can't remember

v3.1
- Added "goFull" flag to allow updating a full ROM
- Removed progress circle arguments, can't do it
- Fixed and tested progress bar color change, experimental no longer
- Tested with Cyan 4.2.6

The attached file is the latest file even though I didn't change the filename.
Please continue to send me any bug reports and questions.


<previous releases info>
Edit(7/19) - Successfully tested with v3.6.8 template of Cyan Rom
Edit(7/26) - Successfully tested with v3.9 template of Cyan Rom
Edit(8/19) - Successfully tested with v4.0.1 template of Cyan Rom. All needed 3rd party jars are now included inside the single jar file. (Thanks mianosm)
Edit(9/9) - Added test version of 2.0. Works for 4.1.5+ templates.

EDIT: v0.5 Changed the way the command line works... Alot more user friendly now IMO
http://forum.xda-developers.com/showthread.php?t=535630&page=13

EDIT: v0.4 is out, fixed a bug and made the usage output explain better the two possible ways to run it
http://forum.xda-developers.com/showthread.php?t=535630&page=12

EDIT: v0.3 is out, sets each element with an independent color, check page 11
http://forum.xda-developers.com/showthread.php?t=535630&page=11

EDIT: There are "white versions for Vodaphone, rogers, and JF151 on page 10"
http://forum.xda-developers.com/showthread.php?t=535630&page=10

EDIT: I added my Status Text Color Changer application to this thread...
Read about it on page 6..
http://forum.xda-developers.com/showthread.php?t=535630&page=6
 

Attachments

  • colorChangev3.jar-remove-zip.zip
    1.7 MB · Views: 10,933
Last edited:

mianosm

Senior Member
May 24, 2009
431
0
127.0.0.1
Notification text is found in the: update.zip/framework/framework-res.apk/res/layout/status_bar.xml

Open the status_bar.xml with your favorite hex editor, find the instances of 00 00 1C, and the next three values will dictate your color choice.

For my services.jar the only two things I changed was the clock in com/android/server/status/StatusBarService.smali:
Code:
Line 4115>    const v8, -0x1    invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V

...and then the date in com/android/server/status/StatusBarIcon.smali:
Code:
Line 86>     .line 46     const/high16 v6, -0x100     invoke-virtual {v4, v7}, Landroid/widget/TextView;->setTextColor(I)V

Then the only thing left is the notifications in the:
Code:
update.zip/framework/framework-res.apk/res/layout/status_bar.xml

Most of the reason why all of the trouble was had was due to the calls being moved for the status bar pull down with stericsons mod, but all is well again.

Thanks a ton Ohsaka
 
Last edited:

Ohsaka

Senior Member
Jun 8, 2009
754
70
What program do you recommend for editing .dex files?

I use PSPad to edit them because it will recognize its a unix formatted file and not mangle it with extra line feed characters which some windows text editors do. Its also free which is nice.

A nice feature of the smali file is that they contain ".line xxx" indicators. Which tell you the line number in the original source file it corresponds to. Very very helpful...
 

mianosm

Senior Member
May 24, 2009
431
0
127.0.0.1
To be clear, the dex file is compiled, you have to decompile it before you can edit it.

Unzip services.jar, decompile classes.dex, edit .smali files, compile the decompiled dex file, reinsert it into your services.jar, resign, done.

I use vim when I do my editing in linux, and notepad++ in windows, I'll have to take a look at PSPad to see what that's all about. : )
 

Ohsaka

Senior Member
Jun 8, 2009
754
70
Pspad is a fancier editor for programmers. It supports a ton of languages and has a lot of various addons and plugins. I developed an editor in it for a c-based language called AVS. It can load and save from a remote server, compile on remote server, link to the helpfile, etc etc.
 

MontAlbert

Senior Member
Jan 10, 2007
2,656
198
can someone post the services.jar without the stericson fix and edited with the smali files for those of us unfamiliar with dex files etc. I am trying to make themes for the Sapphire and hope to use this a few of them.....

Or, will i be able to just add this services.jar to the Sapphire rom?
 

MontAlbert

Senior Member
Jan 10, 2007
2,656
198
Post me the services.jar from ur theme and ill update it later

thanks- wonder if the services.jar is different from Dream to Sapphire?

I have attached the services.jar (as for yours just remove the .zip) from the Sapphire ion rom. I just basically used the services.jar given with the rom (this is my first rom post rooting the Magic so didnt want to play around with too many things just yet- i did put in statusbar.xml for white date though).

thanks again- what is your twitter?
 

Attachments

  • services.jar.zip
    345 bytes · Views: 236
Last edited:

mianosm

Senior Member
May 24, 2009
431
0
127.0.0.1
Is there a difference between yours(oshaka) and Mianosm's services file?

There shouldn't be, however I do believe the md5sums will be different as I put together my own using the old 1.5 theme and only adjusting the 2 lines in the dex files that I posted above.

Notifications = status_bar.xml (if you would like to use colors other than 00 00 00 or FF FF FF, this is where you would set them for the different notifications).

Clock and Date = services.jar (more particularly the 2 smali files listed above, if you know how to convert 0x0 format, you can make the clock/date any color(s) you want. ;) ).
 

SteveTilsed

Senior Member
May 28, 2009
126
8
Notification text is found in the: update.zip/framework/framework-res.apk/res/layout/status_bar.xml

Open the status_bar.xml with your favorite hex editor, find the instances of 00 00 1C, and the next three values will dictate your color choice.

For my services.jar the only two things I changed was the clock in com/android/server/status/StatusBarService.smali:
Code:
Line 4115>    const v8, -0x1    invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V

...and then the date in com/android/server/status/StatusBarIcon.smali:
Code:
Line 86>     .line 46     const/high16 v6, -0x100     invoke-virtual {v4, v7}, Landroid/widget/TextView;->setTextColor(I)V

Then the only thing left is the notifications in the:
Code:
update.zip/framework/framework-res.apk/res/layout/status_bar.xml

Most of the reason why all of the trouble was had was due to the calls being moved for the status bar pull down with stericsons mod, but all is well again.

Thanks a ton Ohsaka

Can i ask what your fav hex editor is?
 

sir*mez

Senior Member
Nov 7, 2007
1,400
310
NYC
There shouldn't be, however I do believe the md5sums will be different as I put together my own using the old 1.5 theme and only adjusting the 2 lines in the dex files that I posted above.

Notifications = status_bar.xml (if you would like to use colors other than 00 00 00 or FF FF FF, this is where you would set them for the different notifications).

Clock and Date = services.jar (more particularly the 2 smali files listed above, if you know how to convert 0x0 format, you can make the clock/date any color(s) you want. ;) ).
great work guys!! you guys are the best!!! i have to step my game up.
 

SteveTilsed

Senior Member
May 28, 2009
126
8
I use HxD. YMMV.

Have fun! : )

Please see my attached screen does this mean that my colour would be black?

Thanks again :D This could be fun.
 

Attachments

  • xml.jpg
    xml.jpg
    19 KB · Views: 347

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Code:
    **************************************************************************
    **  Color Changer v3.1 (ALL YOUR VERSIONS ARE BELONG TO US) by Ohsaka  **
    **************************************************************************
    
    Usages:
    java -Xmx512M -jar colorChangev3.jar <theme.zip> [colorLabels ...] [debug] [zipDebug] [goFull]
    
    < > means required, [ ] means optional
            <theme.zip> - Android theme update file (not a full ROM update)
            [ticker] - ARGB color for ticker notifications on the status bar
            [clock] - ARGB color for the clock text
            [date] - ARGB color for the date
            [ongoing] - ARGB color for "Ongoing" Label
            [latest] - ARGB color for "Notifications" Label
            [none] - ARGB color for "No Notifications" Label
            [clear] - ARGB color for text on Clear Notifications button
            [network] - ARGB color for network name (T-Mobile usually)
            [roam] - Not sure where this color shows up, possibly network name when roaming
    
    Progress Bar Color Change (Must specify BOTH at once)
            [progressBarBackground] - Progress bars background color
            [progressBarForeground] - Progress bars foreground color
    
            [debug] - Turns on debugging output
            [zipDebug] - Turns on zip debugging output
            [goFull] - Force updater to process a full rom instead of just templates
    
    
    Example 1) java -Xmx512M -jar colorChangev3.jar themeXYZ.zip ticker=FFFF0000 date=FFFF0000 clock=FFFF0000
            This will change ticker, date, and clock to red
    
    Example 2) java -Xmx512M -jar colorChangev3.jar themeXYZ.zip clear=FFFFFFFF network=FF0000FF
            This will change the clear notifications button text to white and network name (usually T-Mobile) to blue
    Example 3) java -Xmx512M -jar colorChangev3.jar themeXYZ.zip clear=FFFFFFFF network=FF0000FF debug zipDebug
            Same as example 2 but with debug and zipDebug turned on

    Important: You must add "-Xmx512M" on the command line now, as seen in the examples

    3.0 enhancements:
    - All inclusive jar now, no external jars needed
    - Changed search algorithm, uses text strings less likely to change. Should hopefully make this version work for most future roms.
    - Only unzips and edits files when necessary
    - Detects OS, will chmod 755 signed file if on Linux. Also has additional error messages reminding user to run as root on Linux
    - Cleaned up output logging, hopefully more useful
    - Added "debug" and "zipDebug" parameters to turn on debug output
    - Other stuff that I can't remember

    v3.1
    - Added "goFull" flag to allow updating a full ROM
    - Removed progress circle arguments, can't do it
    - Fixed and tested progress bar color change, experimental no longer
    - Tested with Cyan 4.2.6

    The attached file is the latest file even though I didn't change the filename.
    Please continue to send me any bug reports and questions.


    <previous releases info>
    Edit(7/19) - Successfully tested with v3.6.8 template of Cyan Rom
    Edit(7/26) - Successfully tested with v3.9 template of Cyan Rom
    Edit(8/19) - Successfully tested with v4.0.1 template of Cyan Rom. All needed 3rd party jars are now included inside the single jar file. (Thanks mianosm)
    Edit(9/9) - Added test version of 2.0. Works for 4.1.5+ templates.

    EDIT: v0.5 Changed the way the command line works... Alot more user friendly now IMO
    http://forum.xda-developers.com/showthread.php?t=535630&page=13

    EDIT: v0.4 is out, fixed a bug and made the usage output explain better the two possible ways to run it
    http://forum.xda-developers.com/showthread.php?t=535630&page=12

    EDIT: v0.3 is out, sets each element with an independent color, check page 11
    http://forum.xda-developers.com/showthread.php?t=535630&page=11

    EDIT: There are "white versions for Vodaphone, rogers, and JF151 on page 10"
    http://forum.xda-developers.com/showthread.php?t=535630&page=10

    EDIT: I added my Status Text Color Changer application to this thread...
    Read about it on page 6..
    http://forum.xda-developers.com/showthread.php?t=535630&page=6
    1
    Found it nevermind
    1
    1
    I'm sure it's possible, but I don't think you'll have any use for Colorchange. It was created almost 3 years ago, and specifically for the version of CyanogenMod available at that time.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone