styles.xml - Droid Incredible Themes and Apps

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.

xvenom89 said:
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.
Click to expand...
Click to collapse
Yeah sure I do!

-deleted post-

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

invisiblek said:
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
Click to expand...
Click to collapse
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.

xvenom89 said:
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.
Click to expand...
Click to collapse
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

invisiblek said:
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
Click to expand...
Click to collapse
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.

dam im looking to compile my styles.xml too, any tips?

SiL3nTKiLL said:
dam im looking to compile my styles.xml too, any tips?
Click to expand...
Click to collapse
doesn't anyone read a thread before posting anymore? especially one that is less than one page long?
</rant>

invisiblek said:
doesn't anyone read a thread before posting anymore? especially one that is less than one page long?
</rant>
Click to expand...
Click to collapse
Unnecessary rant. He probably just phrased it wrong; like me, he wanted to add a customized styles.xml into framework-res by means of compiling.

invisiblek said:
...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
Click to expand...
Click to collapse
i can verify my theory here, it worked fine with progress_horizontal.xml, which means it should work with any xml

Related

[Q] Reverse Enginner and edit Manifest problem!

Hello wazzup!
Ive try this but still dont acomplish this:
Ive got a APK which i want to edit the manifest(like package, label name, such stuff)
if i open the APK with WINRAR the manifest is decoded so ive moved on:
Ive downloaded the APKTool to reverse the application to smali or what it is called and get the real AndroidManifest.XML
I open the reversed Manifest.XML with notepad and have edit the things i want.
Now i am not sure how to decode the manifest. Because it wont work if i put the manifest.XML and use the AUTOSign tool because it expect the manifest to be decoded.
So what do i do? or is there another way to edit the manifest?
Thank you!
Your Mate!
Idon't think it's that simple, I tried and it doesn't work, you need something like apktool to do this for you
http://code.google.com/p/android-apktool/ (with or without the easier to use shell apkmanager)
@wixi909
You have to build XML file back to binary format using apktool or similar tool.
Brut.all said:
@wixi909
You have to build XML file back to binary format using apktool or similar tool.
Click to expand...
Click to collapse
hmm...ihave apktool. but could you explain more please
wixi909 said:
hmm...ihave apktool. but could you explain more please
Click to expand...
Click to collapse
I don't understand: you know, how to decode apk using apktool, but you don't know, how to build it back? This is almost the same, but "apktool b" instead of "apktool d". Everything is in apktool's usage help.
Brut.all said:
I don't understand: you know, how to decode apk using apktool, but you don't know, how to build it back? This is almost the same, but "apktool b" instead of "apktool d". Everything is in apktool's usage help.
Click to expand...
Click to collapse
I know but how do i edit the manifest. im just able do edit the drawables.
Do you understand now?
wixi909 said:
Do you understand now?
Click to expand...
Click to collapse
No, I don't.
wixi909 said:
I open the reversed Manifest.XML with notepad and have edit the things i want.
Click to expand...
Click to collapse
wixi909 said:
I know but how do i edit the manifest. im just able do edit the drawables.
Click to expand...
Click to collapse
You have written in your first post that you have edited manifest, but don't know, how to put it back to apk file. Now you say you can't edit manifest.
Whole process is:
Decode apk using apktool.
Edit AndroidManifest.xml using any text editor.
Build apk using apktool.
Nothing less, nothing more.
I'm having a related issue..
I'm using apktool to decode my apk. I then edit my AndroidManifest.xml, and repack it using
apktool b name_of_folder
For some reason though, the Manifest isn't being saved with my edits. I'm using Text Editor on Windows to edit the Manifest.
I know that it is saved before running "apktool b" so it seems to be reverting to the original during the repacking script.
Any ideas?
phiredrop said:
I'm having a related issue..
I'm using apktool to decode my apk. I then edit my AndroidManifest.xml, and repack it using
apktool b name_of_folder
For some reason though, the Manifest isn't being saved with my edits. I'm using Text Editor on Windows to edit the Manifest.
I know that it is saved before running "apktool b" so it seems to be reverting to the original during the repacking script.
Any ideas?
Click to expand...
Click to collapse
How do you know your modifications aren't saved to manifest? Did you tried to decode new apk back and see whether your changes are really there? Or you just don't see changes on a device? What did you changed?
Brut.all said:
How do you know your modifications aren't saved to manifest? Did you tried to decode new apk back and see whether your changes are really there? Or you just don't see changes on a device? What did you changed?
Click to expand...
Click to collapse
Yes, I decode the modified apk and can see my changes aren't there.
Its worked for me before, so it's strange that it's not working now. Primarily I'm adding version:Code and version:Name so I can upload to the market. Would changing the package name and/or label cause this issue?
Sent from my SGH-T959 using XDA App

