How to recompile framework-res.apk - General Questions and Answers

I decompiled it and eveything I just can't get it to show up. What am I doing wrong

Related

styles.xml

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

[Q] [HELP]xml editing with apk manager

ok, i must be missing something here. can anyone one help? everytime i decompile an apk, i'll open the xml i want to make changes to and make the necessary changes. i then recompile the apk. i flash the file to my phone and no changes have been made. because of this i have pulled the same apk back from the phone that i modified, decompiled it and none of the xml changes i made are incorporated.
i've tried removing the resources.arsc as the instructions say and i just get bootloops after flashing. when leaving the resources.arsc the phone boots and no xml changes are made.
can someone help me out with this?

Anyone managed to change style.xml and recompile/add resources.arsc

Tried everything I can find and no luck with this with Sony framwork-res.apk doing my head in, My new resources.arsc is alwyas about 200kb smaller aswell after recompiling, furthest ive got is bootanimation then restart lol. Anyone had any luck with it? All i need to change is 1 bloody line in style.xml to change bottom popup menu to black, driving me mad lol
go3asy said:
Tried everything I can find and no luck with this with Sony framwork-res.apk doing my head in, My new resources.arsc is alwyas about 200kb smaller aswell after recompiling, furthest ive got is bootanimation then restart lol. Anyone had any luck with it? All i need to change is 1 bloody line in style.xml to change bottom popup menu to black, driving me mad lol
Click to expand...
Click to collapse
Have you followed this guide to the letter?
I changed the progressbar_horizontal.xml in my framework using this guide and it worked!
yeah , changed that worked fine but the style.xml file isnt viewable unless you decompile the apk then when you recompile the folder value with style.xml is compiled into the above file resources.arsc and not had any luck with it at all lol
Try asking Mr.Rusch or Calum?
Sent from my X10a using XDA App
go3asy said:
yeah , changed that worked fine but the style.xml file isnt viewable unless you decompile the apk then when you recompile the folder value with style.xml is compiled into the above file resources.arsc and not had any luck with it at all lol
Click to expand...
Click to collapse
Hmm style.xml is not viewable but also not any other .xml is viewable or readable if you do not decompile.
So I return to My_Immortal's initial question. Have you followed calum's guide about decomipling/recompiling the resources to the letter? What about the part where you take the .asrc file from the unsigned.apk and you chose to add it to the copmressed .zip file (which is the original signed apk that you have renamed). Have you done that exactly as you should?
_calum_ said:
This will create a new framework-res.apk in a subfolder out.
IMPORTANT: Do not push this apk to your phone unless you want to reflash
Extract the xml files and images from the newly generated apk (you can use the original images, but the xml files must be the newly compiled ones from the new apk). Add these files to the original framework-res.apk that you want to push to your phone (see the previous post).
Extract the resources.arsc from the root of the apk
Rename the original framework-res.apk from your theme to framework-res.zip
Right-click the extracted resources.arsc and choose the 7zip menu item ‘Add to archive’
In the dialog that appears set the achive field at the top to the framework-res.zip from step 7. And set the archive format to zip. Now set the Compression level to store and click OK(if you do not do this your phone will not boot). The settings are in the attached screenshot.
Rename framework-res.zip to framework-res.apk and double check that the compressed size or resources.arsc is the same as the original size (see screenshot)
Done. Push the new framework to your phone.
Click to expand...
Click to collapse
Its tge re compiling tgatsvthe problem aleays get sources not founf error in apktool. Read that it might be im not using fresh framework files tgat havent already been fiddlef eith but dont have any originnalsat the moment they all gave battery mod
Sent from my X10i using XDA App

Re-Compile Framework-res.apk = Bootloop

