[Q] Help decompiling framework-res.apk - Android Q&A, Help & Troubleshooting

Hey, i am a bit noob here decompiling, and compiling system apks, so now im trying to decompile framework-res.apk from my CM7 rom, and i get a 9.png errors when decompiling and another strange one when compiling.
The whole CMD window is attached.
I hope get some help with this, i also got it with CM9 framework.

bump
Sent from my SG Ace

That means the .9 pangs were made wrong. This happens when some tries to take the easy way to theme things. You will not be able to compile it until you fix them

zelendel said:
That means the .9 pangs were made wrong. This happens when some tries to take the easy way to theme things. You will not be able to compile it until you fix them
Click to expand...
Click to collapse
Its because of the theme?
How can i fix it?
Sent from my SG Ace

Adgoosuc said:
Its because of the theme?
How can i fix it?
Sent from my SG Ace
Click to expand...
Click to collapse
Yes its because of the theme. If yo look at each file it says is broken you will have to remake all those .9.pngs properly. A search will teach you how to do it. You will need the android SDK installed for sure for the .9.png tool.

Adgoosuc said:
Its because of the theme?
How can i fix it?
Sent from my SG Ace
Click to expand...
Click to collapse
You either have to edit the .9.png files with the draw9patch.bat file located in \android-sdk\tools.. and copy basically the pixel borders - put up two windows side by side - one stock and the one you are editing. And make sure you only have one new copy of that file in your drawable folder when done.. no normal .png's of the same name.
Or you could just "borrow" those .9.png files from another rom and use GIMP to basically edit the color only and save... just don't decompile them - use 7zip instead.

alteredlikeness said:
You either have to edit the .9.png files with the draw9patch.bat file located in \android-sdk\tools.. and copy basically the pixel borders - put up two windows side by side - one stock and the one you are editing. And make sure you only have one new copy of that file in your drawable folder when done.. no normal .png's of the same name.
Or you could just "borrow" those .9.png files from another rom and use GIMP to basically edit the color only and save... just don't decompile them - use 7zip instead.
Click to expand...
Click to collapse
Editing a .9 png like that is not the prper way to do it. He will just have issues if he tries to decompile it again. This is why alot o themes break when people try to decompile them to learn.
Take some time out OP and learn how to do it properly. The easy way is never right.

zelendel said:
Editing a .9 png like that is not the prper way to do it. He will just have issues if he tries to decompile it again. This is why alot o themes break when people try to decompile them to learn.
Take some time out OP and learn how to do it properly. The easy way is never right.
Click to expand...
Click to collapse
Which way is not proper? The 2nd suggestion was not intended to be a proper way, but it can work.. and the first way I suggested is what I would consider a good way to learn how to draw the patches - by comparison with known working ones..
EDIT - please elaborate on the not being able to decompile it again later though - I was aware of this issue and had come across it - but never new the cause.
EDIT 2 - I just noticed your stats - please share your seasoned wisdom... I have got a lot to learn yet...

Ok, i have a better way to do what i want, i jzut want to edif bools.xml inside values folder, so ill apply default theme, decompile and edit, and then i replace it.
Thanks to all who helped me!
Sent from my SG Ace

Adgoosuc said:
Ok, i have a better way to do what i want, i jzut want to edif bools.xml inside values folder, so ill apply default theme, decompile and edit, and then i replace it.
Thanks to all who helped me!
Sent from my SG Ace
Click to expand...
Click to collapse
The bools XML will be over writted when you flash the theme.

alteredlikeness said:
Which way is not proper? The 2nd suggestion was not intended to be a proper way, but it can work.. and the first way I suggested is what I would consider a good way to learn how to draw the patches - by comparison with known working ones..
EDIT - please elaborate on the not being able to decompile it again later though - I was aware of this issue and had come across it - but never new the cause.
EDIT 2 - I just noticed your stats - please share your seasoned wisdom... I have got a lot to learn yet...
Click to expand...
Click to collapse
Ok the 1 px boarder around the image has to be the last thing applied to an image. You can edit it with gimp and 7zip but that breaks the border settings. This is the reason most .9.pngs break when decompiled.

Related

need systemui decompiled

