Metamorph won't apply framework-res to ESE53? (A noob guide to adb pull/push theming)

Discussion in 'Android Hacks and Help' started by Jonny Kansas, Mar 12, 2010.

  1. Jonny Kansas
    Offline

    Jonny Kansas DF Super Moderator Staff Member Rescue Squad

    Joined:
    Jan 21, 2010
    Messages:
    4,750
    Likes Received:
    752
    Trophy Points:
    258
    Location:
    Michigan's Upper Peninsula
    Ratings:
    +800
    Current Phone Model:
    Note 4
    Twitter:
    jonny_ks
    Due to the system partition being filled HEAVILY in Cyanogen and UD (Also possibly JRummy's remixes), I am not currently sure of a way to make this system work. The large amount of stuff within the system partition on those roms prohibits adb from being able to push the framework-res.apk back onto the phone, because the entire file is copied over before overwriting. Because of all of the added features and etc in these roms, there isn't enough room in the system partition for this to occur

    So, I and some others have noticed that Metamporph simply reboots the phone when attempting to apply a theme framework-res and doesn't apply when attempting to theme 2.1 ESE 53 roms . I wrote this guide after trying this out for myself. This was MY first time with this process, so don't be intimidated by the length of this guide. Just want to make it thorough enough that you're not left with questions!

    This worked for me, but I won't GUARANTEE results. The theory is simple, but people with little-to-no adb experience may not know that this is even possible. I wrote this up in another thread and figured I'd pull it out on its own.

    FIRST Do a fresh nandroid backup. If this doesn't work, I take no responsibility for ANYTHING you lose. Sorry, but that's the way it is.

    Now...
    I setup my SDK as described here How To: Set Up ADB/USB Drivers for Android Devices | The Unlockr so, if you put your SDK in a different location, you MUST replace my C:/AndroidSDK/tools/ etc with YOUR path. Won't work if you don't. If you don't already know, adb is NOT an app or a computer program. For lack of better term, adb is simply coding used to accomplish things like what I describe here.

    I'll start from the VERY beginning assuming you have the SDK all setup and ready to go. If you don't, use the link about to make it easy-peasy!

    MUSTS:
    -enable usb debugging. This should be in the directions in the link above for setting up ADB.
    -create a nandroid backup before attempting! (catching the drift?)
    -enable airplane mode before beginning. This will ensure that nothing interrupts the process, as you're dealing with IMPORTANT system files here.
    -Not exactly a must, but it's a good idea to unzip the contents of the theme's .zip file onto your computer.
    -Follow capitalization in the commands provided EXACTLY. The only way capitalization should be different is if your SDK is in a differently named folder. ie, you simply named the folder android.
    -Read the WHOLE guide before starting so you can get an idea of the process! :D

    For this example, I'm using the theme I tried this with, Droidinator http://www.droidforums.net/forum/dr...nator-manigma-new-improved-now-metamorph.html This theme requires you to replace 3 xml files in order to use the theme on 2.1. Please be sure that the theme you're attempting to use is claimed to work on 2.1. I don't know what'll happen if it's not.If you would like to use the basic framework of this theme, download the following .apk file and place it in your AndroidSDK tools folder and skip to step 10. Free File Hosting Made Simple - MediaFire

    1. Connect your phone to your computer via usb and mount it.

    2. Access Command Prompt (type cmd in your startup search bar or "run..." box.

    3. Type the following commands. After EACH LINE, press enter. ie cd\ (ENTER) cd AndroidSDK\tools\ (ENTER). Scroll to the bottom of this post for a brief description of what each command is doing. If you'd like to simply copy and paste my commands (only recommended if you setup your SDK EXACTLY as shown in the link above), when you are ready to paste them into Command Prompt (CP), you MUST right-click in CP and select paste. If you Ctrl+v, those keystrokes will register. If that confuses you, I suggest you place CP on top of this window to type them yourself.

    cd\
    cd AndroidSDK\tools\
    adb devices
    adb remount
    adb pull /system/framework/framework-res.apk c:/AndroidSDK/tools

    :::STOP HERE::: Leave Command prompt open.

    4. Open the folder for the theme that you're attempting to install. It's not a bad idea to go ahead and extract the theme's files onto your computer as mentioned above.

    5. Locate the res folder within the theme's framework-res folder. Example I'm looking at c:/DROIDINATORv6/framework-res/res. Open the res folder.

    6. In another window, open the framework-res.apk. A .apk is basically a .zip file with a different extension. You can open a .apk using WinRAR. This is also handy for unpacking nandroid backups for ROM installs. It can be downloaded here...WinRAR archiver, a powerful tool to process RAR and ZIP files the framework-res.apk file will be loacted in c:/AndroidSDK/tools if you setup your SDK the same way it is done in the link above.

    7. Within the framework-res.apk, locate and open the res folder. This can be done within WinRAR.

    8. Return to the window that you have the theme's res folder open in. In the theme that I'm using, there are 3 folders in here: drawable-hdpi, drawable-land-hdpi, layout.

    Each of these folders has a corresponding folder with the framework-res.apk's res folder. Step 9 is the simple part.

    9. Copy and paste all files from each individual folder in the theme's res folder (drawable-hdpi, etc) into the corresponding folders within the framework-res.apk. WinRAR will ask you what directory you'd like to use. Ensure that the path it suggests is the path to your framework-res.apk file. MINE WAS CORRECT BY DEFAULT, so you shouldn't need to change ANYTHNG. If yours is correct, click to accept.

    Every file from your theme's res folder MUST be placed in the corresponding framework-res.apk folders for this to work. It will automatically overwrite the files that are there. These are what make your droid look pretty and are what MM would install if it worked on these roms.

    10. Once you've replaced the files in the framework-res.apk, close WinRAR and return to Command Prompt (I didn't click anything to save the changes, but it worked, so you don't need to save unless you really want to. IF you do, be SURE that the file is still located in the AndroidSDK tools folder and is still ONLY named framework-res.apk.

    If you downloaded the framework-res.apk file I provided above and placed it in your SDK tools folder, you must also be certain that the file is named correctly... framework-res.apk

    In Command prompt, type the following:

    adb push framework-res.apk /system/framework
    adb reboot

    :::When your phone reboots, you may simply close command prompt:::

    11. Enjoy your newly themed ESE53 rom!

    Now, an explanation of what each of the commands you've used (or are going to use if you've come down here to learn before you do...)

    cd\ --Changes directory on your pc to c:
    cd AndroidSDK\tools\ --Takes you to the SDK
    adb devices --Discovers your phone.
    adb remount --Remounts your phone for use with command/adb
    adb pull /system/framework/framework-res.apk c:/AndroidSDK/tools --Pulls the framework-res.apk from your phone into your SDK tools folder

    adb push framework-res.apk /system/framework --Pushes the framework-res.apk BACK into the phone.
    adb reboot --Reboots the phone.
  2. natediddy1120
    Offline

    natediddy1120 Silver Member

    Joined:
    Jan 4, 2010
    Messages:
    3,183
    Likes Received:
    0
    Trophy Points:
    101
    Location:
    ???
    Ratings:
    +0
    Nice guide bro :)

    I know that the MM issue was tricky for a lot people for framework-res
  3. jcardona1
    Offline

    jcardona1 Senior Member

    Joined:
    Dec 15, 2009
    Messages:
    1,208
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    Commiefornia
    Ratings:
    +40
    thanks for this! i was completely clueless about this whole process everytime i saw somebody mention it. i dont need to use it for now, but when i do, ill be coming back to this. you guys are great :D
  4. Jonny Kansas
    Offline

    Jonny Kansas DF Super Moderator Staff Member Rescue Squad

    Joined:
    Jan 21, 2010
    Messages:
    4,750
    Likes Received:
    752
    Trophy Points:
    258
    Location:
    Michigan's Upper Peninsula
    Ratings:
    +800
    Current Phone Model:
    Note 4
    Twitter:
    jonny_ks
    I'd only used adb push to replace apps, like putting the original black/red live wallpaper back into Pete's rom after he changed it, and wasn't sure about theming, but someone suggested adb push. They'd never done it, so I worked it out with a little help and did it myself to help someone else who had the same issue, but didn't know anything about adb.

    Not a problem. The basic processes here can be used for other applications as well, but I had NO idea wtf adb was when I first got into this stuff, but I've got some experience with DOS, so once I figured it out, wasn't to hard to put it all together.

    The link at the top about setting up ADB offers some GREAT examples/explanations of commands used here and elsewhere!
  5. 19DroidRage84
    Offline

    19DroidRage84 Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    LC, KS
    Ratings:
    +0
    Not to steal your thunder but not everyone has winwar.....Anyway........you made it way more difficult then it needs to be. Busybox cp framework-res.apk to sdcard. In metamorph .thm file make sure the thene path is /sdcard/. Apply theme in metamorph. Busybox cp framework-res from sdcard to /system/framework/. Reboot phone. Also I used my theme from 2.0.1 and everything worked. The only things that aren't compatible are the .xml files for making ur notification bar transparent.
  6. Jonny Kansas
    Offline

    Jonny Kansas DF Super Moderator Staff Member Rescue Squad

    Joined:
    Jan 21, 2010
    Messages:
    4,750
    Likes Received:
    752
    Trophy Points:
    258
    Location:
    Michigan's Upper Peninsula
    Ratings:
    +800
    Current Phone Model:
    Note 4
    Twitter:
    jonny_ks
    Well, I provided a link to download winrar, and this is the way I figured out when someone like you wasn't around to answer my question...lol.

    I figure you could really probably just use root explorer to copy framework-res.apk to the sd card, then paste the theme's files over the corresponding framework-res.apk files, then mount r/w in root explorer in system/framework and paste it...That's KINDA what you're talking about there...I figure the way provided here is better for people who're not REAL tech-savvy, and/or are more comfortable using a computer. This IS a noob guide...Haha!

    Hindsight is 20/20..lol
  7. 19DroidRage84
    Offline

    19DroidRage84 Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    LC, KS
    Ratings:
    +0
    its cool...but to copy froamework-res.apk:

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

    *******on phone apply metamorph. Metamorph path needs to be /sdcard/*******

    busybox cp /sdcard/framework-res.apk /system/framework/
    mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system
    sync
    reboot
  8. Jonny Kansas
    Offline

    Jonny Kansas DF Super Moderator Staff Member Rescue Squad

    Joined:
    Jan 21, 2010
    Messages:
    4,750
    Likes Received:
    752
    Trophy Points:
    258
    Location:
    Michigan's Upper Peninsula
    Ratings:
    +800
    Current Phone Model:
    Note 4
    Twitter:
    jonny_ks
    I'm assuming that's using Terminal Emulator...? Or is that done from the computer? Because terminal emulator force closes on my Droid as soon as I open it...
  9. 19DroidRage84
    Offline

    19DroidRage84 Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    LC, KS
    Ratings:
    +0
    From computer. You can do it from terminal just don't have type adb shell. Try android terminal emulator.
  10. Jonny Kansas
    Offline

    Jonny Kansas DF Super Moderator Staff Member Rescue Squad

    Joined:
    Jan 21, 2010
    Messages:
    4,750
    Likes Received:
    752
    Trophy Points:
    258
    Location:
    Michigan's Upper Peninsula
    Ratings:
    +800
    Current Phone Model:
    Note 4
    Twitter:
    jonny_ks
    I'll have to give it a try next time I upgrade/switch roms. Got mine fairly well set the way I like it...Couldn't you theoretically also just use root explorer to change the permissions of framework-res.apk (which you basically do when you copy it to the sd card) and then simply apply the mm theme? Seems like that'd cut out a LOT of steps...
  11. 19DroidRage84
    Offline

    19DroidRage84 Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    LC, KS
    Ratings:
    +0
    I think its because the framework-res.apk is running. Ill try changing permissions next time I do it.
  12. Jonny Kansas
    Offline

    Jonny Kansas DF Super Moderator Staff Member Rescue Squad

    Joined:
    Jan 21, 2010
    Messages:
    4,750
    Likes Received:
    752
    Trophy Points:
    258
    Location:
    Michigan's Upper Peninsula
    Ratings:
    +800
    Current Phone Model:
    Note 4
    Twitter:
    jonny_ks
    But that's what I don't get...On prior versions of Pete's ESE53 Bugless Beast, including v .07, which I JUST upgraded from...Metamorph themed the framework-res.apk.

    I just tried using root explorer to replace the proper file in the framework-res.apk and then paste it back into the system and the phone rebooted just like it did when attempting to use metamorph...

    Oh well!

    Time for me to hit the bar! lol

    I'll give it a go tomorrow and see if I can't get an easier way to work.

    I'm sure your way will work, so I'll try that as well and add it as an easier option to the OP.

    Thanks for the help!
  13. Jonny Kansas
    Offline

    Jonny Kansas DF Super Moderator Staff Member Rescue Squad

    Joined:
    Jan 21, 2010
    Messages:
    4,750
    Likes Received:
    752
    Trophy Points:
    258
    Location:
    Michigan's Upper Peninsula
    Ratings:
    +800
    Current Phone Model:
    Note 4
    Twitter:
    jonny_ks
    How do you point mm to /sdcard/?
  14. 19DroidRage84
    Offline

    19DroidRage84 Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    LC, KS
    Ratings:
    +0
    You just open the .thm in a notepad

    The .thm file that goes with every metamorph inside it you will want this:

    Any ROM
    Any Version
    framework-res.apk
    /sdcard/

    Target apk is framework-res.apk
    Target path is /sdcard/

    **********dont type this************

    the 3rd line is where you type the .apk you want to theme. the fourth line is the path since framework-res.apk is on the sdcard its /sdcard/. Some people dont put the last 2 lines but i learned it that way.
  15. Jonny Kansas
    Offline

    Jonny Kansas DF Super Moderator Staff Member Rescue Squad

    Joined:
    Jan 21, 2010
    Messages:
    4,750
    Likes Received:
    752
    Trophy Points:
    258
    Location:
    Michigan's Upper Peninsula
    Ratings:
    +800
    Current Phone Model:
    Note 4
    Twitter:
    jonny_ks
    That's right. I feel silly. Lol. Might be the Captain...haha!
Search tags for this page
metamorph pro wont work
,

metamorph won't work