[ HELP ] Decompiling and recompiling stock ICS framework-res - Sony Xperia P, U, Sola, Go

Hallo, I tried a lot of apktools and aapts but I am unable to recompile framework-res Every time resources have diferent size than stock framework-res and I have no idea how to hack them. If some one allready hacked them please help here! Seems Sony using an totally new aapt tool which is not public? I tried to recompile framework-res without modifying them but every time I getting boot loop.

munjeni said:
Hallo, I tried a lot of apktools and aapts but I am unable to recompile framework-res Every time resources have diferent size than stock framework-res and I have no idea how to hack them. If some one allready hacked them please help here! Seems Sony using an totally new aapt tool which is not public? I tried to recompile framework-res without modifying them but every time I getting boot loop.
Click to expand...
Click to collapse
framework from stock???

Yes
Note: mean about modifying xml files, not drag and drop from the one to the another... ! I have resigned all apks (including framework-res) and have no boot loop but framework-res can not be recompiled and signed, only signed! Allso drag and drop not working if xml files is modified! Hope you understand what I mean?

munjeni said:
Yes
Note: mean about modifying xml files, not drag and drop from the one to the another... ! I have resigned all apks (including framework-res) and have no boot loop but framework-res can not be recompiled and signed, only signed! Allso drag and drop not working if xml files is modified! Hope you understand what I mean?
Click to expand...
Click to collapse
Have U tried to drag 'n drop AndroidManifest.xml and META-INF folder from stock to modified framework-res and overwrite everything ( of course using archive manager )??
I needed to do this in my MIUI port ( CyanogenMod10 based ) for X8, because after every recompile I needed to copy them to not get bootloop

NeveHanter said:
Have U tried to drag 'n drop AndroidManifest.xml and META-INF folder from stock to modified framework-res and overwrite everything ( of course using archive manager )??
I needed to do this in my MIUI port ( CyanogenMod10 based ) for X8, because after every recompile I needed to copy them to not get bootloop
Click to expand...
Click to collapse
No, I have success in resigning unmodified stock framework-res, so META-INF have no sense because new META-INF is signed by new key and its working! There is problem with "format" ...seems Sony have his own aapt and apktool which making totaly diferent "format" than apktool and aapt that we using. I tried many of the aapt | apktool but .arsc have totaly diferent size (allso png files is with totaly diferent size)... !

Have u used the apk manager by diamondback??
http://forum.xda-developers.com/showthread.php?t=1619473

I am working in Linux machine!

munjeni said:
I am working in Linux machine!
Click to expand...
Click to collapse
have you figured out the problem yet??
and one thing I wanted a favour........
I wanted to change the rotation fix for your MIUI to back to its original state..... decompiled the framework-res.apk from the MIUI and changed the some values in framework-res/res/values/bools.xml and then recompiled it and when I replaced it with the default one I was getting the status bar of different width from the original..... it was almost double..... I also tried by just replacing some images just for test and the same thing happened........
Can you tell me whats the problem is????

Hey bro,
Even I was stuck with this issue for a while I think it was Spaun_Studio who found out how to fix this issue Its basically to do with apktool not bundling the required nxt drawables as needed Anyway, Here's the fix :
1) After decompiling, go to apktool.iml and delete the following lines :
usesFramework:
ids:
- 2
Click to expand...
Click to collapse
2) Go to res/values and open styles.xml. There, delete all references to sonyericcson.uxp:drawable (Delete the entire line)
Then, compile and it will work
Credits to Spaun_Studio and not me for the idea
Cheers

@[email protected] said:
have you figured out the problem yet??
and one thing I wanted a favour........
I wanted to change the rotation fix for your MIUI to back to its original state..... decompiled the framework-res.apk from the MIUI and changed the some values in framework-res/res/values/bools.xml and then recompiled it and when I replaced it with the default one I was getting the status bar of different width from the original..... it was almost double..... I also tried by just replacing some images just for test and the same thing happened........
Can you tell me whats the problem is????
Click to expand...
Click to collapse
Seems you missing something!

Min3r said:
Hey bro,
Even I was stuck with this issue for a while I think it was Spaun_Studio who found out how to fix this issue Its basically to do with apktool not bundling the required nxt drawables as needed Anyway, Here's the fix :
1) After decompiling, go to apktool.iml and delete the following lines :
2) Go to res/values and open styles.xml. There, delete all references to sonyericcson.uxp:drawable (Delete the entire line)
Then, compile and it will work
Credits to Spaun_Studio and not me for the idea
Cheers
Click to expand...
Click to collapse
Thanks mate for info, I will try soon! Its looking like problem you mentioned!