i have tried to decompile systemui.apk using apk manager but i always get an error. i can decompile framework-res.apk but systemui alwasy gives me an error. so is there anyone that can decompile it for me and just send me the decompiled folder and then i can just edit it and recompile it my self? i am looking for the stock systemui.apk i think i have the odex one. thanks
fcortes626 said:
i have tried to decompile systemui.apk using apk manager but i always get an error. i can decompile framework-res.apk but systemui alwasy gives me an error. so is there anyone that can decompile it for me and just send me the decompiled folder and then i can just edit it and recompile it my self? i am looking for the stock systemui.apk i think i have the odex one. thanks
Click to expand...
Click to collapse
No-one has been able to do this yet. We have been trying for a long time. There is just something about the ASUS systemui that doesn't play nice.
You could try this thread that I read earlier, you may have some luck with it, I haven't tried:
http://www.xda-developers.com/android/modified-apktool-for-troublesome-system-apks-on-ics/
Doktaphex said:
No-one has been able to do this yet. We have been trying for a long time. There is just something about the ASUS systemui that doesn't play nice.
You could try this thread that I read earlier, you may have some luck with it, I haven't tried:
http://www.xda-developers.com/android/modified-apktool-for-troublesome-system-apks-on-ics/
Click to expand...
Click to collapse
i use apk manager apk tools never works for me. it gives me an error when i type "apktool if framework-res"
how did some people change stuff for their roms if no one can decompile it?
fcortes626 said:
i use apk manager apk tools never works for me. it gives me an error when i type "apktool if framework-res"
how did some people change stuff for their roms if no one can decompile it?
Click to expand...
Click to collapse
The main themes are for non-asus ROMS, ie based on aosp. I believe reNeglect managed to figure something out with regards to ROMs based on asus firmware ie virtuous, but you would need to speak to him about that.
I don't know how forthcoming reNeglect will be, as people have not been giving him much love, and considering the amount of time and effort that he has spent working on his theme, I don't blame him for being pissed off.
Doktaphex said:
The main themes are for non-asus ROMS, ie based on aosp. I believe reNeglect managed to figure something out with regards to ROMs based on asus firmware ie virtuous, but you would need to speak to him about that.
I don't know how forthcoming reNeglect will be, as people have not been giving him much love, and considering the amount of time and effort that he has spent working on his theme, I don't blame him for being pissed off.
Click to expand...
Click to collapse
no there was an edited systemui.apk for the stock rooted prime with locked bootloader. but the only thing changed was the settings menu and clock was change from blue to black. i dont have cwm.

[Q] What is VRTHEME??

I saw lots of theme which has this in their title. but I can't find any guide or tutorial about this. So, what is this? how could I use it? has it any benefit over usual "decompile/theme/recompile/replace"ing an apk?Is there any script to implement it like apktool?
Its the universal theme flasher created by Villain ROM.
As for all your other questions I'm not sure.
Sent from my GT-I9100 using XDA
thanks,
correct me if I'm worng pls.
Universal theme flasher, is kind of template. and I should extract compiled PNGs and xmls from apk file and paste theme into that. and for editing theme, I need to paste and replace those files into the apk file and then decompile that apk.
then what should I do if I changed something in "values" folder? cause it just appears in decompiled apps and It can't be seen in a compiled app.
sam5154 said:
thanks,
correct me if I'm worng pls.
Universal theme flasher, is kind of template. and I should extract compiled PNGs and xmls from apk file and paste theme into that. and for editing theme, I need to paste and replace those files into the apk file and then decompile that apk.
then what should I do if I changed something in "values" folder? cause it just appears in decompiled apps and It can't be seen in a compiled app.
Click to expand...
Click to collapse
I think after compiling the apk, you should copy the "classes" and the other file *-) I can remember its name, and add them there.
Am not sure *-) I had this question too but I thought abt trying it first and if it doesnt work I wld ask. I have no time to try I have exams
Ba7rani123 said:
I think after compiling the apk, you should copy the "classes" and the other file *-) I can remember its name, and add them there.
Am not sure *-) I had this question too but I thought abt trying it first and if it doesnt work I wld ask. I have no time to try I have exams
Click to expand...
Click to collapse
classes.dex is for the smali that has been edited if there was any.
I assume that if the xmls were edited and they point to new PNG images/objects then the resources has been changed. I would say that in this case you would need to have an updated resources file for these adjustments? This could be pulled from your newly compiled .apk that you want to base your flashable theme off?
I am unsure if resources needs to be updated though for certain? I have flashed in the past new xmls and they worked fine, however these were not referencing any new sources or images...so my thoughts are that these mods I made didn't require this additional file?? I could be wrong. I really should read the thread about it here on XDA. I did a long time ago, but have come a long way since then.
I diverse. Try using it without new resources file and see what happens?
You may also like to looking into Morphing as well (very similar concept).
James
i would also like a explanation to what vrtheme is, all i know is that when i flash it IT NEVER WORKS!
xdarkmario said:
i would also like a explanation to what vrtheme is, all i know is that when i flash it IT NEVER WORKS!
Click to expand...
Click to collapse
is your ROM deodexede? It only works on deodexed Rom?
Sent from my GT-N7100 using Tapatalk 2
sam5154 said:
is your ROM deodexede? It only works on deodexed Rom?
Sent from my GT-N7100 using Tapatalk 2
Click to expand...
Click to collapse
yep, both my phones i tried them on are deodexed.

