yashsingh1/xdaforums huggingface dataset:
[Android Themes] Ohsaka:
I promise keyboard will be the first feature of "colorChanger.jar v2.0". It should be relatively easy to add in IMO. I am writing alot of generic plumbing code now to support basic operations like zipping, editting random access file, hex editting XML file...

So adding any new .smali or XML hex edits will be a cinch. I will probably store all the edits in a properties file so they can be modified easier.

If I get enough interest, I will think about v3.0 having a GUI. That way you could see a mockup of the color changes before you process the update file.
[Android Themes] Ohsaka:
rogers services.jar

Here is a modded services.jar for Rogers phone as requested by Daneshm90. Only the date and clock are white. The notifications need be changed by hex-editing one of the xml layout files that is not a part of services.jar. That change is described earlier in this thread by mianosn.

UNTESTED! Waiting on confirmation from Daneshm90 that it works.
[Android Themes] MontAlbert:
I'm game for beta testing.....
[Android Themes] Daneshm90:
Sweet

Thnx dude...it worked....now just gotta chng a few things n i got rogers with hero status bar lol...
[Android Themes] c7aig:
Thanks a bunch :D Another one for you then, any chance you know the location of the XML that controls the 'action selection' in the browser (currently Orange).

Thanks!
[Android Themes] WebghostDK:
me2 :P

I have asked Ohsaka to make the same for me, so there will maybe soon be a solution for UK Vodafone's too :D
[Android Themes] Ohsaka:
I will probably try and add support for multiple phone models in a later version of the ColorChanger application also.
[Android Themes] Ohsaka:
I have the application doing the .smali edits with the 3.6.6 theme. It parses the xml file for the status bar also.

Just need to add the edit part. Hoping to have a beta tonight.
[Android Themes] MontAlbert:
Can't wait to try it out. thanks for your work.
[Android Themes] Ohsaka:
BETA! BETA! BETA!

I tested this with Cyanogen's 3.6.6 and 3.6.7 theme template file.

I set the color to red first, and then to green.

Seemed to work both times.

Everyone give this a shot and let me know how it works for you.

Requirements (for now):

baksmali-0.93.jar

smali-0.92.jar

testsign.jar

Place all three jars in the same directory as the colorChange.jar file. If you don't know what those three jars are, you may want to wait for a later version of this application.

C:\Apps\android2\services-mods>java -jar colorChange.jar

******************************************
** Color Changer v0.02_BETA by Ohsaka **
******************************************

Usage:
java -jar colorChange.jar <theme-update.zip> <AARRGGBB>
<theme-update.zip> - Android theme update file (not a full ROM update)
<AARRGGBB> - color value (AA is alpha channel)

I tried to do a decent job on giving error messages when something is missing or unexpected.

Edit: updated to v0.02
[Android Themes] beagz:
Just to make sure I understand, this is used with an entire theme or ROM. Not the individual .jar file that is to be updated correct? But it only changes services.jar right?

What if I use a template with only services.jar in the framework folder would that work? Or is it dependant on other files?
[Android Themes] Ohsaka:
It also will hex edit the status_bar.xml file so that notifications show up in the same color that you choose.

Other than that, just the services.jar file.... for now. :)
[Android Themes] beagz:
Ok, it works with theme templates. NOT with full ROM updates.

Thanks for this.
[Android Themes] Ohsaka:
Yeah, I should probably change the usage description to specify theme update file. I'll also add in a sanity check to make sure the .zip file is a theme update and not a full ROM update file.
[Android Themes] beagz:
yes. That would clear things up. But since it was only 2 options I figured it out.

This is good though since you can just place the files that get edited into the theme template. It make make it a bit faster.

So Framework-res.apk and services.jar get edited. Any others?
[Android Themes] Ohsaka:
Yeah, those are the only two that get changed.
[Android Themes] beagz:
Yup, tested with cyan 3.6.7 change text to white. No problem.
[Android Themes] MontAlbert:
So it just edits the services.jar and statusbar.xml file in framework? ie. i can just use this statusbar.xml and stick it in any theme i want that colour to be?

Will it work with Sapphire/Magic theme templates?
[Android Themes] Ohsaka:
You could go back into the zip and grab the modified files... My concept was for end users who want to tweak the color of the text to their liking. I guess I could add a command line flag that will leave a copy of the modified files in the directory for theme devs...
[Android Themes] Binary100100:
Huh

