yashsingh1/xdaforums huggingface dataset:
[Android Themes] jdwme:
well, this works great. I was able to use it tonight to modify the theme I'm building, which uses a services.jar that hasn't been released to the public by stericson yet, but it is based on cyan's source. Glad this tool came out, saved me a lot of work from having to do it manually :)
[Android Themes] jonnybueno:
Can't wait to see what you're gonna come up with... when i first rooted my g1, Carbon glow was my favorite theme!!
[Android Themes] Ohsaka:
Glad I could help! What is your theme going to be called? I will be sure to check it out.
[Android Themes] jonnybueno:
This works for CM 3.9.7
[Android Themes] jairomeo:
I'm running 3.9.8 and for some reason it's not working for me. All the jar's are in the right spot and all the commands work, it generates the theme-new.zip but when I apply the zip nothing is changing, my clock and date are still black.

I'm typing in

java -jar colorChange.jar theme.zip ticker=FFFFFFFF date=FFFFFFFF
clock=FFFFFFFF

Any reason why they wouldn't be changing?
[Android Themes] mianosm:
Still working out on 3.9.9
[Android Themes] david1171:
i will cry when this quits working for cyanogen's rom.
[Android Themes] mbiza:
works in 3.9.9.1, if it's possible to use it with the normal user in linux it would be perfect, i don't like to see that folder "tmpcc-temp" in the root directory
[Android Themes] nabzilla1990:
keeps saying baksmaili-0.93 needs to be in the same directory what files need to be in the directory that this is being done
[Android Themes] david1171:
put it in the path that shows up when you open a command prompt. like for me it says C:\Users\David\ so i put it into the folder david. try that and see if it helps
[Android Themes] xidominicanoix:
also make sure that smali is in that same directory
[Android Themes] pershoot:
ya same here. i even put them in jre/lib, and stil no dice.

edit: got it. it wants smali-0.92 along with baksmali-0.93 and testsign.jar in the same folder as the zip.

here is the output:

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

** Color Changer v1.0 by Ohsaka **

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

Made temp directory: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cc-temp

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

found classes.dex

Executing in shell: java -jar baksmali-0.93.jar -o C:\DOCUME~1\ADMINI~1\LOCALS~1

\Temp\cc-temp\framework\services C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cc-temp\fram

ework\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.

line=

line= invoke-virtual {v1, v7}, Lcom/android/server/status/ExpandedView;->find

ViewById(I)Landroid/view/View;

line=
[Android Themes] david1171:
to anyone having problems check out this post it has a version not dependent on baksmali/smali being in same directory
[Android Themes] pershoot:
reverted completely back to stock themplate. used the new file.

works like a charm.

thx:)
[Android Themes] Ohsaka:
Just ran it on the 4.0 template file while waiting for 4.0.1.

Didn't get any errors, so there are hopefully no changes required to support 4.0.1....
[Android Themes] david1171:
i didn't get any errors with the 4.0.1 template, but i have not had a chance to flash it yet because 4.0.1 has not finished booting on my phone so i will update this post when i get the results of flashing my theme.

edit: well its going to be a while. the md5sum for my download was not the same as the one he posted, so i am having to wait for hopefully a complete download of 4.0.1

edit2: it works with 4.0.1 yaaay =D
[Android Themes] jairomeo:
Im still having a problem with it not editing my Services.jar I know this works for everyone else, but I don't know why I am getting errors. The only thing it updates is the ticker for me

************************************
** Color Changer v1.0 by Ohsaka **
************************************

Made temp directory: c:\temp\cc-temp

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

found classes.dex
Executing in shell: java -jar baksmali-0.93.jar -o c:\temp\cc-temp\framework\services c:\temp\cc-temp\framework\services\classes.dex

Finished un-dexing classes.dex