[REQUEST] Clock Color Change

I have been struggling with this procedure for the past couple of weeks and I am at my wit's end. I have tried both APKTOOL and APK Manager to decompile my SystemUI.apk and no matter how many ways I try to decompile it, there absolutely is no smali directory.
If I post my SystemUI.apk, would an experienced themer, developer, or modder be kind enough to edit the smali coding to make the clock a different color? I am happy with the icons and everything else; I just want the color change.
The color I was looking for is #33b5e5 (the ICS blue). I would appreciate any help someone would be willing to give. Thanks.
Higgs_Boson said:
I have been struggling with this procedure for the past couple of weeks and I am at my wit's end. I have tried both APKTOOL and APK Manager to decompile my SystemUI.apk and no matter how many ways I try to decompile it, there absolutely is no smali directory.
If I post my SystemUI.apk, would an experienced themer, developer, or modder be kind enough to edit the smali coding to make the clock a different color? I am happy with the icons and everything else; I just want the color change.
The color I was looking for is #33b5e5 (the ICS blue). I would appreciate any help someone would be willing to give. Thanks.
Click to expand...
Click to collapse
I will gladly do it for you right now.
Give me about 10 mins time.
EDIT: took a look at the apk, the reason why there is no smali folder is because you are using an odexed rom I believe. You have to be deodexed to be able to modify the smali inside system apks.
Sent using Tapatalk
klin1344 said:
I will gladly do it for you right now.
Give me about 10 mins time.
EDIT: took a look at the apk, the reason why there is no smali folder is because you are using an odexed rom I believe. You have to be deodexed to be able to modify the smali inside system apks.
Sent using Tapatalk
Click to expand...
Click to collapse
Thank you very much for your help.
Is there nothing that can be done?
Higgs_Boson said:
Thank you very much for your help.
Is there nothing that can be done?
Click to expand...
Click to collapse
You could deodex the apk, make your smali edits, re-odex it again, and then push both files into the correct directories, but it is a very annoying and tedious process.
You should flash a custom rom (all of them are deodexed) and make your smali edits from there.
Sent using Tapatalk

[Q] how to modify status bar and status bar icons?

