• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Boost Mobile] [DEV] Decompiling and recompiling framework-res.apk...

mercury0x000d

The ultra-modern operator
Okay, guys, please... please help if you can!! Desperation is setting in lol

I'm trying to decompile, then subsequently recompile framework-res.apk. I am able to decompile without any problem, and I can also recompile with no errors, however when I go to boot with the modded file installed, I get a bootloop in every case. I can de-/re-compile normal system apps, but for some amazingly strange reason, nothing is working with framework-res.apk. I've tried everything I can think of, which is a long list including:

-trying different tools (e.g. APKTool, APK Manager and Virtuous Ten)
-trying different versions of framework-res.apk taken from different stock ROMs (B08, B08C, B10G)
-trying different signing methods (unsgned, signed with original signature, signed with test signature)
-using Logcat to see where things go wrong inside the APK, but this doesn't kick in until the phone has already booted, and with framework-res.apk messed up, it never fully boots for me to get a good Logcat reading
-using different OSs (WinXP and Win7)
-installing the modded file using ADB, TWRP, and manually (which usually causes an instant reboot or a string of FC messages)
-tried using different dependant APKs (none, systemui.apk, framework-res, framework.jar)
-tried consulting videos, tutorials and references from many different places on teh interwebz
-compiled with both API levels for GB 2.3 and 2.3.3
-tried compiling the file making no changes, with the same result

I have noticed that the combination which gets me the furthest is using VTS with test signature and no dependent APK, also called a framework key in this software. But even this ultimately results in a bootloop.

I've burned up so many complete days off trying to figure this out, it's not even funny. I've PMed several folks (and still may try a couple more) who I thought would have some experience with this issue, but I'm still in the same boat. They've made some great suggestions, but unfortunately nothing is seeming to work properly in my case.

If anyone is up for it, I can provide any and all files and/or apps I'm using to try to get this done.

All I know is that I'm reaching the end of my big bag o' ideas, and it's getting really, really frustrating. Thanks in advance for any input on the issue. :eek:
 
Last edited:
Are you copying the meta-inf folder and the androidmanifest.xml from the original apk? Also make sure you have the latest apktool. Those were my two problems when I started de/recompiling apks.
 
Are you copying the meta-inf folder and the androidmanifest.xml from the original apk? Also make sure you have the latest apktool. Those were my two problems when I started de/recompiling apks.

You know, I was just coming back here to post this beautiful, wonderful post made by kong over at XDA:

http://forum.xda-developers.com/showthread.php?t=1806602#5

which helped me finally overcome this framework stupidity that I've been having. Your advice aligns with his and is therefore equally awesome!




And now that I finally have a modified framework-res.apk running in my ROM, I have to take this time to say:

WOOOOHOOOOOO!!!

All this time, I've been fighting this problem :fight: getting frustrated :dontknow: about ready to give up or take other avenues, until NOW! This simple recommendation :idea: finally made it WORK! YESSSSS!! ALRIIIIIIIGHT!!!

I swear, if my roommate wasn't asleep right now like I should be, I'd be yelling.

Oh, f&#^ing f!*@ yes!!! This is awesome!!!!!! Finally!! Yay! :D


THANK YOU!!


 
Last edited:
You know, I was just coming back here to post this beautiful, wonderful post made by kong over at XDA:

http://forum.xda-developers.com/showthread.php?t=1806602#5

which helped me finally overcome this framework stupidity that I've been having. Your advice aligns with his and is therefore equally awesome!




And now that I finally have a modified framework-res.apk running in my ROM, I have to take this time to say:

WOOOOHOOOOOO!!!

All this time, I've been fighting this problem :fight: getting frustrated :dontknow: about ready to give up or take other avenues, until NOW! This simple recommendation :idea: finally made it WORK! YESSSSS!! ALRIIIIIIIGHT!!!

I swear, if my roommate wasn't asleep right now like I should be, I'd be yelling.

Oh, f&#^ing f!*@ yes!!! This is awesome!!!!!! Finally!! Yay! :D


THANK YOU!! :congrats::star:
:party::party:

Yea I couldn't believe how simple the mistake was I was making. I felt so dumb after I figured it out. Took me forever to figure it out also but nobody really makes it clear that you have to keep the original signatures. Glad you got it working.
 
Yea I couldn't believe how simple the mistake was I was making. I felt so dumb after I figured it out. Took me forever to figure it out also but nobody really makes it clear that you have to keep the original signatures. Glad you got it working.

I know! Especially when there's an option to "keep original signatures" I guess I figured - oh, I don't know - maybe the original signatures would be kept! lol

Hey, man, seriously... thanks again!
 
I'm having a hard time with this. I have been able to unpack the framework-res.apk edick images and then repack it without a problem. I've tried to follw the instructions here to decomplie and then recompile and have not had any success. I end up with the unsigned apk which I rename framework-res, but when I try to include it in mybrom it will not boot. I am trying to put together the extended power menu. Is there any chance someone could write up a step by step tutorial. I know its asking alot, but it could save a lot of people some frustration.
 
I'm having a hard time with this. I have been able to unpack the framework-res.apk edick images and then repack it without a problem. I've tried to follw the instructions here to decomplie and then recompile and have not had any success. I end up with the unsigned apk which I rename framework-res, but when I try to include it in mybrom it will not boot. I am trying to put together the extended power menu. Is there any chance someone could write up a step by step tutorial. I know its asking alot, but it could save a lot of people some frustration.

I've actually got one in the works, but I can't guarantee it'll be done in a timely manner... too many projects lol

I've found another thing that works, too: in Virtuous, select the "keep same signature" option, then build the project but don't push to the phone just yet. Open both the original and the newly built APKs and drag AndroidManifest.XML from the original to the new. Then push.

Hope this helps :-)
 
I was able to recompile framework-res.apk. Thanks again for the help. Now I'm working on the android.policy.jar. I have to say I'm learning a lot. Thanks again Merc.
 
Back
Top Bottom