munjeni said:
Thanks mate for info, I will try soon! Its looking like problem you mentioned!
Click to expand...
Click to collapse
If you can help with the steps it would be great....... IF you are free then please help........ Thanks....

Related

Decompiling DefaultThemes.apk

Hello,
I want to decompile the DefaultThemes.apk ! However,decompiling with apk manager 4.9 gives an error !
I dont want to just change the images,but add another theme !
What can be done ?
probably the best solution would be enable the cyanogenmod themes manager and install that theme...
nicom.mt said:
probably the best solution would be enable the cyanogenmod themes manager and install that theme...
Click to expand...
Click to collapse
But that isn't possible on stock ROM right ?? What to do for stock ROM ?
dont need to decompile, just change files using 7zip
metalrawk said:
dont need to decompile, just change files using 7zip
Click to expand...
Click to collapse
I want to add a theme,not replace existing !
defaultheme.apk need dependencies for being decompiled which is framework-res.apk and SemcGenericUxpRes.apk
you can find them on /system/framework
I do not use apkmanager so can't tell you the way to do it but with apktool i do this
Code:
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
peexl said:
defaultheme.apk need dependencies for being decompiled which is framework-res.apk and SemcGenericUxpRes.apk
you can find them on /system/framework
I do not use apkmanager so can't tell you the way to do it but with apktool i do this
Code:
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
Click to expand...
Click to collapse
Hello,thanks ! I was able to decompile the apk successfully. However,I added the desired files for new theme,added the ids,and edited the smali files ! I then recompiled it and signed it. However,after pushing it to the phone,it doesn't work,just a blank screen is displayed ! Here is my apk ! What shall I do to make it work ?
Thanks !
Edit : It is working after restarting phone,however new theme doesn't show up in themes menu,only old ones are shown !
i have this eror too...
decompile apkmanager v5.0 send log: cant find framework resourse of parkage of id:2.You must install proper framework file, see project wedsite for more info.??
How can i decompile this defaultthemes.apk?
sr my bad english..!
Solution?
What I do is using Root Explorer.apk I extract the file while on the phone (it automatically unfold it in a new folder called extracted). I copy the original files to a TMP folder in case I delete or make mistake with the original files when copy them over.
I then connect the phone via USB and change the files thats need to be changed and then I unplug the USB cable and again using the Root Explorer.apk I choose to zip it again. An from there I rename the new file to *.apk
Hope it helps
guys please help...i like too much defaultthemes but i did everything and they don't take effect to my phone...mini pro 2.3.7 mcm7 v21 i put them in the system/app change perm but nothing...maybe cause i have a theme from themechooser or something...in the start i didn't replace the default themes.apk there wasn't anything there... any ideas???thanks
nitsakh said:
Hello,thanks ! I was able to decompile the apk successfully. However,I added the desired files for new theme,added the ids,and edited the smali files ! I then recompiled it and signed it. However,after pushing it to the phone,it doesn't work,just a blank screen is displayed ! Here is my apk ! What shall I do to make it work ?
Thanks !
Edit : It is working after restarting phone,however new theme doesn't show up in themes menu,only old ones are shown !
Click to expand...
Click to collapse
how did yu decompile it? please tell me too.. i use apk manager!
Aarush said:
how did yu decompile it? please tell me too.. i use apk manager!
Click to expand...
Click to collapse
Use the following commands with apktool to decompile ::
Code:
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
apktool d DefaultThemes.apk

[Q] framework compile error

