[HELP!] CM6.1.2 framework-res can't be recompiled?

Discussion in 'Cyanogenmod' started by OSX2000, Sep 10, 2011.

DroidForums.net is the premier Android Forum - Registered Users do not see these ads. Please Register - It's Free!
  1. OSX2000
    Offline

    OSX2000 Member

    Joined:
    Apr 6, 2010
    Messages:
    336
    Likes Received:
    1
    Trophy Points:
    18
    Ratings:
    +1
    [Solved] CM6.1.2 framework-res can't be recompiled?

    After giving up on all GB ROMS, I'm working on theming CM 6.1.2 for my OG Droid. Everything works fine, except for framework-res.apk...

    I want to make some minor text color changes to values/styles.xml. I use apktool 1.4.1 to decompile the framework, and all is well so far. I make the changes to styles.xml, and recompile the framework, and everything still looks ok. No errors, and the rebuilt framework is the same approximate filesize as the original.

    The problem is, when I flash the new framework to the phone, it bootloops every time. Doesn't matter if I adb it to the phone, or 7zip it into the CM update.zip, it just never works. I've tried signing the framework, resigning the update.zip, zipaligning the framework, but no dice. Every time I make another attempt, I format the system partition, and install a virgin copy of CM6.1.2 with a new framework-res as the only change, always making sure the permissions of it are 644, but it never works with the modified framework. I even tried decompiling the original framework, and recompiling it, with no changes made, and that bootloops the phone too. As far as I can tell, apktool is corrupting the framework every time it compiles it. Is there another version of apktool that doesn't screw up the rebuild? Am I just doing something completely wrong here?

    I know the first suggestion is probably going to be to use apkmanager, but there is no Mac version of it, and I don't own a PC. And as far as I know, apkmanager relies on apktool to do its work anyway, doesn't it?

    Any help would be greatly appreciated!
  2. OSX2000
    Offline

    OSX2000 Member

    Joined:
    Apr 6, 2010
    Messages:
    336
    Likes Received:
    1
    Trophy Points:
    18
    Ratings:
    +1
    Well, I figured it out...it wasn't something apktool was doing wrong, it was something I was doing wrong.

    Apktool removes the META-INF folder from the apks it builds, and I've read that it also corrupts AndroidManifest.xml. I was regenerating these in my framework-res.apk by signing it, which never worked. Copying META-INF and AndroidManifest.xml from the original framework into the modified one produced a working file.

    Problem solved. Mods, feel free to lock this, or do whatever it is you do. :)
Search tags for this page

apk tool recompile corrupted

,

decompile framework apk cyanogenmod 6