Since I am clueless on how to run this, would someone please post a white modification of CM. Please? If it's not too much to ask. :)
[Android Themes] Ohsaka:
You just open up a command prompt and run 'java -jar colorChange.jar' for starters...
[Android Themes] MontAlbert:
nice but i wouldn't stress. People who are doing themes should know how to grab services.jar and statusbar.xml out of a zip if required. Can't wait to try this tonight.....

For someone like me it will be a lot of trial and error as i am not 100% sure on all the html numbers etc for colours ( that website posted recently should help)... as for the transparency for it to be bold we leave the alpha channel 00?
[Android Themes] Ohsaka:
I believe 00 is 100% transparent, ie invisible...

FF is the opposite of that... I was always using FFFF0000 and FF00FF00 for my testing...
[Android Themes] crotalusfreak:
Thanks for this love the colorChange.jar worked like a charm with Cyanogen's 3.6.7.1 once I understood how to use it..:confused:...probably the pot I smoke lol...great work though seriously makes theming a ton easier thanks again!
[Android Themes] Binary100100:
Thanks for the PM!
[Android Themes] MontAlbert:
workeed nicely on cyanogen's new build.... trying now on sapphire/magic....

didnt bloody work- came up with something like cannot symlink bugreport.... now the bugger wont boot up..... time for a nandroid restore and work on template again.....
[Android Themes] daveid:
I know the point of this thread is to teach us how to do it ourselves, but if someone has a file that works with Cyan's 3.6.7.1, could they please share it? Thanks.
[Android Themes] MontAlbert:
bugger! step 2 didnt work! what do i have to do to make a template (there are no templates made for sapphire roms- cyanogen said just to pull o ut what i dont want from the rom)...

trying to just add the changed stuff to a full build and will flash again.....gotta love the new cyan/AmonRA recovery and nandroid!

***edit*** got nice green date and notifications... bloody clock didnt change- maybe i forgot to drop the green services.jar in.... ok... try again.....
[Android Themes] MontAlbert:
here you go- works nicely for me on cyan's 3.6.7.1
[Android Themes] mianosm:
Great job Ohsaka, I'm going to have to take a look at this later on. : )
[Android Themes] daveid:
Thanks a million, just got 3.6.7.1 to boot up theme'd now I am going to flash my new framework & services.jar see if I can see the text on my statusbar again. Looking sharp, thanks again.
[Android Themes] mianosm:
Manually take apart the classes.dex, and see what the smali file is that holds the color now - it's obviously not named the same for the Ion build apparently....
[Android Themes] MontAlbert:
how do i do that? baksmali somehow?

will look around...

thanks
[Android Themes] mianosm:
Linux:

mianosm@miano:~/test$ java -Xmx512m -jar baksmali-0.93.jar classes.dex

Windows:

c:\>java -cp baksmali-0.93.jar classes.dex
[Android Themes] MontAlbert:
how do i extract the classes.dex out of services.jar?

sorry to be a noob...
[Android Themes] mianosm:
Whatever zip/gzip/7z/winRar.

No worries, we all start somewhere.
[Android Themes] mianosm:
You are correct, and the new 3.6.7.1 has a different output from the previous serives.jar files.

I'm going to see about a new themeing direction for future cyanogen builds - might take a little while but my thought is this:

Compile with the build a capture of where you are pulling the /drawables/ from, and dictating which folder to do so (hopefully by installing to somewhere like /data/theme/ ).

Themes are overly complicated at the moment, and just silly to keep up with the builds as they are updated (more specifically CMs rapid building and adjusting).
[Android Themes] MontAlbert:
thanks- i thought so but when i opened it with 7-zip (as you do themes) there is only meta.inf folder in there. I checked out even the hero roms for magic and all their services.jar files only had this folder as well- no such thing as classes.dex...

BUT it is in the stock HTC rom......obviously this is why it is not working... no classes.dex file....

maybe its in the services.odex file? Not sure how to open that.....
[Android Themes] mianosm:
odex is an optimized dex from what I understand.

Try to rename it to services.dex, and baksmali it.
[Android Themes] MontAlbert:
no such luck mate- renamed services.odex to services.dex, dropped services.dex into the same folder as baksmali.jar and got:

C:\Documents and Settings\Scott\Desktop\android-sdk\tools>java -cp baksmali-0.93
.jar services.dex
Exception in thread "main" java.lang.NoClassDefFoundError: services/dex
Caused by: java.lang.ClassNotFoundException: services.dex
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: services.dex. Program will exit.

