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

Root constant force closes after editing framework-res.apk

Helenoftroy08

Android Enthusiast
Dec 30, 2009
266
35
I am running Pete's virgin deodexed FRF84B, with Chevy's LV 1.0 Ghz kernel.

I edited .png files in framework-res.apk; the sdcard preparing icon and also the usb connected icon. I used this method:

Use terminal, since ADB doesn't work.
su
cp system/framework/framework-res.apk /sdcard

(edit files on your computer opening the framework as an archive using 7zip. put the file on the sd card)

assuming that you aren't in SU anymore..

su
cp /sdcard/framework-res.apk system/framework
chmod 644 system/framework/framework-res.apk
sync
reboot

(found here: Best way to edit/mod "framework-res.apk" in FROYO? - Droid Forum - Verizon Droid & the Motorola Droid Forum)

They are not the .9 png files, and the icons changed without problem, but immediately after a reboot almost every program on my phone is force closing. I would love ne suggestions the community has. Thanks!
 
I'm not sure why they would say that adb doesn't work with Froyo, because I've had no problems using adb to copy the framework from my SD card to system/app.

I always modify my framework when load a new ROM or theme and these are the commands I've always used (including for Froyo ROMs) in adb:

adb shell
su
mount -o remount,rw /dev/block/mtdblock4 /system

busybox cp /sdcard/framework-res.apk /system/framework/
reboot


I've had no need to use chmod.

Now, I should note that everytime I've done this on a Froyo ROM, by google e-mail account and my wallpaper get obliterated. It's really easy to fix that, though -- just add the google account back by going to Settings>Accounts & sync and just select the wallpaper again. I haven't had any FC issues, and I've replaced lots of icon pngs, including the .9 png files.
 
Upvote 0
I'm not sure why they would say that adb doesn't work with Froyo, because I've had no problems using adb to copy the framework from my SD card to system/app.

I always modify my framework when load a new ROM or theme and these are the commands I've always used (including for Froyo ROMs) in adb:

adb shell
su
mount -o remount,rw /dev/block/mtdblock4 /system

busybox cp /sdcard/framework-res.apk /system/framework/
reboot


I've had no need to use chmod.

Now, I should note that everytime I've done this on a Froyo ROM, by google e-mail account and my wallpaper get obliterated. It's really easy to fix that, though -- just add the google account back by going to Settings>Accounts & sync and just select the wallpaper again. I haven't had any FC issues, and I've replaced lots of icon pngs, including the .9 png files.

hmmm...I am perplexed and I want those icons dammit! LOL do u think it would be better to use adb, rather than terminal emulator? Oh and when I didnt use chmod I got a boot loop.
 
Upvote 0
hmmm...I am perplexed and I want those icons dammit! LOL do u think it would be better to use adb, rather than terminal emulator? Oh and when I didnt use chmod I got a boot loop.

I generally do when pushing the framework back to /system/app. I know in the past, when I tried to push framework using terminal, I went into endless boot loops, so I don't even attempt it any more.
 
Upvote 0
I'm not sure what to tell you then. Just to be sure -- you first pulled the framework-res.apk from /system/framework on the ROM you're currently running?

Then you replaced only png files in the apk file using 7zip, without unzipping the apk?

Then you pushed that framework back to /system/framework?

If so, those are the same steps I always follow, without any problems.
 
Upvote 0
I'm not sure what to tell you then. Just to be sure -- you first pulled the framework-res.apk from /system/app on the ROM you're currently running?

Then you replaced only png files in the apk file using 7zip, without unzipping the apk?

Then you pushed that framework back to /system/app?

If so, those are the same steps I always follow, without any problems.

My ROM doesn't have a framework-res.apk file in system/app, so I pulled the one from system/framework. Is that maybe a problem? Other than that I did everything as you have listed here, including replacing the files with 7zip.
 
Upvote 0
My ROM doesn't have a framework-res.apk file in system/app, so I pulled the one from system/framework. Is that maybe a problem? Other than that I did everything as you have listed here, including replacing the files with 7zip.