java.io.FileNotFoundException: c:\temp\cc-temp\framework\services\com\android\server\status\StatusBarIcon.smali (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at com.ohsaka.ColorChange.modifyServicesColor(ColorChange.java:280)
at com.ohsaka.ColorChange.main(ColorChange.java:221)
ERROR: deleting orig file: StatusBarIcon.smali
ERROR: renaming file: StatusBarIcon.smali to StatusBarIcon.smali-new
Finished editing the StatusBarIcon.smali file

java.io.FileNotFoundException: c:\temp\cc-temp\framework\services\com\android\server\status\StatusBarService.smali (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at com.ohsaka.ColorChange.modifyServicesColor(ColorChange.java:324)
at com.ohsaka.ColorChange.main(ColorChange.java:221)
ERROR: deleting orig file: StatusBarService.smali
ERROR: renaming file: StatusBarService.smali to StatusBarService.smali-new
Finished editing the StatusBarService.smali file

Executing in shell: java -Xmx512M -jar smali-0.92.jar c:\temp\cc-temp\framework\services -o c:\temp\cc-temp\framework\services\classes.dex

Finished re-dexing classes.dex

Deleted dex out directory
Rezipped services.jars

**** END SERVICES.JAR ******

No change to ticker color, skipping framework-res.apk

updated zipFileName=C:\sdk\tools\jk-v3.0-cm4.0.1-new.zip
Executing in shell: java -cp testsign.jar testsign C:\sdk\tools\jk-v3.0-cm4.0.1-new.zip

Finished resigning update file

Automagic complete! Enjoy. -- Ohsaka
[Android Themes] xidominicanoix:
i was able to run colorChange.jar successfully using FFFFFFFF for everything except 'clear' which i used FF000000 ... then when checking out the result i seem to still have something in black (which becomes unreadable)

It's where it says "USB Connected" and "Missed Call" :(

can someone point me in the right direction in turning this white :)
[Android Themes] xidominicanoix:
make sure that the theme you are using has not had its Service.jar modified before (i.e. use the theme template)
[Android Themes] beagz:
I believe those may be controlled in individual apps. Ask armyranger251 in the DarkHero thread.
[Android Themes] xidominicanoix:
even the "USB Connected" .. damn that sucks .... thanks for the reply tho :D
[Android Themes] jairomeo:
I actually just figured out, there was something wrong with the baksmali file, apparently it didnt finish downloading. I tried to run the commands for baksmali itself and it gave me an error. redownloading fixed it.
[Android Themes] mianosm:
Here is an updated colorChanger.jar (no dependencies: you do not need any other jars in the workind directory for signing/baksmali/smali):

This works without the need for root/sudo permissions, and should also be cross platform compliant (windows/linux).

colorChanger.jar with no dependencies.
[Android Themes] sir*mez:
go into framework-res.apk, then res/layout. your looking for 2 .xml's 1. status_bar_expanded.xml and 2. status_bar_latest_event_content.xml enter you hex numbers there. i hope i helped you out.
[Android Themes] xidominicanoix:
yup this plus armyranger251's advice helped out bigtime :)
[Android Themes] Ohsaka:
Thanks, I assume you used fat-jar or something on it. I updated the first post.
[Android Themes] daveid:
I too am trying to work this out, I found the files to modify, and changed everything except for the color for ongoing downloads (not that important), and for ongoing music from the stock player. I just can't find the last code I need to change to get those right.

I was hoping people could share the hex locations of the codes that need changing in this thread, in the hopes that the color_change.jar could be updated to modify all of these colors... is that possible?

If not, could someone point me in the right location to get this last color changed?
[Android Themes] Binary100100:
Not working with 4.0.2

I just tried this with 4.0.2 and I'm stuck at the ANDROID screen.

I found this in logcat:
[Android Themes] beagz:
I tested it with the original colorchange.jar and had no problems with 4.0.2
[Android Themes] Binary100100:
What did you change?

I'm also using the original.

java -jar colorChange.jar theme.zip ticker=FFFFFFFF clock=FFFFFFFF date=FFFFFFFF clear=FFFFFFFF
[Android Themes] beagz:
All those plus the ongoing.

Did you use a theme template amd include services.jar?

Dumb? But we all miss things
[Android Themes] Binary100100:
Of course. In fact I made a bat file so that all i need to do is drop it in the folder and rename it to theme.zip. It's always worked before and it didn't come up with anything unusual this time either. But now that I'm trying other things, I'm wondering if it is this or Launcher. I'm using the advance Launcher with his ROM and I tried to flash JUST his rom and pushed the advance Launcher from recovery. I didn't modify the framework at all and I'm getting the same thing so far. It's been 20 minutes and I'm still looking at ANDROID.
[Android Themes] beagz:
I've notoced that pushing launcher.framework or settings by themselves without a template does odd things
[Android Themes] Binary100100:
I'm playing around with things as we speak. I was able to flash .2 in just a couple of minutes but i was getting acore fc b/c i was using the adv launcher.

I just now pushed it over to see if it boots. If it doesn't... it's the launcher.

If it does then I'll just push the framework files over and see if that works.
[Android Themes] drpfenderson:
For some reason, ticker color won't change for me with 4.0.2.
[Android Themes] jiqqaman:
can someone help me out on this one, this is what i did

I first tried

C:\Users\Jose\Desktop\Theme\4.2\all-black-everything>java -jar colorChange.jar black.zip ticker=FF696969 date=FF696969 clock=FF696969

************************************
** Color Changer v1.0 by Ohsaka **
************************************

ColorChange: MaxMemory to small: Please add -Xmx512m to the command line

C:\Users\Jose\Desktop\Theme\4.2\all-black-everything>

so I did, and this is what i got

C:\Users\Jose\Desktop\Theme\4.2\all-black-everything>java -jar -Xmx512m colorChange.jar black.zip ticker=FF696969 date=FF696969 clock=FF696969

************************************
** Color Changer v1.0 by Ohsaka **
************************************

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

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

found classes.dex
un-dexing...
Finished un-dexing classes.dex

found line: .line 46
skipping line: const/high16 v6, -0x100
adding line: const v6, 0xFF696969
Finished editing the StatusBarIcon.smali file

found line: check-cast v7, Lcom/android/server/status/DateView;
skipping line:
adding line: const v8, 0xFF696969
adding line: <blank>
adding line: invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V
adding line: <blank>
found line: .line 347
found line: .line 349
found line: .line 351
found line: .line 352
found line: .line 354
found line: .line 355
Finished editing the StatusBarService.smali file

re-dexing...
Finished re-dexing classes.dex

Deleted dex out directory
Rezipped services.jars

**** END SERVICES.JAR ******

**** BEGIN framework-res.apk ******

textColor pattern found at offset: 2808
textColor pattern found at offset: 2944
Finished editing the status_bar.xml file

Rezipped framework-res.apk
Deleted unzipped framework directory

**** END framework-res.apk ******

updated zipFileName=C:\Users\Jose\Desktop\Theme\4.2\all-black-everything\black-new.zip
Finished resigning update file

Automagic complete! Enjoy. -- Ohsaka

C:\Users\Jose\Desktop\Theme\4.2\all-black-everything>

When I try to apply the theme this is what i get:
[Android Themes] david1171:
check and see if there is an update-script included in your theme. if not then you will need to grab one. i would suggest from a fresh download of your theme template or the rom it is for.
[Android Themes] mianosm:
You need a good /META-INF
[Android Themes] rob.turner:
Trying to theme CyanogenMod 4.0.2, having the same problem here. Just started using colorchange.jar v1.0 (aka CC1.0 from here on in) today, previously used 0.5 with no problems. First time I've needed the -Xmx512m option, added this to my JRE settings. Changed ticker, clock, date, ongoing, latest and none to FFFFFFFF. CC1.0 ran fine, no errors, re-zipped and signed with no errors. When i tried to apply my newly colored theme, I got the "can't find update script" error. I looked in the new theme zip to check my META-INF, and here's where my problem is. The original META-INF (dated 02-28-2008, standard for all the Cyanogen roms/themes)is there, plus a new one, only the first letter is clipped off. Same goes for the app and framework folders. The folder list inside the new theme zip looks like this:

ETA-INF
META-INF
pp
ramework

i checked the cc-temp folder created by CC1.0 and all the folders are named correctly. The misnamed folders were all created when CC1.0 re-zips the theme. I extracted the misnamed folders, renamed them with the proper names, and added them back to the theme zip, resigned, and everything flashed ok. Anyone have any idea what's going on here?
[Android Themes] damnitpud:
I did the same thing, opened the new .zip CC1 makes and dragged in the files from the temp folder, deleted all of the folders missing the first letter then resigned.

Just finished the flash and it is all working fine now.

Strange bug, eh!
[Android Themes] rob.turner:
Yeah, strange, also kind of a pain in the ass to have to theme, then color, then unpack, then fix, then repack, then resign, too. I liked it much better when all I had to do was theme and color. I'm almost tempted to go back to 0.5, it seemed to work with the latest CyanogenMods. I know Ohsaka said he's not really going to maintain it anymore past the current 1.0, and I'm by no means any good at Java coding (I wouldn't even know where to begin looking for the bug), so I guess we just have to wait until this annoy's someone who knows what they're doing enough that they decide to fix it.
[Android Themes] mianosm:
Are you using the one that I posted from github?

