1. Download our Official Android App: Forums for Android!

Root constant force closes after editing framework-res.apk

Discussion in 'Android Devices' started by Helenoftroy08, Jul 15, 2010.

  1. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    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!
     

    Advertisement

  2. GirLuvsDroid

    GirLuvsDroid Android Expert
    Rank:
    None
    Points:
    213
    Posts:
    1,307
    Joined:
    Jan 5, 2010

    Jan 5, 2010
    1,307
    515
    213
    Corporate & Securties Attorney
    Wilmington, DE
    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.
     
  3. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    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.
     
  4. GirLuvsDroid

    GirLuvsDroid Android Expert
    Rank:
    None
    Points:
    213
    Posts:
    1,307
    Joined:
    Jan 5, 2010

    Jan 5, 2010
    1,307
    515
    213
    Corporate & Securties Attorney
    Wilmington, DE
    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.
     
  5. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    Gonna give adb a try and report back! Thx!
     
  6. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    No dice...again the icons did get replaced with the ones I wanted, but almost every program on my phone (including google.services.framework) went into a constant loop of force closes. :(
     
  7. GirLuvsDroid

    GirLuvsDroid Android Expert
    Rank:
    None
    Points:
    213
    Posts:
    1,307
    Joined:
    Jan 5, 2010

    Jan 5, 2010
    1,307
    515
    213
    Corporate & Securties Attorney
    Wilmington, DE
    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.
     
  8. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    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.
     
  9. GirLuvsDroid

    GirLuvsDroid Android Expert
    Rank:
    None
    Points:
    213
    Posts:
    1,307
    Joined:
    Jan 5, 2010

    Jan 5, 2010
    1,307
    515
    213
    Corporate & Securties Attorney
    Wilmington, DE
    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.
     
  10. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    Then I'm stumped. Have no idea why I cant seem to edit my png files! ARGH
     
  11. tom108

    tom108 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,672
    Joined:
    Feb 8, 2010

    if you just want to edit the png files why not try ninjamorph. its in the market.
     
  12. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    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.
     
  13. tom108

    tom108 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,672
    Joined:
    Feb 8, 2010

    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.
     
  14. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    hmmm...im not sure but the images might have been in a folder. Ill try the sd card root trick and report back...
     
  15. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    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!
     
  16. supersaki

    supersaki Android Enthusiast
    Rank:
    None
    Points:
    43
    Posts:
    386
    Joined:
    Dec 3, 2009

    Dec 3, 2009
    386
    36
    43
    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]
     
  17. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    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...
     
  18. supersaki

    supersaki Android Enthusiast
    Rank:
    None
    Points:
    43
    Posts:
    386
    Joined:
    Dec 3, 2009

    Dec 3, 2009
    386
    36
    43
    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.
     
  19. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    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!
     
  20. GirLuvsDroid

    GirLuvsDroid Android Expert
    Rank:
    None
    Points:
    213
    Posts:
    1,307
    Joined:
    Jan 5, 2010

    Jan 5, 2010
    1,307
    515
    213
    Corporate & Securties Attorney
    Wilmington, DE
    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.
     
  21. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43
    Ugh...sigh...well thank u ne way!
     
  22. Helenoftroy08

    Helenoftroy08 Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    266
    Joined:
    Dec 30, 2009

    Dec 30, 2009
    266
    35
    43

    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
     
  23. lmt1979

    lmt1979 Lurker
    Rank:
    None
    Points:
    6
    Posts:
    2
    Joined:
    Feb 22, 2010

    Feb 22, 2010
    2
    1
    6
    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
     
  24. ronaldramsayii

    ronaldramsayii Android Enthusiast
    Rank:
    None
    Points:
    93
    Posts:
    588
    Joined:
    Mar 31, 2010

    Mar 31, 2010
    588
    118
    93
    Entrepreneur
    Atlanta
    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.
     
  25. ronaldramsayii

    ronaldramsayii Android Enthusiast
    Rank:
    None
    Points:
    93
    Posts:
    588
    Joined:
    Mar 31, 2010

    Mar 31, 2010
    588
    118
    93
    Entrepreneur
    Atlanta
    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?
     

Share This Page

Loading...