i have a problem to decompile an apk, it's the framework-miui-res.apk, when i try to decompile with apktool it give me a warning (W: Cant find 9patch chunk in file: "drawable-hdpi/popup_item_single_normal.9.png". Renaming it to *.png. ) anyways it decompile all the files and i can edit it, but whan i try to compile it's a completly mess, give me a lot of errors
i was googling it , and i found that the error is because there are two files with the same name in xml files, i try to replace it, rename it, using different tools and version of apktool, making "apktool if", but i just can't make it compile. any ideas?
Huncriter said:
i have a problem to decompile an apk, it's the framework-miui-res.apk, when i try to decompile with apktool it give me a warning (W: Cant find 9patch chunk in file: "drawable-hdpi/popup_item_single_normal.9.png". Renaming it to *.png. ) anyways it decompile all the files and i can edit it, but whan i try to compile it's a completly mess, give me a lot of errors
i was googling it , and i found that the error is because there are two files with the same name in xml files, i try to replace it, rename it, using different tools and version of apktool, making "apktool if", but i just can't make it compile. any ideas?
Click to expand...
Click to collapse
Your problem was stated on the decompile. The .9 issue will throw up errors on everything when it is the only thing wrong. Might want to ask on the MIUI site
already did that, but there's no answer
Huncriter said:
already did that, but there's no answer
Click to expand...
Click to collapse
Have you tried fixing the .9 png ?
yeap, it creates two files when decompile, one is 9.png but is trash(0kb) and the other is the .png file, i try to rename the png (with 9.png) delete the 9.png file but it didn't work.
also i decompile another framework-miui-res.apk from another rom(without error) , extrac the 9.png replace in my rom and still no work.
Huncriter said:
yeap, it creates two files when decompile, one is 9.png but is trash(0kb) and the other is the .png file, i try to rename the png (with 9.png) delete the 9.png file but it didn't work.
also i decompile another framework-miui-res.apk from another rom(without error) , extrac the 9.png replace in my rom and still no work.
Click to expand...
Click to collapse
Ok just renaming the png to a .9 will not work. .9 pngs are special made pngs with a special border system. Can you decompile and recompile the apk without the error?
zelendel said:
Ok just renaming the png to a .9 will not work. .9 pngs are special made pngs with a special border system. Can you decompile and recompile the apk without the error?
Click to expand...
Click to collapse
no, that's the problem, but i can decompile the framework-res-miui from another rom and extract the 9.png
can you try it? i let the framework at top
Huncriter said:
no, that's the problem, but i can decompile the framework-res-miui from another rom and extract the 9.png
can you try it? i let the framework at top
Click to expand...
Click to collapse
Sorry I don't touch anything from MIUI. There are a few threads around. Search for an MIUI themeing thread and they should be able to help you.
zelendel said:
Sorry I don't touch anything from MIUI. There are a few threads around. Search for an MIUI themeing thread and they should be able to help you.
Click to expand...
Click to collapse
, thanks, and no there's no thread with the solution for this, and i think the problem is not only in miui roms, and have other apps that i cant compile
i wonder if there is another way to compile wthout using apktool
Huncriter said:
, thanks, and no there's no thread with the solution for this, and i think the problem is not only in miui roms, and have other apps that i cant compile
i wonder if there is another way to compile wthout using apktool
Click to expand...
Click to collapse
The only two choices are using apktool or compiling it from the source code and making your changes and using apktool. What version of android is it for? ICS needs 2 versions. One to decompile and one to compile. I have themed every OS version I have used and with the right searching and some trial and error it has always worked. Including ics
it's based on android 2.3.7, and try that also(using 1.4.2 to decompile and 1.4.3 to compile)

[Q] apktool