Themeing and CWM FLashable File

Hey guys/girls. I'm creating a theme for Andromeda 3 and one thing I cannot fifure out is how to make my theme CWM flashable to test it.
I opened the zip from a different flashable theme, replaced the framework-res.apk and twframework-res.apk with the modified ones from Andromeda and repackaged them using Winrar. I have followed the guides to resign the APK's and ZIP but no mater what I do, after a reboot I get a solid black screen and the phone vibrates.
Im not sure what I am doing wrong because I thought that was all that went into creating a CWM file.
Thanks in advance......
7 posts under this one
http://forum.xda-developers.com/showthread.php?t=1037842
the meta info is alot more specific than just swap any other files...
Thanks, I found that one about 5 mins ago but couldn't seem to find it when I searched the forum before posting. Must have missed it
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
modest_mandroid said:
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
Click to expand...
Click to collapse
Actually, I'm just opening the apk's with winrar. I make the changes to the folders/files and rezip them with Winrar with Store mode (no compression?) Then I resign them with testsign.jar.
I have read the themeing guides but they are really lacking in the small details dept.
modest_mandroid said:
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
Click to expand...
Click to collapse
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
If you are simply copying over files inside the apk and getting this error, then you are adding more files than was originally inside the apk. I repeat, DO NOT ADD FILES THAT ARE NOT ALREADY INSIDE UNLESS YOU KNOW HOW TO RE-COMPILE THE RESOURCES.ASRC!
Also, use 7-zip to edit apks when you just want to overwrite files. Never unzip, or re-zip. Just right-click > 7-zip > Open Archive > Drag and drop files > close the window > you're done
Edit: Also, this goes in Q&A not General.
ryude said:
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
If you are simply copying over files inside the apk and getting this error, then you are adding more files than was originally inside the apk. I repeat, DO NOT ADD FILES THAT ARE NOT ALREADY INSIDE UNLESS YOU KNOW HOW TO RE-COMPILE THE RESOURCES.ASRC!
Also, use 7-zip to edit apks when you just want to overwrite files. Never unzip, or re-zip. Just right-click > 7-zip > Open Archive > Drag and drop files > close the window > you're done
Edit: Also, this goes in Q&A not General.
Click to expand...
Click to collapse
Ok, thanks man.
Will I need to resign the final theme.zip before flashing it?
Also, can't I just grab the updater-script from another theme.zip and us it in my mine?
ryude said:
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
Click to expand...
Click to collapse
I didn't say anything about resigning? Apktool creates an entirely new, unsigned apk, which unless I'm extremely mistaken you'll need to use if you intend to modify certain resources.
modest_mandroid said:
I didn't say anything about resigning? Apktool creates an entirely new, unsigned apk, which unless I'm extremely mistaken you'll need to use if you intend to modify certain resources.
Click to expand...
Click to collapse
He doesn't need to use apktool, because he isn't edited any code.
timbrendelaz said:
Ok, thanks man.
Will I need to resign the final theme.zip before flashing it?
Also, can't I just grab the updater-script from another theme.zip and us it in my mine?
Click to expand...
Click to collapse
No, you don't have to sign CWM zips because Clockwork doesn't check for a signature.
You could use another updater-script, but the problem with that is if it tries to perform an action on a file or folder that isn't inside your zip it will crash while flashing. You'll be left with a bricked phone and have to ODIN back to restore.
ryude said:
He doesn't need to use apktool, because he isn't edited any code.
Click to expand...
Click to collapse
But what if he is lol? Cause that's what im trying to do and having some issues. Know of a good thread on this? Editing xml that is
Sent from my SGH-T959 using XDA Premium App
TXLunchbox said:
But what if he is lol? Cause that's what im trying to do and having some issues. Know of a good thread on this? Editing xml that is
Sent from my SGH-T959 using XDA Premium App
Click to expand...
Click to collapse
If you're editing code, I recommend using apk manager since it will automatically recompile the resources.asrc for you. Just make sure to downgrade the apktool that comes with it to 1.3.1, 1.3.2 is known to cause problems with xml edits.
1. Set new project apk.
2. Decompile apk, if it's a system apk use the option for dependency apk and use twframework-res.apk as the dependency apk.
3. Edit your xml files.
4. Recompile, when asked use yes twice. It will tell you to delete files in the Keep folder.
5. Delete the resources.asrc if you edited any xml/added new files. Delete the files that you added/edited.
6. Once you're done it will automatically copy over the signature and use the compression that you set (default level 9, I recommend level 0).
Don't worry that it says "unsignedFramework-res.apk", it will work since it's a system apk because system apk signatures get copied over to the new file. Just rename it to Framework-res.apk or whatever you need it to be called.
ryude said:
He doesn't need to use apktool, because he isn't edited any code.
Click to expand...
Click to collapse
Hence the 'if' in my original statement, you know, 'if' he ever chose to in the future.