Helo, sry for noobish thread but i can's solve my problem. This method allways work for me using Zte blade. But now on Xperia Arc it doesn't.
Im trying to change somethink in framework (values) , but first i try to re-compile framework to check. And what ? i got bootloop.
Im using
ApkMultiTool 1.0.6
ApkManager 5.0.2
apktool.jar
signapk.jar
First i decompile this clean stock framework (o errors), then i try to compile (0 errors, no changes inside framework) and i got bootloop.I sign new framework and put it in my rom zip file. Then i try to make it manualy, so i run ms command line :
java -jar apktool.jar d framework-res.apk
java -jar apktool.jar b framework-res.apk
Then Sign manualy :
java -jar signapk.jar certificate.pem key.pk8 framework-res.apk signedframewok-res.apk
AND ? BOOTLOOP :////////////////////
same prob
OmenHTX said:
Helo, sry for noobish thread but i can's solve my problem. This method allways work for me using Zte blade. But now on Xperia Arc it doesn't.
Im trying to change somethink in framework (values) , but first i try to re-compile framework to check. And what ? i got bootloop.
Im using
ApkMultiTool 1.0.6
ApkManager 5.0.2
apktool.jar
signapk.jar
First i decompile this clean stock framework (o errors), then i try to compile (0 errors, no changes inside framework) and i got bootloop.I sign new framework and put it in my rom zip file. Then i try to make it manualy, so i run ms command line :
java -jar apktool.jar d framework-res.apk
java -jar apktool.jar b framework-res.apk
Then Sign manualy :
java -jar signapk.jar certificate.pem key.pk8 framework-res.apk signedframewok-res.apk
AND ? BOOTLOOP :////////////////////
Click to expand...
Click to collapse
same prob here too happening.....i cant able to change theme....!!
Before decompiling you mmust install the .apk use this command:
Cd C:/.. navigate to your framework-res.apk
Once you in the folder where it is located use this command to 1)install:
Apktool if framework-res.apk
2)Decompile:
Apktool d framework-res.apk
3)Recompile:
Apktool b framework-res
4) new .apk is in .../framework-res/dist/
I think you forgot to install the .apk
Sent from my GT-I9001 using xda app-developers app
Diablob555 said:
Before decompiling you mmust install the .apk use this command:
Cd C:/.. navigate to your framework-res.apk
Once you in the folder where it is located use this command to 1)install:
Apktool if framework-res.apk
2)Decompile:
Apktool d framework-res.apk
3)Recompile:
Apktool b framework-res
4) new .apk is in .../framework-res/dist/
I think you forgot to install the .apk
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
If he didn't install the apk, he wouldn't be able to not even decompile correctly.
OP: I also have this problem, but from what I read, after you recompile, you need to open the new and the old apk with WinRar or 7-Zip, copy the resources.src (or something like that) from the original framework-res.apk to the modified framework-res.apk. I read that this should do the job. I'm going to try that myself later when I get home. Good luck for you.
Sent from my LT26i with Tapatalk 2
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
This simple comment of yours gave peace to my soul... THANK YOU SO MUCH!!!!!!
:laugh::laugh::laugh::laugh::victory::victory::good::good::good:
Great solution !!!!
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
sorry for a 6 month later post, but i'm having the same problem and this solution isn't making sense to me..
edit: holy **** it worked
i compile first, I just drag them into the newly compiled apk
thank you!
eris72 said:
sorry for a 6 month later post, but i'm having the same problem and this solution isn't making sense to me..
edit: holy **** it worked
i compile first, I just drag them into the newly compiled apk
thank you!
Click to expand...
Click to collapse
For me it is not working. My phone keeps looping after rebooting it.
I tried with 7zip and winrar and it is not working.
1.- Decompile with apktool1.4.2
2.- Compile with apktool1.4.3 (in this step i was editing eri.xml I need to edit this file, but also without editing this file I have the same result)
3.- Drag the META-INF and AndroidManifest.xml from the original apk to the newly created one with 7zip(also tried with winrar)
4.- push the file to the phone (system/framework)
Actually right after pushing it I get an error message saying Unfortunately, C has stopped.
What am I missing?
Did you fix permissions before pushing back to system/framework
dutchmaster18 said:
Did you fix permissions before pushing back to system/framework
Click to expand...
Click to collapse
I decompiled and compiled, both processes with the latest version and that solved my problem
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
really thank you worked for me!!!!
Helped........
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
Thank you...it helped me to overcome a problem i was unable to solve....thank u very much...:good::good::good::good::good::good:
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
Four years later and you're still saving frustrated XDA'ers.
Thank you!
Five hours of Googling and I finally have success.
Anyone know of a quicker workaround?
framework-res re/compile, push to phone
Hi have the problem with bootloop after overwrite framework-res.apk to /system/framework
use apktool2.2.2
phone note 3 with phronesis rom
I made
1.apktool if framework-res.apk (0 error)
2. decompile apktool d framework-res.apk (0 errors)
3. changed color.xml and styles.xml (only changed color text)
4. from orginal framework-res.apk drag resources.arsc to decompiled folder
5.make re-compile (apktool b framework-res) (0 errors) after this, program created new folder BUILD and DIST, in /build/apk/is META-INF, android manifest,RES folder and resources.arsc
Now i tried ( with tutorials ) drag from orginal framework-res.apk, folder META-INF, AndroidManifest.xml to BUILD folder and recompile second time (0 errors) then, from DIST folder i took framework-res.apk and overwrite to phone/system/framework and reboot = bootloop
Also trying after 1st re-compile, drag META-INF and androidmanifest.xml from orginal framework-res to newly recomplied framework-res.apk in DIST folder, again overwrite in phone/system/framework but still bootloop
before overwrite make permission rw-r--r- the same permisson of orginal framework-res.apk
then overwrited my apps example touchwiz, google play has stopped, reboot but unfortunately booloop
Any solution? ^^ thx
DrMalaN said:
framework-res re/compile, push to phone
Hi have the problem with bootloop after overwrite framework-res.apk to /system/framework
use apktool2.2.2
phone note 3 with phronesis rom
I made
1.apktool if framework-res.apk (0 error)
2. decompile apktool d framework-res.apk (0 errors)
3. changed color.xml and styles.xml (only changed color text)
4. from orginal framework-res.apk drag resources.arsc to decompiled folder
5.make re-compile (apktool b framework-res) (0 errors) after this, program created new folder BUILD and DIST, in /build/apk/is META-INF, android manifest,RES folder and resources.arsc
Now i tried ( with tutorials ) drag from orginal framework-res.apk, folder META-INF, AndroidManifest.xml to BUILD folder and recompile second time (0 errors) then, from DIST folder i took framework-res.apk and overwrite to phone/system/framework and reboot = bootloop
Also trying after 1st re-compile, drag META-INF and androidmanifest.xml from orginal framework-res to newly recomplied framework-res.apk in DIST folder, again overwrite in phone/system/framework but still bootloop
before overwrite make permission rw-r--r- the same permisson of orginal framework-res.apk
then overwrited my apps example touchwiz, google play has stopped, reboot but unfortunately booloop
Any solution? ^^ thx
Click to expand...
Click to collapse
1. apktool if framework-res.apk
2. decompile apktool d framework-res.apk
3. change color.xml and styles.xml
4. apktool b framework-res
5. drag from the NEW (dist folder) framework-res.apk this files (with zip editor): -res folder, -resources.arsc, -classes.dex (if you edited the smali too) to the OLD framework-res.apk
6. Now you can use the 'old' framework-res.apk with your phone, but now with your modifications.
I hope its help you. Sorry for the long time delay, but i just find now this therad
Make sure that you put the original manifest and meta folder back into the apk before pushing it. There's no need to resign unless you modify the manifest, all you should have to do is open the newly compiled app with winrar and add the contents of the originals folder. (Which is the manifest and meta folder)
Sent from my KYOCERA-C6745 using Tapatalk
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
THANK YOU!!!
kong said:
You shouldn't sign any system apks, instead just copy over the META-INF folder and AndroidManifest.xml from original framework-res.apk to the newly compiled one.
Click to expand...
Click to collapse
Thanks... Your suggestion worked for me :good::good:
RealWelder said:
Make sure that you put the original manifest and meta folder back into the apk before pushing it. There's no need to resign unless you modify the manifest, all you should have to do is open the newly compiled app with winrar and add the contents of the originals folder. (Which is the manifest and meta folder)
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
Well that didn't work for me , im still getting bootloop

Help with recompile framework-res.apk

I decompiled the apk and it brought up a framework-res folder. I tried a few ways to recompile but I never see the recompiled apk what am I doing wrong

Categories

Resources