I have never seen directories/folders lose characters before...
[Android Themes] rob.turner:
I am, but I went ahead and downloaded a fresh copy and tried it again, got the same results.
[Android Themes] jdwme:
ok so what's going on with this and 4.04, I'm assuming it's working for people, I haven't messed with it since 3.8, and now I'm getting errors, here's what I'm getting

************************************
** Color Changer v1.0 by Ohsaka **
************************************

Made temp directory: C:\Users\JOHN&S~2\AppData\Local\Temp\\cc-temp

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

found classes.dex
un-dexing...
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, 0xFF000000
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.
line=
line= invoke-virtual {v1, v7}, Lcom/android/server/status/ExpandedView;->find
ViewById(I)Landroid/view/View;
line=

saw this msg on the boards a couple of posts back but said it had something to do with smali/baksmali not in the right directories, mine are, also tried the one that has no dependencies and still a no go. :( any clues?
[Android Themes] david1171:
@jdwme are you trying to modify an already modified classes.dex file in services.jar, if you are it will give you that error. try it on the template and see if it works. this worked for cm 4.0.4 for me on three different themes
[Android Themes] beagz:
I always keep a .zip called theme.zip in the same folder. Whenever a new version is release I just copy framework-res.apk and services.jar into that template. Then I run colorchange and pull the files out of the theme-new.zip and place them into the real theme template.

That way I never mix up the files.
[Android Themes] jdwme:
I tried with a non modified file and it didn't work, i'll try on my linux book later and see how that goes, I need to move everything over there anyway
[Android Themes] mianosm:
It works with the current templates (4.0.4).

Use the colorchanger on the template first.
[Android Themes] rob.turner:
Found a version of CC 1.0 that fixes the misnamed folder bug. I tried out ultra spikey's theme porter today, which comes with what I presume to be the original version of CC v1.0 (requires smali-0.92.jar, baksmali-0.93.jar, testsign.jar, displayed different output during undexing and redexing). It worked properly, no misnamed folders, so I guess my OS (windows 7 rc1) just doesn't like your no dependencies/github version.
[Android Themes] beagz:
I got that error when using Stericson's modified file. You have to use a base cyanogen file then apply Stericson's updates. It won't work on the one for the new lockscreen.
[Android Themes] drpfenderson:
This will need to be update for 4.1.4 and all donut-based builds now.
[Android Themes] mianosm:
I only use: clock/date/ticker/

It looks like StatusBarIcon.smali is fine.

So it's the other one that needs to be corrected:

found line: .line 351
PANIC: skipped line was not what is expected!
Please report this to Ohsaka on xda-developers forum.
line= const/4 v1, 0x0
line=
line= const/4 v2, 0x1

Not a big thing.
[Android Themes] Ohsaka:
The changes in 4.1.4 build have moved around the content of the services.jar file.

Here is a link to a test version of the color change jar for any experimental theme devs.

http://xdaforums.com/showpost.php?p=4488244&postcount=215

Either post here or there with your results...
[Android Themes] Ohsaka:
I see that JF released new versions of baksmali and smali jar files.

You can download version 0.95 of the files from here:

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

This new version of colorchange is going to be 2.0 and require the newer 0.95 libraries. It ONLY works on the new donut versions of Cyan template theme, which is 4.1.4 experimental and later...

Once he goes stable I will update the first post on this thread...
[Android Themes] drpfenderson:
Working fine now. :)