Hi all,
Someone can tell me which apk or framework i have to edit to modify status bat color , battery icon, Wi-Fi icon etc... ?
Thank you
SystemUI.apk and framework-res.apk
Sent from my awesome fridge
darxsen said:
Hi all,
Someone can tell me which apk or framework i have to edit to modify status bat color , battery icon, Wi-Fi icon etc... ?
Thank you
Click to expand...
Click to collapse
Can't remember exactly which one but you want to mod these apks - settings, framework, lidroid, system ui, & if I remember right from htc devices.... also the Rosie.apk too. You're know which one controls what when you start searching!
Hope this helps & if so.... Press that thanks button :thumbup:
sent from my super modded Samsung Galaxy S3
deanr1977 said:
Can't remember exactly which one but you want to mod these apks - settings, framework, lidroid, system ui, & if I remember right from htc devices.... also the Rosie.apk too. You're know which one controls what when you start searching!
Hope this helps & if so.... Press that thanks button :thumbup:
sent from my super modded Samsung Galaxy S3
Click to expand...
Click to collapse
Those aren't needed, just the one I posted above.
Sent from my awesome fridge
MaartenXDA said:
Those aren't needed, just the one I posted above.
Sent from my awesome fridge
Click to expand...
Click to collapse
Just pull the 1 zip or 2 zips from the rom, & explore for you're self, I think its the system ui but could be wrong, I'm not near my computer at the moment to check so I can't say exactly which one it is? If you're gonna mod the battery icons you're gonna look inside anyway & I takes like 10secs to extract & search the apk? If you don't wanna do that, there are various apps in the playstore you can download for free to look at the framework pics from inside the apks without opening them! Hope this helps.... press thanks if it did
sent from my super modded Samsung Galaxy S3
deanr1977 said:
Just pull the 1 zip or 2 zips from the rom, & explore for you're self, I think its the system ui but could be wrong, I'm not near my computer at the moment to check so I can't say exactly which one it is? If you're gonna mod the battery icons you're gonna look inside anyway & I takes like 10secs to extract & search the apk? If you don't wanna do that, there are various apps in the playstore you can download for free to look at the framework pics from inside the apks without opening them! Hope this helps.... press thanks if it did
sent from my super modded Samsung Galaxy S3
Click to expand...
Click to collapse
Is this post meant for me?
Sent from my awesome fridge
darxsen said:
Hi all,
Someone can tell me which apk or framework i have to edit to modify status bat color , battery icon, Wi-Fi icon etc... ?
Thank you
Click to expand...
Click to collapse
As Maarten already pointed out SystemUI.apk and framework-res.apk. And if you want to use them in apktool you'll also need com.htc.resources.apk.
Just out of curiosity: are you going to use UOT or apktool? Been trying to change status bar clock colour on half-sense and fulmix (see my post in his thread) with apktool but haven't succeeded yet.
What are your plans on theming?
Just pull the zips & open using winrar? Thts what I've been doing for around 4yrs now
sent from my super modded Samsung Galaxy S3
deanr1977 said:
Just pull the zips & open using winrar? Thts what I've been doing for around 4yrs now
sent from my super modded Samsung Galaxy S3
Click to expand...
Click to collapse
That's just image editing.
If you want to theme it even further, you need to decompile it and edit .xml's and .smali's.
Sent from my awesome fridge
I want to modify just some png , i would a complete BuuF theme on my desire X..
However i would use apktool, because i always used it, but i think i have to try something else, because when i try to debuild Rom's apk it says: "bad magic number" or something similar..
R: [Q] how to modify status bar and status bar icons?
darxsen said:
I want to modify just some png , i would a complete BuuF theme on my desire X..
However i would use apktool, because i always used it, but i think i have to try something else, because when i try to debuild Rom's apk it says: "bad magic number" or something similar..
Click to expand...
Click to collapse
It gives you this errors because there is classes.dex file on it. Delete it and than decompile.
Dex files are most of them added by phone's company; for us HTC.
Sent from my HTC Desire X using xda premium
fulmix said:
It gives you this errors because there is classes.dex file on it. Delete it and than decompile.
Dex files are most of them added by phone's company; for us HTC.
Click to expand...
Click to collapse
Ok, but if i delete dex files when i rebuild the package will it work ?
Is there any room that allow to edit it theme? With a simple apk?
I hate work on others apk, mostly if these apk are HTC's apk U.U
darxsen said:
Ok, but if i delete dex files when i rebuild the package will it work ?
Is there any room that allow to edit it theme? With a simple apk?
I hate work on others apk, mostly if these apk are HTC's apk U.U
Click to expand...
Click to collapse
Open with WinRAR or 7-Zip delete classes.dex and than decompile with apktool.
Note: you do not have to extract apk to delete classes.dex file.
fulmix said:
Open with WinRAR or 7-Zip delete classes.dex and than decompile with apktool.
Note: you do not have to extract apk to delete classes.dex file.
Click to expand...
Click to collapse
Why would there be a need of deleting classes.dex? I've decompiled lots of HTC apps and they all worked fine.
Sent from my awesome fridge
MaartenXDA said:
Why would there be a need of deleting classes.dex? I've decompiled lots of HTC apps and they all worked fine.
Sent from my awesome fridge
Click to expand...
Click to collapse
Bad Mugic Number error is usually for this file.
Samsung, HTC, etc. have different dex files.
fulmix said:
Bad Mugic Number error is usually for this file.
Samsung, HTC, etc. have different dex files.
Click to expand...
Click to collapse
have i to put back .dex files ? or not?
darxsen said:
have i to put back .dex files ? or not?
Click to expand...
Click to collapse
It's not necessary.
But deleting it avoid the Bad Magic Number errors.
People, cause my brother has my same account I have to create my new one, so your fulmix now is xpirt
Sent from my HTC Desire X using xda premium
fulmix said:
It's not necessary.
But deleting it avoid the Bad Magic Number errors.
Click to expand...
Click to collapse
Can you prove this ??
Make a SystemUI.apk without classes.dex and put that in you ROM and release to all users to test. If it works, I will resign from making ROMs.
---------- Post added at 04:27 PM ---------- Previous post was at 04:24 PM ----------
darxsen said:
I want to modify just some png , i would a complete BuuF theme on my desire X..
However i would use apktool, because i always used it, but i think i have to try something else, because when i try to debuild Rom's apk it says: "bad magic number" or something similar..
Click to expand...
Click to collapse
Use latest apktool, bad magic value errors fixed in new version.
Refer to this for more info : http://forum.xda-developers.com/showthread.php?t=1642224
BTW... if it just some icons png that you need to change, just replace the pngs, decompile/recompile is not needed.
---------- Post added at 04:28 PM ---------- Previous post was at 04:27 PM ----------
darxsen said:
have i to put back .dex files ? or not?
Click to expand...
Click to collapse
SystemUI must have classes.dex; there is where all the instructions (the smali files) come from for the apk to work. Like what to run for the EQS and many more.
As mentioned on the link given above
Code:
b) If you are using apkmanager, you can just export classes.dex, then delete classes inside the apk. Then decompile, edit, compile and add classes.dex back when ready.
MaartenXDA said:
That's just image editing.
If you want to theme it even further, you need to decompile it and edit .xml's and .smali's.
Sent from my awesome fridge
Click to expand...
Click to collapse
Yeah you're right you can edit the xmls & smalis, I have never got the hang of that yet? I just do it the other way
darxsen said:
I want to modify just some png , i would a complete BuuF theme on my desire X..
However i would use apktool, because i always used it, but i think i have to try something else, because when i try to debuild Rom's apk it says: "bad magic number" or something similar..
Click to expand...
Click to collapse
I have made wicked themed roms on the desire hd & now on the samsung galaxy s3! I just pull the res folder then mod the pngs with photoshop & then push back to the zip & flash.... ok its not perfect but I've made sum sweet looking ui & systems by doing it that way
sent from my super modded Samsung Galaxy S3

