styles.xml

xvenom89

Senior Member
Feb 5, 2008
307
1
0
Ohio
www.jimmyr.com
I have created a custom styles.xml I got from decompiling framework-res in CM6rc3, but am unable to recompile it. Apktool is unable to do this, from what I've heard. Anyone here able to do it? I'd appreciate any help.
 

invisiblek

Recognized Developer
Feb 24, 2010
1,584
5,894
0
Minnesota
www.invisiblek.org
you may end up having to hex edit the file, using the decompiled version as a guide. unless there is some way to compile it separately from the entire apk

this is what had i do to modify progress_horizontal.xml to change the progress bar color

EDIT: or from what ive seen, start with a non-themed framework-res.apk, or one that has been properly recompiled, make sure to decompile it and recompile when you are done
 
Last edited:

xvenom89

Senior Member
Feb 5, 2008
307
1
0
Ohio
www.jimmyr.com
you may end up having to hex edit the file, using the decompiled version as a guide. unless there is some way to compile it separately from the entire apk

this is what had i do to modify progress_horizontal.xml to change the progress bar color

EDIT: or from what ive seen, start with a non-themed framework-res.apk, or one that has been properly recompiled, make sure to decompile it and recompile when you are done
You see, the ONLY way to access this xml IS to decompile, as it's hidden in /res/values/styles.xml, which is invisible until you decompile the apk. Hex editing isn't necessary, as it is decompiled into plain english. I already edited it- I just need someone to compile the two for me, since apktool gives me errors.
 

invisiblek

Recognized Developer
Feb 24, 2010
1,584
5,894
0
Minnesota
www.invisiblek.org
You see, the ONLY way to access this xml IS to decompile, as it's hidden in /res/values/styles.xml, which is invisible until you decompile the apk. Hex editing isn't necessary, as it is decompiled into plain english. I already edited it- I just need someone to compile the two for me, since apktool gives me errors.
which is why you need to hex edit it, because you cannot compile it when you get errors like that.

one thing you could try, is to decompile the ORIGINAL framework-res.apk from the rom you are running, replace the styles.xml with yours, then recompile it. after it is recompiled, grab the compiled styles.xml out of it and put it into the framework-res that you are building
a modified framework-res cant be decompiled unless it was properly recompiled to begin with. which most themers do not do, or probably dont know about

just a thought, may or may not work. but you are kinda stuck with this because i dont think its possible to just compile one or two files out of the apk, i think its all or nothing
 

xvenom89

Senior Member
Feb 5, 2008
307
1
0
Ohio
www.jimmyr.com
which is why you need to hex edit it, because you cannot compile it when you get errors like that.

one thing you could try, is to decompile the ORIGINAL framework-res.apk from the rom you are running, replace the styles.xml with yours, then recompile it. after it is recompiled, grab the compiled styles.xml out of it and put it into the framework-res that you are building
a modified framework-res cant be decompiled unless it was properly recompiled to begin with. which most themers do not do, or probably dont know about

just a thought, may or may not work. but you are kinda stuck with this because i dont think its possible to just compile one or two files out of the apk, i think its all or nothing
I wasn't saying to compile one file from the apk- that's why I posted the entire thing, so you can decompile it, add my modified styles.xml to /res/values/ and then recompile.

Anyway, Thanks for the tip about recompiling an improperly compiled, themed apk. I'll test it on the original one shipped with rc3 and report back.
 

invisiblek

Recognized Developer
Feb 24, 2010
1,584
5,894
0
Minnesota
www.invisiblek.org
...decompile the ORIGINAL framework-res.apk from the rom you are running, replace the styles.xml with yours, then recompile it. after it is recompiled, grab the compiled styles.xml out of it and put it into the framework-res that you are building
a modified framework-res cant be decompiled unless it was properly recompiled to begin with. which most themers do not do, or probably dont know about
i can verify my theory here, it worked fine with progress_horizontal.xml, which means it should work with any xml