tried doing it to the services.jar file in stock rom (no .odex files and has classes.dex inside services.jar) but it didnt work.....oh well. its late here now and i am sure my 3yo girl will be up at 6am... hopefully try again tomorrow night....
[Android Themes] mianosm:
@Ohsaka, could I get the source for your two classes ( ColorChange.java and UnZip.java )- I'd like to make this so it doesn't have any dependancies at all (including baksmali/smali/testsign, and making it so that any java development environment could run it instead of just one).
[Android Themes] ohmarni:
Awesome work, Ohsaka! This is going to speed up my port for the Android Plus theme. I'll probably have something out tonight!
[Android Themes] MontAlbert:
Ohsaka,

Any idea on how to edit the .odex file in sapphire ION rom? There is no classes.dex file in services.jar...
[Android Themes] Ohsaka:
You are doing -cp instead of -jar. When you use -jar, it tells java that the following jar file has been compiled as an executable jar file. That basically means theres a text file inside the jar that tells java which class to run instead of you typing it on the command line...

Instead of: java -cp baksmali-0.93.jar services.dex

Use: java -jar baksmali-0.93.jar services.dex
[Android Themes] MontAlbert:
ok thanks- i actually copied that command from someone above....will try tonight....
[Android Themes] Ohsaka:
Once the code is more mature I'll release it. I like suggestions though.

"I'd like to make this so it doesn't have any dependancies at all" <--- I plan on integrating all the required jars real soon

"making it so that any java development environment could run it" <--- I just set the compliance level for the app back down to version 1.4. That should help.

I also plan on adding an optional command line switch that will make the application save out the modified files in addition to reinserting them into the theme zipfile.
[Android Themes] mianosm:
If you could/find time try testing it out with: http://openjdk.java.net/

Not a make it or break it thing....something is in the works for a more customizable rom/theme anywho. : )
[Android Themes] beagz:
Thanks for this. I used it to solve unpack and repack of .dex files. I can now keep HTC music up to date with cyan builds
[Android Themes] Ohsaka:
Glad to hear it.

Should make Stericson happy too!
[Android Themes] mianosm:
The color for the date/clock/notifications is hardcoded, which in my opinion (and the writer of the source apparently) a really bad idea (it's actually a todo in the .java files). Someone will be pushing upstream to gerrit about that I'm fairly certain (90%).

What kind of issues were you facing with the HTC apps? If you guys find issues it's important that the issue is made aware to developers so they can figure out how to make the phone more Open Source friendly, that is what it's all about. AOSP and the OHA. : )
[Android Themes] Ohsaka:
Notification color is changed in the status_bar.xml file. Most colors are set in the xml layout files. If they ever move the date/clock color to the layout xml files, it will be a quick fix to the colorChange.jar app.
[Android Themes] Boomgawd:
Has this been tested yeT?

I have a rooted rogers dream and I would love to try this. Can someone confirm it has worked?