Can't wait until the smali/baksmalis and testsign are self-contained on this one. Guessing that will be when it hits stable, but until then running them from the same directory is a fine-enough workaround to me. ;)
[Android Themes] Ohsaka:
Glad to hear it. Usually mianosm will circle around and apply the "fat jar" process to it that makes it all self contained.
[Android Themes] mianosm:
Hey, I figured out the issue with Windows getting names cut off too - it's due to substrings being pulled for file names...

Lots going on at the moment outside of the xda world though, might take a little bit to get this packaged back up again (with corrections for substrings).

Care to post a diff Ohsaka, I have the source from the last time - but haven't done any of the checking to see exactly which value has been moved (from what line to another line)?
[Android Themes] brandenk:
Worked perfect for me on 4.1.5
[Android Themes] Ohsaka:
Basically the line numbers moved around...

// ongoing color
if (line.contains(".line 277")) {

// latest color
if (line.contains(".line 279")) {

// no notifications color
if (line.contains(".line 281")) {

// clear button text color
if (line.contains(".line 282")) {

// roam? text color
if (line.contains(".line 284")) {

// network text color
if (line.contains(".line 285")) {

Other than that I changed the code to use the newer 0.95 baksmali and smali libraries...

Unfortunately I don't have a diff...
[Android Themes] beagz:
Worked fine here. No problems or errors.
[Android Themes] david1171:
i can confirm the new colorChange.jar working on 3 themes based off of the cm 4.1.5 template.
[Android Themes] Ohsaka:
Thanks for the confirmations. I went ahead and updated the first post with the test version since the file link is about to go off the last page of the thread...
[Android Themes] beagz:
A huge thank you!!!
[Android Themes] Ohsaka:
No problem mon. I do it cause I like coding, not for the recognition!
[Android Themes] mianosm:
No dependencies:

http://cloud.github.com/downloads/faux/Android-Theme-ColorChanger/colorchange-0.3.jar

Thanks to Faux.
[Android Themes] Newbie16:
I'm trying to turn the status bar text white but editing it manually had no effect and when i tried the colour changer it produced errors.

Can someone please tell me what i'm doing wrong? did i make an error when creating the update.zip? i don't intend to use the update.zip i just made it so that colorchanger would work.

is there a guide on how to change these values manually?
[Android Themes] DAKIDD236:
(off topic), does anyone know where the lockscreen file is located in cm 4.1.5 and higher?
[Android Themes] rob.turner:
Hate to report that I just tried this one on a fresh CM 4.1.7 theme and it's still dropping characters during the re-zip. Substring bug again? Looks like I'm doomed to using the smali/baksmali dependencies.
[Android Themes] mianosm:
Sorry I forgot to do the testing on Windows again, it is a sub-string issue on windows.

I'll look at it later today possibly.
[Android Themes] mianosm:
Faux got it: http://github.com/faux/Android-Theme-ColorChanger/downloads

3.1 is now fat jar (no dependencies), and should work on both windows/linux without a problem now. : )

Let me know, I tested it and it seemed to work, but I'm not applying the altered themes...
[Android Themes] rob.turner:
Everything is working as it should now, no more dropped chars. Thanks for looking into that. One thing I did notice when running the command line is that the extracting and rezipping of the theme template is done in verbose mode, not silent like it was before. Don't know if this is intentional or not. The initial explosion of "Extracting: app/[app].apk" lines spooked me for a bit until the script slowed down long enough for me to see what was going on.
[Android Themes] mianosm:
I'm a huge fan of knowing what is happening and why, sorry about the explosion of text on you, might be a neat feature to allow a command line option for verbose or silent I suppose.

I'll message Faux and forward your suggestion.

Glad that the jar works on both sides correctly now. : )
[Android Themes] psjames:
notification text

Is it possible to also include the ability to change the color for the notification drop down, I believe that the files that need to be changed are status_bar_latest_event.xml and status_bar_latest_event_content.xml.

Paul
[Android Themes] matt_stang:
I haven't been able to get this to work at all yet. I got it to kind of work but

now I'm getting this:

ColorChange: MaxMemory to small: Please add -Xmx512m to the command line
[Android Themes] mianosm:
So do it?

It would be like this:

java -Xmx512m -jar colorchanger.jar update.zip clock=FF00FF00 date=FF00FF00 ticker=FF00FF00

;)

Might help you out better. : )
[Android Themes] Ohsaka:
The major minor version error means you are using an old version of java... upgrading to the latest 1.6 version of java should fix it...
[Android Themes] Ohsaka:
I tried doing it with the .smali files awhile back, but I need to add code. And adding code is alot harder than modifying existing code when its disassembled...

I will take a look at those xml files and see if anything can be done.