No, my apologies -- I'm so used to typing /system/app that I must have done it on autopilot, but it's not right -- it should be /system/framework. I'm sorry about that! I'm correcting my post above.
 
Upvote 0
Hey Tom! I did try ninjamorph. It changed the icons for that moment, but after I exit the program and reboot they are back to the default icons. I have read of a few others having that problem with ninjamorph.

thats weird. i have never had any problems with it as long as i use images that are in the sdcard root directory. if they are in a folder they will not save.
 
Upvote 0
No dice. Even with the new .png files in the root of the sdcard, once I rebooted the phone the icons went back to default with ninjamorph. I'm new to this, so I don't really know; does it matter at all that the new .png files are from another theme and I'm already using one? And thank both of u guys for ur suggestions and help!
 
Upvote 0
I'm not sure why they would say that adb doesn't work with Froyo, because I've had no problems using adb to copy the framework from my SD card to system/app.

I always modify my framework when load a new ROM or theme and these are the commands I've always used (including for Froyo ROMs) in adb:

adb shell
su
mount -o remount,rw /dev/block/mtdblock4 /system
busybox cp /sdcard/framework-res.apk /system/framework/
reboot

I've had no need to use chmod.

Now, I should note that everytime I've done this on a Froyo ROM, by google e-mail account and my wallpaper get obliterated. It's really easy to fix that, though -- just add the google account back by going to Settings>Accounts & sync and just select the wallpaper again. I haven't had any FC issues, and I've replaced lots of icon pngs, including the .9 png files.

I'm glad it's not just me that loses their google sync and wallpaper when pushing a new framework-res.

