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

[Verizon] bootloop framework-res.apk

dhworph

Android Enthusiast
So I was playing around with framework-res.apk and none of my mods worked, always resulted in a "bootloop"... actually not really a complete bootloop, since the phone booted, but just got stuck on the boot animation (colored JB X). Luckily, letting that ride out for a few minutes was enough to let adb start working, so I was able to mount rw, move/rename the files, and reboot to restore the backup apk.

I'm currently on 4.1.1 stock rooted, only system mod is the 4.2 camera & associated libs.

I tried two mods:
1. compiling AOSP 4.1.1_r6.1 framework-res.apk and putting that on my phone.
2. Just taking my oem framework-res.apk, decompiling and recompiling with apktool, with only two mods, changed config_animateScreenLights to true in bools.xml, and changed "Verizon Wireless" text in eri.xml.

Both times, I signed the apk's with AOSP testkeys, and zipaligned them (verifying both). Maybe this is the problem since framework-res.apk is signed with a different key than the rest of my rom?

I had to push the files with adb to my sdcard and then move them from my sdcard to the system/framework folder. Then I did chown 0.0 <filename> to change it from sdcard_rw to root. And then changed permissions from rw-rw-r to rw-r-r-. Could this be a source of error?

Any ideas on why neither mod would work? What did I do wrong? Is there a better way to edit framework-res.apk?

Edit: it also broke google play somehow... installing apps from google play no longer worked, I could download them, but then FC when try to install... tried wiping data for google play, and wiping dalvik in recovery, no dice. restore nandroid complete! ;)

Edit 2: ok, I think my error was re-signing the apk... I guess you aren't supposed to do that with system apks... well, I did the mods again and this time just kept the same META_INF folder with the original signatures, and it still did the same "soft bootloop" on the boot animation. And it wiped my google account... restored the nandroid again just to be safe... (edit --- I think I errored by not sipaligning it that time...)

Edit 3: ok, redid the mods, kept old signatures, zipaligned it, did all the moving and permission changing in adb shell, and it still didn't work... pulling my hair out here! :p
 
Hey dhworph, good stuff up there ^^^ :).

I messed around with framework-res.apk modding a bit back on my Moto Droid X way back when (mid-2011).

I was able to successfully mod my file, but when I tried making the same mods to another member's file for him, he boot looped in much the way you described above (I'm pretty sure this has always been a potential pitfall in tweaking the framework-res.apk, regardless of Android version or device :p).

Something I didn't really think about or use way back then was that I probably could have gleaned more information about the issue would have been to examine the logcat and/or kernel messages being produced at the time.

So, you could use the adb logcat > logcat.txt command when the loop is happening to possibly capture something useful.

To look at the kernel messages, you can try this:
adb shell su -c "cat /proc/kmsg"​
Anyway, best of luck and let me know what / if you find out anything--I am very curious and would be happy to help test and/or replicate this.

Cheers!

:)
 
I found that when I used to mess with framework-res.apk on the old Droid 1, it was best to 'apply' it by flashing it in recovery with a custom built 'update.zip' file. Or at least pushing it with adb while the phone was booted into recovery.

Now, though since Gingerbread, I thought that some things in framework-res.apk are dependant on things in SystemUI.apk and/or vice versa?
 
hm... ya, maybe making a custom flashable zip would help. I haven't done that before, except by editing rom zips.

SystemUI.apk and framework-res.apk surely work together to do some stuff, but I assumed that they were fairly independent AOSP projects...

As an experiment, I just made a change in SystemUI.apk source and built framework-res.apk (in /frameworks/base/res/), and it was the only file built. I didn't check through absolutely every folder and subfolder of /system though...

Then I made a change in framework-res.apk source and just built SystemUI.apk by itself (in /frameworks/base/packages/SystemUI/), and it was the only file built.

So they should, in theory, be independent right? I'm building in AOSP 4.1.1_r6.1.
 
I honestly don't know about their independence as you described it. I'm kind behind on this part of it. I never decompiled/recompiled. I just opened with 7zip to change a few images once or twice.

As far as flash able .zip files, that is basically what I have done, but have some blank templates in my droid files link in my SIG. I think I even wrote a guide in my droid guides as well.

Good luck
 
Back
Top Bottom