Hey guys just wondering if you guys can point me in the right direction to a apktool that is working on the s3.
I've attempted to extract and set the framework.apk and decompile systemui.apk, which worked fine but when compiling the modded file I'm getting errors..
Wont compile with out any modifications either..
Any tips and comments will be appreciated... excuse my grammer as I'm writing this on my phone.
I managed to recompile framework-res.apk with apk tool however it boot looped so not convinced.
Do you have to decompile with dependencies with samsung frameworks?
Sent from my GT-I9300 using Tapatalk 2
rootSU said:
I managed to recompile framework-res.apk with apk tool however it boot looped so not convinced.
Do you have to decompile with dependencies with samsung frameworks?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
I'm not sure to be honest... hopefully someone can clear this up for us !
https://docs.google.com/open?id=0Bx7xmGB4IFU7bHNSdUtaWjFTOVMtN1VjZnJBcUFWUQ
framework-res.apk won't compile with samsung based roms...i don't know why but in most cases it doesn't.
Make sure to press the thanks button.!!!!
Thanks for the tip, although not being able to recompile SystemUI.apk is a different issue all together..
Iv tried setting framework.apk & twframework-res.apk from the stock firmware which came with my phone.. attempted to compile.. fails.
Iv got a feeling this is going to be something silly..
EDIT: Something has come to mind, iv only ever been able to decompile systemUI for CM9 based roms.. forgot were working with stock Samsung.. last time I had this issue I hit a brick wall pretty much apktool couldnt decompile sammy systemUI .. this may have changed.
rohan999 said:
https://docs.google.com/open?id=0Bx7xmGB4IFU7bHNSdUtaWjFTOVMtN1VjZnJBcUFWUQ
framework-res.apk won't compile with samsung based roms...i don't know why but in most cases it doesn't.
Make sure to press the thanks button.!!!!
Click to expand...
Click to collapse
There was a way of doing it where there was one apktool.jar for decompile and another for recompile. It seemed to work for me but it was not successful.
I'll create my own thread.
I need some help on this too. APKTOOL is not taking if apktool framework-res.apk in CMD. Any ideas? I'm just trying to decompile SystemUI.apk, lol. It shouldn't be this hard.
I have a big problem.
When i use untouched original framework-res and systemui, i can decompile and compile but only when i made no changes.
when i got the framework-res and systemui from my checkrom to mod some xmls ican decompile. but i can not compile
I`ve a look to my pathes but there correct.
My phone SGS3 with checkromV4
AndroidGraphix said:
I need some help on this too. APKTOOL is not taking if apktool framework-res.apk in CMD. Any ideas? I'm just trying to decompile SystemUI.apk, lol. It shouldn't be this hard.
Click to expand...
Click to collapse
apktool work fine here!
i guess you should mount twframework-res.apk in apktool
Code:
apktool if twframework-res.apk
apktool if framework-res.apk
I've managed to compile both SystemUI and framework-res using APK manager for ICS.
Sometimes when you try to use a FW res or system ui from a custom or themed rom you will get errors because of the customizations they made to them. That's why a lot of time they will tell you to start with a stock fw or systemui.
For example, when I tried to recompile a themed FW res (JB domination) I got errors, when I used a stock "virgin" copy it was fine.

[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...

[Q][Help] Recompile/Decompile apk's

Hi guys !
I'm having a problem recompiling the systemui.apk, i'm modding some .xml files and everything goes fine, it recompiles ok but when i push it to my phone there's no change i decompile the modified apk and the xml files aren't change either it's like i didn't change anything from them.
Every single time a recompile an apk it goes back to normal
Does anyone else has that problem or is just me , and does someone knows how can i fix that problem?
INFO :
Windows 8 pro
Using : Apktool , Auto apktool and tickle my android (in all of them i get that same problem)
Thanks in advance, regards
Give the Command Prompt Editing section a read, might clear it up. - [Advice/Reference/Guide] The Definitive APK Modding & Theming Thread...
XperienceD said:
Give the Command Prompt Editing section a read, might clear it up. - [Advice/Reference/Guide] The Definitive APK Modding & Theming Thread...
Click to expand...
Click to collapse
Already read it and that's what i've been doing, and like i said the changes aren't saved. Every time i delete o put some codes in the xml file with notepad++ i save them but after i recompile the apk i decompile it again to check if everything's alright but the files look like the original ones.
monster30 said:
i decompile it again to check if everything's alright but the files look like the original ones.
Click to expand...
Click to collapse
Is this apk in the dist folder?
XperienceD said:
Is this apk in the dist folder?
Click to expand...
Click to collapse
Yep. I really don't know why i can't make it work a week ago i didn't have this problem. (i didn't change anything in my laptop etc)
Sent from my WT19i using xda premium
..
monster30 said:
Yep. I really don't know why i can't make it work a week ago i didn't have this problem. (i didn't change anything in my laptop etc)
Sent from my WT19i using xda premium
Click to expand...
Click to collapse
here, pls try this to de-/recompile using his TuT; BUT recompile TuT has a bug:
''apktool b -f -d semcmusic.apk ( can be whatever name you give to your apk )'' <-- justtype in without ''.apk'' --> will work
i use this mostly bcuz for me, it dont maked any problem's (like some other tools), also allways work
bejunk said:
here, pls try this to de-/recompile using his TuT; BUT recompile TuT has a bug:
''apktool b -f -d semcmusic.apk ( can be whatever name you give to your apk )'' <-- justtype in without ''.apk'' --> will work
i use this mostly bcuz for me, it dont maked any problem's (like some other tools), also allways work
Click to expand...
Click to collapse
i tried that one a couple of times and it didn't worked ,right now i try it again and the changes were saved but when i push it to my phone the status bar was gone (i did copy the META.INF folder to the new apk)
monster30 said:
i tried that one a couple of times and it didn't worked ,right now i try it again and the changes were saved but when i push it to my phone the status bar was gone (i did copy the META.INF folder to the new apk)
Click to expand...
Click to collapse
and this apktool says recopiling was fine??
also: which rom is this systemUI from; what for a mod u will do?? (will try it on my pc, maybe the problem is win8 ?)
bejunk said:
and this apktool says recopiling was fine??
also: which rom is this systemUI from; what for a mod u will do?? (will try it on my pc, maybe the problem is win8 ?)
Click to expand...
Click to collapse
Yep, the recompile goes ok. I wanna change the toggle icons and wanna move the icons in the status bar.
And actually ticklefish already help me with that and when i push it nothing happen either, so i don't think it's a prob with win8 cuz before i didn't had that problem, it started this week
The systemUi is from honami i1 rom from aneel, i already install the framework from the rom.
Sent from my WT19i using xda premium

Categories

Resources