I wanted to give my 2c and say this method works for me as well (although I actually adb push files from my computer, but that shouldn't affect anything).

I know OP said he is using Pete's virgin FroYo, what ROM are you using GirLuvsDroid?

Maybe the virgin ROM isn't properly deodexed?

[Edit: For the record, I've successfully done this on CM 6.0 Alpha 7 and RC1]
 
Upvote 0
I'm glad it's not just me that loses their google sync and wallpaper when pushing a new framework-res.

I wanted to give my 2c and say this method works for me as well (although I actually adb push files from my computer, but that shouldn't affect anything).

I know OP said he is using Pete's virgin FroYo, what ROM are you using GirLuvsDroid?

Maybe the virgin ROM isn't properly deodexed?

[Edit: For the record, I've successfully done this on CM 6.0 Alpha 7 and RC1]

I'm not sure, since I am so new to this, but if it was not properly deodexed would I still be able to install a theme? Because I am using one right now...
 
Upvote 0
I'm not sure, since I am so new to this, but if it was not properly deodexed would I still be able to install a theme? Because I am using one right now...

No you wouldn't..

Only other suggestion is if you have ROM manager you can run the 'Fix Permissions' maybe.. I think Pete has a script for it, but I don't think he included those in the virgin ROM.
 
Upvote 0
This is driving me NUTS!!!! And there is CLEARLY something that I'm doing wrong that is causing this. So, let me take another tact...while researching this issue, I keep reading in the forums that people are editing their png files. Could the mistake I am making be that I am trying to replace the png files altogether? For example, I found a nice png icon of the usb connection on the internet. Once I opened framework-res.apk with 7zip, I just pasted the new icon in there and overwrote the existing one. Is there some specific way I need to edit the old png file to turn it into the new one I want perhaps? Thanks guys I appreciate any responses!
 
Upvote 0
This is driving me NUTS!!!! And there is CLEARLY something that I'm doing wrong that is causing this. So, let me take another tact...while researching this issue, I keep reading in the forums that people are editing their png files. Could the mistake I am making be that I am trying to replace the png files altogether? For example, I found a nice png icon of the usb connection on the internet. Once I opened framework-res.apk with 7zip, I just pasted the new icon in there and overwrote the existing one. Is there some specific way I need to edit the old png file to turn it into the new one I want perhaps? Thanks guys I appreciate any responses!

Sorry, but that's not the problem. I couldn't edit a png file to save my life -- I always use png files I've found in various themes and I've never experienced the problem you're having.
 
Upvote 0
I'm glad it's not just me that loses their google sync and wallpaper when pushing a new framework-res.

I wanted to give my 2c and say this method works for me as well (although I actually adb push files from my computer, but that shouldn't affect anything).

I know OP said he is using Pete's virgin FroYo, what ROM are you using GirLuvsDroid?

Maybe the virgin ROM isn't properly deodexed?

[Edit: For the record, I've successfully done this on CM 6.0 Alpha 7 and RC1]


So I decided to delve a little deeper into the world of root and try my very first ROM. I am running Chevy 4.5, and I am able to edit these png files successfully. So I guess u were right and it was something about the rom! Thanks for all of ur time and help everyone :D
 
Upvote 0
This is what I do to modify my bugless beast to my liking...

(and no the Virgin Rom isn't deodexed, I'd use his regular Beast I customized the hell out of it)


Take the update.zip and extract it's contents. Next go into the system folder find the framework-res.apk and using 7 zip, extract contents of that file else where for reference, then open the archive by right clicking (within the windows context menu) and "open archive" the framework-res.apk , go to the res/drawable hdpi folder where the hundreds of system icons are and you can open another window and side by side drag and drop your modified pngs into it.

After you're done adding/modifying the files, make sure to use your Android SDK to zipalign the framework-res.apk and rezip the update.zip in the same format. Reboot phone, wipe data,cache a few times and apply the modified update.zip.

(if you do this correctly you WILL NOT break the signing on the file and the zipalign will optimize it)

http://android-developers.blogspot.com/2009/09/zipalign-easy-optimization.html

This has worked for me countless times and it's how I did this to Bugless
Bugless Beast 0.4 FRF84BV04 + SMOKED GLASS ROM'ed UP! - Droid Forum - Verizon Droid & the Motorola Droid Forum
 
Upvote 0
So I decided to delve a little deeper into the world of root and try my very first ROM. I am running Chevy 4.5, and I am able to edit these png files successfully. So I guess u were right and it was something about the rom! Thanks for all of ur time and help everyone :D

I'm currently trying my first ROM as well based off the FRG01B Deodexed ROM. I just straight up copy my files to the computer. After editing them, I zip them back into an apk file since apk files are zip files and put them back in. I'm taking everything a step at a time, and so far it's running good. Just gotta get use to reading and editing xml files. That's my biggest obstacle. But yeah for me whenever I edit a zip file, whether it's ".zip" or ".apk", I end up rezipping it again, I guess to seal it, sort to say (zip-aligning). If I don't do it sometimes, that's when I get force closes and boot loops....


Just realized it says similar to the post above mines lol. Instead of using adb, I just use WinRAR, drag and drop and reboot.
 
Upvote 0
This is what I do to modify my bugless beast to my liking...

(and no the Virgin Rom isn't deodexed, I'd use his regular Beast I customized the hell out of it)


Take the update.zip and extract it's contents. Next go into the system folder find the framework-res.apk and using 7 zip, extract contents of that file else where for reference, then open the archive by right clicking (within the windows context menu) and "open archive" the framework-res.apk , go to the res/drawable hdpi folder where the hundreds of system icons are and you can open another window and side by side drag and drop your modified pngs into it.

After you're done adding/modifying the files, make sure to use your Android SDK to zipalign the framework-res.apk and rezip the update.zip in the same format. Reboot phone, wipe data,cache a few times and apply the modified update.zip.

(if you do this correctly you WILL NOT break the signing on the file and the zipalign will optimize it)

Android Developers Blog: Zipalign: an easy optimization

This has worked for me countless times and it's how I did this to Bugless
Bugless Beast 0.4 FRF84BV04 + SMOKED GLASS ROM'ed UP! - Droid Forum - Verizon Droid & the Motorola Droid Forum

Excellent work on the themed ROM. Seems like you're real good at this. I need a little help with theming a ROM. Did you edit any XML files for that ROM?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones