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

[Verizon] Help Decompiling 4.2 framework-res.apk

p-bOt

Android Expert
I have been looking all over google trying to find out how to decompile/compile the framework-res.apk in stock 4.2.1! does anyone know if this can even be done yet or how the hell to do it?

thanks
 
p-bOt,

Are you asking for how to do this on a VZW Galaxy Nexus?

True stock for that device is 4.1.1 at the moment...

Are you trying to simply mod the framework-res.apk?

Cheers!
 
Well I guess you are right about true stock being 4.1.1 lol. But yes it is a VZW Galaxy nexus. I'm running jelly belly 11.0 (which I assumed has a pure stock 4.2 framework-res.apk... that's why I said "stock") I am trying to decompile it to remove the CRT animation because it kinda lags when I push the power button to turn the screen off (this is happening with all 4.2 ROMs for me) and I wanted to see if taking it off would solve that. The way the N7 just fades out when you hit the power button is kinda cooler to me anyways.

So yeah that's why I'm trying to decompile the framework-res.apk lol. Is it possible yet or are there no compatible tools right now?
 
Wouldn't it be easier to just remove the bootanimation.zip from the folder on your rom?

I know there's one in data/local, but not sure where the other one is. You'll have to use a program like root explorer and change the folder to read/write before you can remove it.
 
Haha I'm not talking about the BOOT animation. Im talking about the CRT animation which is the little tv animation when you turn off the screen.
 
It's been a while since I've done this, but here's an outline:

1. Make a Nandroid backup

2. Did you make a Nandroid backup? (:p)

3. Backup your framework-res.apk file on your device (make a copy in the same directory with Root Explorer or equivalent)

4. Extract your framework-res.apk (you don't want to share or use others since they might be on a different version of Android) to your PC

5. Install and use something like Windows XP/VISTA/7][UTILITY][TOOL] APK Multi-Tool to decompile the framework-res.apk; there are other utilities, like the original apktool, etc., but I've gotten Java stack traces when doing the decompile--this one might, too, so you'll have to read through the thread to see what might be going on

6. Carefully modify the decompiled framework-res.apk on your PC

7. Use the same tool as above to re-compile and re-pack the new .apk; I don't think you have to sign the file, but I'm not 100% sure (the tool might do that as well as zipalign it, but you'll have to check the thread details for that info)

8. Push the newly modded framework-res.apk file back to your phone in the same place that it was

9. Reboot and enjoy (hopefully)

10. If you run into problems, either adb into your device while its running a custom recovery, mount /system, replace your bad framework-res.apk with the backed-up on, and reboot or restore from your Nandroid backup

I have done what colchiro mentioned above: replace steps #5-#7 above with using something like 7zip to extract the framework-res.apk file, modify it, and re-zip it. The thing you have to be careful of is that re-packing the framework-res.apk file needs to be done with an appropriate zip utility. So, I've found the safest/best method was to re-pack it from under Linux since I've had mixed results with 7zip or WinRAR.

Hope that helps a bit...

Cheers!
 
I appreciate your help :-) I have used many apk utilities and I am familiar with them. However none of them seem to be working for 4.2. They always error out upon even attempting to decompile lol. And I would just use 7zip but unfortunately the apk has to be fully decompiled to get to the CRT animation.
 
I appreciate your help :-) I have used many apk utilities and I am familiar with them. However none of them seem to be working for 4.2. They always error out upon even attempting to decompile lol. And I would just use 7zip but unfortunately the apk has to be fully decompiled to get to the CRT animation.

Well, I suggested the APK Multi-tool (above) because it was supposed to address some of those errors/issues, but I haven't had time to verify that for myself.

More of an art than a science, eh? :)

Best of luck!
 
Haha thanks. I will continue trying but it's not looking good until the utilities are updated. It doesn't look like much development had been going on lately as far as utilities go.
 
Just thought I'd throw this out here from my low knowledge base.

From Gingerbread and up, some things in /system/framework/framework-res.apk also rely on /system/apps/SytemUI.apk and vice versa.

Also, when ever I have successfully edited framework-res.apk, I always had the best results if applied while in recovery; i.e. make a custom 'update.zip' file and flash it.

good luck
 
Back
Top Bottom