If there is need I can be guinea pig. Just need to make sure I can revert to the old one if something fs up..
[Android Themes] WebghostDK:
Is it that hard to change a black color to white? :S seems like it takes alot of time :(
[Android Themes] ultra spikey:
Will this be able to change the color of the button text, like you have on your first attached image in the OP.
[Android Themes] Ohsaka:
It won't right now, but it could. I will break out all the different UI elements to change as separate command line options.
[Android Themes] alritewhadeva:
Interesting...Decided to look into this thread for some thing helpful. A page back or so, people tried to just rename the .odex file to a .dex file and it didn't work. Does anyone know how you can retrieve the .dex file FROM the .odex file? This would be helpful to me and I'm sure to others later on.
[Android Themes] Ohsaka:
Here are some white versions of files people have requested....

White version for JFv151

http://www.4shared.com/file/118796981/b9aa76ae/white-framework_JFv151_CRB43-US.html
[Android Themes] ultra spikey:
Can I make a request, a services.jar for CM3.6.7.2, that has white clock, date, notifications AND button text(ie. "clear notifications").

Thanks
[Android Themes] Ohsaka:
EDIT: Dont do this, it wont work... too many changes to services.jar since then...

There is an attachment called services-jar.zip in the PRodigal Sun thread from me on July 8th...

It has all the possible things set to white...

I am working on adding all the extra options to the color changer....

Here is a list of the upcoming independent UI elements:

clock text

mDateView

mOngoingTitle

mLatestTitle

mNoNotificationsTitle

mClearButton

mSpnLabel

mPlmnLabel

I will try and make a screen shot to show what is what...
[Android Themes] ultra spikey:
Wouldnt that file remove some of Cyanogens tweaks?
[Android Themes] Ohsaka:
Yeah, I am working on a new one right now... I am making each element a different color... so I can easily see what changes what...
[Android Themes] WebghostDK:
Did anyone succeed at the white clock vodafone "mod"? Mine is still black :(
[Android Themes] ultra spikey:
Cool thanks...I wanna use some black buttons in my theme, but doesnt work too well with black text.
[Android Themes] Ohsaka:
Sort of a neat picture...

There is apparently another text view that can show up near or instead of the "T-Mobile" text... Maybe when you are roaming or something...

mPlmnLabel is "T-Mobile" and mSpnLabel doesn't show up for me...

Plmn Label, Spn Label... any cell phone people got ideas on what those stand for? Java source isn't documented....

Clock text - white

mDateView - white

mOngoingTitle - red

mLatestTitle - green

mNoNotificationsTitle - not shown

mClearButton - yellow

mSpnLabel - not shown

mPlmnLabel - cyan
[Android Themes] Ohsaka:
v0.3

Ok, here is version 0.3 of colorChange.jar

It supports setting each element I could find of services.jar independently.

Check the post above for a helpful chart of the elements...

Here is the new usage output when you run the jar with no arguments:

******************************************
** Color Changer v0.03_BETA by Ohsaka **
******************************************

Usages:
java -jar colorChange.jar <theme.zip> <AARRGGBB>
<theme.zip> - Android theme update file (not a full ROM update)
<AARRGGBB> - color value (AA is alpha channel)
Will change Ticker, Date, and Clock colors only

java -jar colorChange.jar <theme.zip> <Ticker> <Clock> <Date> <Ongoing> <Latest>
<No_Notifications> <Clear Text> <Network Name> <?Roaming?>

<theme.zip> - Android theme update file (not a full ROM update)
<Ticker Color> - ARGB color for ticker notifications on the status bar
Default: FF000000
<Clock Color> - ARGB color for the clock text
Default: FF000000
<Date Color> - ARGB color for the date
Default: FF000000
<Ongoing Color> - ARGB color for "Ongoing" Label
Default: FFFFFFFF
<Latest Color> - ARGB color for "Notifications" Label
Default: FFFFFFFF
<No_Notifications Color> - ARGB color for "No Notifications" Label
Default: FFFFFFFF
<Clear Color> - ARGB color for text on Clear Notifications button
Default: FF000000
<Network Name Color> - ARGB color for network name (T-Mobile usually)
Default: FF000000
<?Roaming Color?> - Not sure where this color shows up, possibly network name when roaming
Default: FF000000
[Android Themes] beagz:
How do you find the locations of the files to be altered?
[Android Themes] MontAlbert:
wow! awesome work!

Any chance you could look at the services.jar and services.odex in ion Magic/Sapphire rom to change..... services.jar does not have classes.dex in it.....

thanks
[Android Themes] Ohsaka:
If you read the output closely, it tells you what files it is messing with...

Its still just StatusBarIcon and StatusBarService inside services.jar.

You should see:

Finished editing the StatusBarIcon.smali file

Finished editing the StatusBarService.smali file

in the output when you run it. I tried to make the output very verbose. If you read it, it should sort of tell the story of what its doing...
[Android Themes] Ohsaka:
Ion is mean... they only provide the .odex file. No way to disassemble that one (that I know of).
[Android Themes] beagz:
Sorry I should have made the question clearer. How do you know which file to edit to start with?
[Android Themes] Ohsaka:
Heh, I think your asking how did I figure all this out in the 1st place?

I read the original android java source files...
[Android Themes] ultra spikey:
If I wanted to change the "clear notifications" text color...is this the command I'd run?

java -jar colorChange.jar update.zip Clear Text FFFFFFFF

(update.zip=theme, in the same folder as the colorChange files)

EDIT:

Well I tried a few different combinations of commands, the only one that gave me something was this...(copy and pasted from command prompt).

C:\Users\Jon\Desktop\ColorChange0.3>java -jar colorChange.jar update.zip FFFFFFF

F

******************************************

** Color Changer v0.03_BETA by Ohsaka **

******************************************

Made temp directory: C:\Users\Jon\AppData\Local\Temp\cc-temp

**** BEGIN SERVICES.JAR *******

found classes.dex

Executing in shell: java -jar baksmali-0.93.jar -o C:\Users\Jon\AppData\Local\Te

mp\cc-temp\framework\services C:\Users\Jon\AppData\Local\Temp\cc-temp\framework\

services\classes.dex

Finished un-dexing classes.dex

found line: .line 46

skipping line: const v6, -0x1

PANIC: skipped line was not what is expected!

Please report this to Ohsaka on xda-developers forum.
[Android Themes] bkmo:
If you look at the example he posted of the output of the command, there are conflicting commands for the clear notifications text. the commandline example says clear text, and the explanation example says clear color. Have you tried both of those?

EDIT: I cant get it to anything but display the usage example. No mater what commandline I feed it. 0.2 version worked fine for me. something like this I am trying:

java -jar colorChange.jar update.zip Clear Text FFd1f1c1c2
[Android Themes] MontAlbert:
Ohsaka,

I know the clock is changed within services.jar and date is changed within statusbar.xml... can you tell me where all the other stuff is changed within? (Please say anything but services.jar as with ion we cannot change that! :D )

thanks

Scott
[Android Themes] MontAlbert:
it would appear that most are in services.jar as i just tried to change them all to green but got nothing in the end.... just the date/notifications green..... bugger ion!
[Android Themes] MontAlbert:
just tried to edit a theme that i had done using the last version to make stuff white. this time i tried to make same stuff white as last time and the last 6 things blue. got the following error- i have attached log of it......it was a manup theme.....
[Android Themes] Ohsaka:
Sweet! You guys found a bug!!!

It shouldn't panic on that line and exit. My bad...

I will fix it.

There are only two ways to run it right now...

1) specify one color value

2) specify ALL color values