[Q] Editing more than just images in Phone / contacts apks

Howdy all,
I am wanting to kno if there is anything special about editing certain system apps, do they all need to be signed with the same keys. i think i read this somewhere.
cause when i decompile the phone.apk then recompile with no changes / or with changes, signed it with autosigner or APK-Manager, it just FC's on the phone and i cant make sence of the logs...
oh and i tried pushing the file with adb and x10 mod tool, tried in the emulator, still no joys.
been googling for hours... and i feel i am searching for the wrong things...
Thanks in advance
Pvy.
you can use 7zip to browse the apk as an archive and replace png's and .9.png's inside the drawable folders.
you wouldn't have to resign the apk this way, but i would recommend zip-aligning the apk after you replace the png's.
i would also make sure you know how to work with .9.png's before replacing them. not doing .9.png's correctly will break the app.
I have edited the pngs there is no prob there I can put all the images in.
I am editing the xmls and the manifest... I tried drag and drop but it seems to break the apk...
Thanks tho.
Sent from my X10i using XDA App
Go ahead and compile with apk manager, say yes to 'is it a system apk?'.
Then open the new apk with 7zip and pull out the xmls, etc. you changed.
After that open the original apk w/7zip and drag in the compiled xmls along with your images.
That should work.
So I did this,
compiled phone.apk chose system app when it asked.
drag and dropped the 3 pngs I modded, and a few xml files, and the modded androidmanifest.xml to the original
Pushed it to my phone, rebooted...
But it wont install.
It appears the signing breaks.
Pvy
AyDee said:
Go ahead and compile with apk manager, say yes to 'is it a system apk?'.
Then open the new apk with 7zip and pull out the xmls, etc. you changed.
After that open the original apk w/7zip and drag in the compiled xmls along with your images.
That should work.
Click to expand...
Click to collapse
Sent from my X10i using XDA App
Changing default image
I wondered if anyone could help me out with this
Many thanks
pvyParts said:
So I did this,
compiled phone.apk chose system app when it asked.
drag and dropped the 3 pngs I modded, and a few xml files, and the modded androidmanifest.xml to the original
Click to expand...
Click to collapse
My suggestion is after doing this add the now modded original .apk into a flashable.zip and use xRecovery/FreeXperiaRecovery to install the app.
If you don't know how to make a flashable.zip just use 7zip to replace the phone.apk in a theme update.zip and delete any other folders/.apks that you don't want being reinstalled (framework-res etc.).
Not sure if this will work because I haven't tried this after modding .xml files, but it works after I make any other changes, even changing .9.pngs.
Best of luck, hope this works.
nope that didn't work either... took me a while but once i figured out the update.zip i got it going. and still no joy.
thanks heaps guys for all your help, i think i must have to compile from source or something silly like that...
I'll keep at it and let you all kno how i go...

theme help