[REQ] Help with edit SemcGenericUxpRes

hi, can anyone replace icons from archive to apk in archive ? http://www64.zippyshare.com/v/52683022/file.html because when I'm doing it and changing this app in system/app icons are stretched, I changed icons via WinRar because when I'm trying to de/recompile this app via apk tool and other similar applications I have errors and can't do it properly
regards
Yes... But I need the original .pngs (those are from a decompiled .apk) - you can obtain them easy just unzip that .apk using "7 zip". And the framework-res.apk from the same folder (framework) as SemcGenericUxpRes.apk you are trying to modify (because I need to install it in my "APK Multi-Tool", otherwise I can't recompile the .apk)
so here is my framework and original icons http://www16.zippyshare.com/v/11770168/file.html
XperienceD said:
Quick Tip: If all you want to do is edit or replace normal images, things like your Status Bar icons or Menu icons like those used in the main screen of Settings then decompiling IS NOT necessary, simply open the apk in a zip program then just drag and drop any replacement images in to the correct folder, for images like your actual Status Bar which may have a .9 at the end then decompiling IS required.
Note: It's important to use STORE as the compression method when replacing images in the apk.
Also Note: .9 pngs need to be edited ONLY when in the decompiled folder, if you just take a .9 png and edit it then you won't be able to see the borders that the system needs to determine how that image should be displayed. I have included links at the end of this post to help with .9 editing along with links to other various theming resources that I've come across and bookmarked.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
..
XperienceD said:
..
Click to expand...
Click to collapse
I'm noob at this, can you help me with edit these icons, please ?
Deleted
LaShto34 said:
I can help you. But I said to give me the original .png that you want to paste into SemcGenericUxpRes.apk. Those that you uploaded the first time was from a decompiled .apk, and the ones uploaded the second time (with framework-res.apk) are already included in SemcGenericUxpRes.apk. Give me those and I promise I'll give you SemcGenericUxpRes.apk in max. 10 minutes after.
Click to expand...
Click to collapse
http://www76.zippyshare.com/v/9442694/file.html
LaShto34 said:
I can help you. But I said to give me the original .png that you want to paste into SemcGenericUxpRes.apk. Those that you uploaded the first time was from a decompiled .apk, and the ones uploaded the second time (with framework-res.apk) are already included in SemcGenericUxpRes.apk. Give me those and I promise I'll give you SemcGenericUxpRes.apk in max. 10 minutes after.
Click to expand...
Click to collapse
thanks for your effort but I used tutorial from your link http://forum.xda-developers.com/showthread.php?t=2190716 and did it myself and it is working, thank you very much
godlesplay said:
http://www76.zippyshare.com/v/9442694/file.html
Click to expand...
Click to collapse
Here it is. Try it. I hope it will work. By the way I resized them a little, because they were not the same size as the ones from the original .apk.
Later...
OK. I'm very happy for you. Have a nice day. I used the same tutorial for recompiling...

Categories

Resources