I think I will rework the command line to allow you to specify which ones you want to change by doing "date=fffffffff clock=fffff00 etc etc" Probably more user friendly that way...

Also bad news for Ion, everything is in services.jar except the ticker text color which is in status_bar.xml

I will fix the bug real quick now, and try to get the updated command line version out before I leave. We are taking my daughter to the circus today.

Edit: Ok, v4 has been attached.
[Android Themes] WebghostDK:
c:\Android>java -jar colorChange.jar update.zip FFFFFFFF

******************************************

** Color Changer v0.04_BETA by Ohsaka **

******************************************

Made temp directory: C:\Users\Peter\AppData\Local\Temp\cc-temp

**** BEGIN SERVICES.JAR *******

found classes.dex

Executing in shell: java -jar baksmali-0.93.jar -o C:\Users\Peter\AppData\Local\

Temp\cc-temp\framework\services C:\Users\Peter\AppData\Local\Temp\cc-temp\framew

ork\services\classes.dex

Finished un-dexing classes.dex

found line: .line 46

skipping line: const v6, -0x1

adding line: const v6, 0xffffffff

Finished editing the StatusBarIcon.smali file

found line: check-cast v7, Lcom/android/server/status/DateView;

skipping line:

adding line: const v8, 0xffffffff

adding line: <blank>

adding line: invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColo

r(I)V

adding line: <blank>

found line: .line 347

PANIC: skipped line was not what is expected!

Please report this to Ohsaka on xda-developers forum.

c:\Android>
[Android Themes] Ohsaka:
Is this a theme update for CyanROM 3.6.7.2?
[Android Themes] Ohsaka:
v5

Here is v5.

It supports an optional amount of command line arguments. You can specify from one to nine of the text color mods on the commandline in any order. Just don't forget to put the theme file first.

This application was built based off Cyan's 3.6.7.2 theme template file...

Also, this application (for now at least) assumes the update file hasn't had the colors modified yet. It will panic if the "extra" setTextColor calls already exist in the smali files...
[Android Themes] WebghostDK:
http://xdaforums.com/showthread.php?t=537634

Used this one for my Magic just for getting the modded services.jar file.

I modded my original stock ROM and made my own theme with Hero interface, which works quite well except for the darn! black time/date, which apparently cannot be fixed to white :( *buuuhuuuu*

So no, not CyanROM.
[Android Themes] Ohsaka:
Whoever is building that services.jar file is putting the .odex file instead of the classes.dex file. Maybe that phone only supports the .odex being there, I don't know. If I had the classes.dex file, I could modify it for you.
[Android Themes] WebghostDK:
heres the odex file

http://www.yousendit.com/download/Y1RxL0dNQ1BKV05MWEE9PQ

But you already tried before, take a look at my pms, its still black :-(

Do you have Gtalk?
[Android Themes] RainCrow:
Finally! I don't know why it took me so long to see this thread but now I have white clock/notification for a rogers build! X D Thanks ohsaka and mianosm!