can someone please help me I have edited the files I want edited and have used draw9 to set patches...but when I run the xultimate 9 patch compiler I get this error>>> C:\Documents and Settings\H\Local Settings\Application Data\7z.exe is not a valid Win 32 application and I don't know how to fix it...any help would be GREATLY appreciated!!
filthy1 said:
can someone please help me I have edited the files I want edited and have used draw9 to set patches...but when I run the xultimate 9 patch compiler I get this error>>> C:\Documents and Settings\H\Local Settings\Application Data\7z.exe is not a valid Win 32 application and I don't know how to fix it...any help would be GREATLY appreciated!!
Click to expand...
Click to collapse
not sure what going on there. but try this. instead of using ultimatex, decompile with apk manager, make your edits, then recompile the apk. when you use ultimatex to recompile a .9 it wont decompile properly when you want to make future edits.
apk manager
I was able to do this for tge framework but now I am trying to edit my message bubbles in the mms.apk and am honestly a little,confused on how to decompile and recompile apps....
filthy1 said:
I was able to do this for tge framework but now I am trying to edit my message bubbles in the mms.apk and am honestly a little,confused on how to decompile and recompile apps....
Click to expand...
Click to collapse
do you have apk manager??
gunnermike said:
do you have apk manager??
Click to expand...
Click to collapse
Yes sir sure do! Btw thanks for trying to help.
I answered your q&a thread too. Just re/install 7Zip.
Sent from my Droid Charge running GummyCharged 2.0
kvswim said:
I answered your q&a thread too. Just re/install 7Zip.
Sent from my Droid Charge running GummyCharged 2.0
Click to expand...
Click to collapse
I still had it installed while it was giving me an error but I will try.
no go
So I just reinstalled 7zip but it did the same error tried to use apk manager and it won't decompile cause it says I have to extract it first so I extracted it and tried to recompile it and I got error 21 with a bunch of missing images but there is nothing that I changed other than the .9.png's I am so confused that I may just live with a theme I dislike ....
filthy1 said:
So I just reinstalled 7zip but it did the same error tried to use apk manager and it won't decompile cause it says I have to extract it first so I extracted it and tried to recompile it and I got error 21 with a bunch of missing images but there is nothing that I changed other than the .9.png's I am so confused that I may just live with a theme I dislike ....
Click to expand...
Click to collapse
make sure you have the proper frameworks installed. 7z wont do you any good. put in "place here for mods" or something like that, the select option 9 to decompile. now, you cant have any extras. it theres one extra icon it wont recompile. so make sure you account for every icon that goesn in there.
gunnermike said:
make sure you have the proper frameworks installed. 7z wont do you any good. put in "place here for mods" or something like that, the select option 9 to decompile. now, you cant have any extras. it theres one extra icon it wont recompile. so make sure you account for every icon that goesn in there.
Click to expand...
Click to collapse
I don't have a framework....I am just trying to edit the bubbles in the mms.apk to start....and I keep getting an error that tells me check the log if I try to decompile or recompile the mms.apk
filthy1 said:
I don't have a framework....I am just trying to edit the bubbles in the mms.apk to start....and I keep getting an error that tells me check the log if I try to decompile or recompile the mms.apk
Click to expand...
Click to collapse
ok, you need to get some basics. head over to freenode channel #teamsbrissenmod. thats the best place to go to learn how to do this stuff. i will be on for a little bit.
I think i'm going to go there I would like to learn some basics!....*looks forward to some boot camp*
4G LTE Tapatalked
gunnermike said:
not sure what going on there. but try this. instead of using ultimatex, decompile with apk manager, make your edits, then recompile the apk. when you use ultimatex to recompile a .9 it wont decompile properly when you want to make future edits.
Click to expand...
Click to collapse
thats not really true...xultimate does the exact same thing when compiling .9s as if they were compiled with apktool or eclipse
a lot of the .9s i compile in windows (unfortunate byproduct of work) are with xultimate and the decompile fine later
same with android utility in linux
generally its fine to just use apktool to decompile, edit and recompile but this doesnt always work with some apks that just cant be decompiled without errors
nitsuj17 said:
thats not really true...xultimate does the exact same thing when compiling .9s as if they were compiled with apktool or eclipse
a lot of the .9s i compile in windows (unfortunate byproduct of work) are with xultimate and the decompile fine later
same with android utility in linux
generally its fine to just use apktool to decompile, edit and recompile but this doesnt always work with some apks that just cant be decompiled without errors
Click to expand...
Click to collapse
not doubting you, however i have never had a .9 that compiled with apkmanager or tool seperate during decompile, and where as not all .9's compiled with ultimate x seperate, many do. so...i just dont bother with ultimate x. when your apks decompile and recompile properly, it makes future edits much easier.

Rom building woes.

Ok, so i took the dive into trying to build a rom, I've broken pretty much everything possible. Thanks to the help from UOT kitchen though for helping me theme. I'm trying to use the 2.3.5 base but im having some problems with SystemUI.apk. I can decompile it, modify it, and when i build it the file errors out and is junk.
UOT kitchen decides to not set some of the settings i requested. The notifications dropdown SHOULD have black text but its white and cyan. I also want the text in the clear button cyan but rebuilding systemUI screws up saying theres a bad line of code but is vague on where it is. I've even decompiled and recompiled the systemui.apk without changing it and it fails.
I'm thinking of trying the la3 base and seeing what happens.
Screenshots below of my ventures and failures. The one IS of the 14 toggle mod, all themed, the other are the ics smilies themed as well. But as you can see the text on the notifications wont stick. I guess im getting somewhere for not knowing what im doing lol.
EDIT: Also, where is that damn phone icon .png at? ive themed browser, calendar, email etc. But the phone one is hiding...
One of the .9's could be messed up when you edited them. That's what happened to me. I didn't know how to fix it but what I did was I took the original unedited system.ui apk,decompiled and changed all the xml's first then recompiled. Then I just drag and dropped my edited images from the system.ui apk where I edited the images beforehand.
Sent from my SAMSUNG-SGH-I727 using XDA
mossination said:
One of the .9's could be messed up when you edited them. That's what happened to me. I didn't know how to fix it but what I did was I took the original unedited system.ui apk,decompiled and changed all the xml's first then recompiled. Then I just drag and dropped my edited images from the system.ui apk where I edited the images beforehand.
Sent from my SAMSUNG-SGH-I727 using XDA
Click to expand...
Click to collapse
I can decompile the systemui WITHOUT modifying it and then compile it and it still fails with the same error. Idk what it is. For images i dont decompile at all i just throw them in there. But when i mess with an xml thats when i compile.
Ive compiled other APK's fine. I dont know why that one hates me so much.
I'm sorry rains Im a disgrace I didn't even allow my lazy ass to release the update I promised well raais ill help u with this
Do you have GIMP image edit program? its a vital tool
The phone icon is in contacts.apk
(Ic_launcher_phone_icon) or something
EDIT: its a goood idea to decompile systemui.apk using apkmanager with the framework-res.apk also in the place here for modify folder
I'm out of it I can't think right anymore sorry my friend
Sent from my Skyrocket Running NexusMod 4.1b
R4INS said:
I can decompile the systemui WITHOUT modifying it and then compile it and it still fails with the same error. Idk what it is. For images i dont decompile at all i just throw them in there. But when i mess with an xml thats when i compile.
Ive compiled other APK's fine. I dont know why that one hates me so much.
Click to expand...
Click to collapse
If all you do is decompile and only mess with the xml's without modifying the images and then recompile but it still gives you errors then it has to be one of the xml's your editing that's causing it.
You probably already know that but thats all I can think of.
M0D1441 said:
I'm sorry rains Im a disgrace I didn't even allow my lazy ass to release the update I promised well raais ill help u with this
Do you have GIMP image edit program? its a vital tool
The phone icon is in contacts.apk
(Ic_launcher_phone_icon) or something
Sent from my Skyrocket Running NexusMod 4.1b
Click to expand...
Click to collapse
Long as you are in a better mood screw the update
And yeah im a full time linux user so i have gimp. I've been using it for all the .png files ive edited so far. And thanks for the phone icon location, i didnt get to the contacts.apk yet!
mossination said:
If all you do is decompile and only mess with the xml's without modifying the images and then recompile but it still gives you errors then it has to be one of the xml's your editing that's causing it.
You probably already know that but thats all I can think of.
Click to expand...
Click to collapse
I think the systemui file is just bad to begin with. Without edits it still craps out.
Wait so you tried decompiling and recompiling right after without edits? And it still didn't work? Then it must have to do with apk tool. Did you try replacing the "1" in the apk tool folder with framework-res.apk?
mossination said:
Wait so you tried decompiling and recompiling right after without edits? And it still didn't work? Then it must have to do with apk tool. Did you try replacing the "1" in the apk tool folder with framework-res.apk?
Click to expand...
Click to collapse
Yep, its total garbage. And i did apktool if framework-res.apk with the corresponding framework-res.

Categories

Resources