Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP Ohsaka

11th July 2009, 05:39 PM   |  #1  
Ohsaka's Avatar
OP Senior Member
Thanks Meter: 71
 
703 posts
Join Date:Joined: Jun 2009
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/show...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/show...535630&page=12

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

EDIT: There are "white versions for Vodaphone, rogers, and JF151 on page 10"
http://forum.xda-developers.com/show...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/show...=535630&page=6
Attached Files
File Type: zip colorChangev3.jar-remove-zip.zip - [Click for QR Code] (1.69 MB, 10625 views)
Last edited by Ohsaka; 30th November 2009 at 07:03 AM.
The Following 3 Users Say Thank You to Ohsaka For This Useful Post: [ View ]
11th July 2009, 05:44 PM   |  #2  
mianosm's Avatar
Senior Member
Flag 127.0.0.1
Thanks Meter: 0
 
425 posts
Join Date:Joined: May 2009
More
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 by mianosm; 11th July 2009 at 05:57 PM.
11th July 2009, 06:44 PM   |  #3  
Genesis206's Avatar
Senior Member
Thanks Meter: 5
 
150 posts
Join Date:Joined: May 2009
What program do you recommend for editing .dex files?
11th July 2009, 07:03 PM   |  #4  
mianosm's Avatar
Senior Member
Flag 127.0.0.1
Thanks Meter: 0
 
425 posts
Join Date:Joined: May 2009
More
Quote:
Originally Posted by Genesis206

What program do you recommend for editing .dex files?

There is only one that I know of:

http://code.google.com/p/smali/

Remember, Baksmali means to disassemble, and Smali means to assemble (in Icelandic of course).
11th July 2009, 07:25 PM   |  #5  
Ohsaka's Avatar
OP Senior Member
Thanks Meter: 71
 
703 posts
Join Date:Joined: Jun 2009
Quote:
Originally Posted by Genesis206

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...
11th July 2009, 09:14 PM   |  #6  
mianosm's Avatar
Senior Member
Flag 127.0.0.1
Thanks Meter: 0
 
425 posts
Join Date:Joined: May 2009
More
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. : )
11th July 2009, 10:55 PM   |  #7  
Ohsaka's Avatar
OP Senior Member
Thanks Meter: 71
 
703 posts
Join Date:Joined: Jun 2009
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.
11th July 2009, 11:35 PM   |  #8  
Senior Member
Thanks Meter: 157
 
2,402 posts
Join Date:Joined: Jan 2007
More
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?
12th July 2009, 12:14 AM   |  #9  
Ohsaka's Avatar
OP Senior Member
Thanks Meter: 71
 
703 posts
Join Date:Joined: Jun 2009
Post me the services.jar from ur theme and ill update it later
12th July 2009, 05:27 AM   |  #10  
Senior Member
Thanks Meter: 157
 
2,402 posts
Join Date:Joined: Jan 2007
More
Quote:
Originally Posted by Ohsaka

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?
Attached Files
File Type: zip services.jar.zip - [Click for QR Code] (345 Bytes, 209 views)
Last edited by MontAlbert; 12th July 2009 at 05:32 AM.

Post Reply Subscribe to Thread

Tags
clock, date, hex, notifications, services.jar, text, white
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes