[MOD] Decompile and Rebuild ICS framework-res.apk without errors

Search This thread

stars2

Senior Member
Dec 20, 2009
156
323
This method is tested, and working for ICS 4.0.3 IML74K (stock) framework-res.apk
ICS 4.0.3 framework-res.apk rebuild is not working with apktool 1.4.3 and latest aapt from SDK R16
Because the 'string encoding' is not correct in the 'plurals.xml' with apktool 1.4.3, and if you tried to rebuild, you get some error...

Decompile

1. Download these files:

apktool1.4.2.31e6dc5.jar
md5: 38db374a2f733000b1b0309b2b99f74b
aapt.exe (from the latest R16 SDK)
md5: 26a35ee028ed08d7ad0d18ffb6bb587a
apktool.bat
md5: 2bf3b895011fc4b1801edcfbabfdc295

2. Copy all files to your 'Windows' directory and rename apktool1.4.2.31e6dc5.jar to apktool.jar
3. Open command prompt, and install framework (apktool if framework-res.apk)
4. Decompile with apktool1.4.2.31e6dc5.jar (everytime use this to decompile framework-res.apk)

apktool d framework-res.apk

Rebuild

1. Download apktool1.4.3.tar.bz2 and copy to your windows directory (overwrite the old apktool.jar)
md5: 3d0478c4d23c7829edc024266697fef9

2. apktool b framework-res
3. extract all files from 'dist\apktool-res.apk' and create new archive with winrar or 7zip (archive type: zip | compression method: store)
4. resign
5. zipalign
6. Rename to famework-res.apk
 
Last edited:

etoy

Senior Member
Dec 21, 2009
1,814
862
wow,was looking for that..really thanks! it works fine..and now i can finally start my ics theme :)

Sent from my Nexus S
 
  • Like
Reactions: jojo_whit3

evilisto

Senior Member
Nov 26, 2010
486
2,318
i tested on my pc with 3 framework-res.apk (stock, cm9 and peter alfonso)..


  • Stock IML74K
    apktool 1.4.3 : error (when re-compiling)
    apktool 1.4.2 : no problem..:)

  • CM9 Alfa 18
    apktool 1.4.2 : no problem.
    (so didn't have to test with apktool 1.4.3..)

  • Peter Alfonso's nightly 01-02-12
    apktool 1.4.2 : no problem too.....:)
:)...
your results may vary...
 
  • Like
Reactions: erik07

etoy

Senior Member
Dec 21, 2009
1,814
862
i modified the main script of apk manager, now it uses 1.4.2 for decompile and 1.4.3 for recompile.. no errors too :)
 

v11lemans

Senior Member
Dec 17, 2010
392
38
I am trying to do the same work with the HTC Sensation on InsetCoin ICS ROM framework-res.

I decopmpiled it and recompiled without modification the same stuff just to test the solution.

No way to solve it. I have got the attached error log.

Any idea?
 

Attachments

  • log.txt
    5.9 KB · Views: 286

ljwnow

Senior Member
Jul 24, 2007
972
187
This method is tested, and working for ICS 4.0.3 IML74K (stock) framework-res.apk
ICS 4.0.3 framework-res.apk rebuild is not working with apktool 1.4.3 and latest aapt from SDK R16
Because the 'string encoding' is not correct in the 'plurals.xml' with apktool 1.4.3, and if you tried to rebuild, you get some error...

Decompile

1. Download these files:

apktool1.4.2.31e6dc5.jar
md5: 38db374a2f733000b1b0309b2b99f74b
aapt.exe (from the latest R16 SDK)
md5: 26a35ee028ed08d7ad0d18ffb6bb587a
apktool.bat
md5: 2bf3b895011fc4b1801edcfbabfdc295

2. Copy all files to your 'Windows' directory and rename apktool1.4.2.31e6dc5.jar to apktool.jar
3. Open command prompt, and install framework (apktool if framework-res.apk)
4. Decompile with apktool1.4.2.31e6dc5.jar (everytime use this to decompile framework-res.apk)

apktool d framework-res.apk

Rebuild

1. Download apktool1.4.3.tar.bz2 and copy to your windows directory (overwrite the old apktool.jar)
md5: 3d0478c4d23c7829edc024266697fef9

2. apktool b framework-res
3. extract all files from 'dist\apktool-res.apk' and create new archive with winrar or 7zip (archive type: zip | compression method: store)
4. resign
5. zipalign
6. Rename to famework-res.apk

Are you sure you need to sign the framework-res which is a system apk? A lot of people on the forum just write some crappy guide like this. If you don't want to write then just take a break. No one wants any sh*t like this.
 
Last edited:
  • Like
Reactions: michie

carl1961

Senior Member
Dec 5, 2010
7,521
6,201
Tickfaw
Are you sure you need to sign the framework-res which is a system apk? A lot of people on the forum just write some crappy guide like this. If you don't want to write then just take a break. No one wants any sh*t like this.

look stars2 just posted this for those who need it, he did it with his free time and effort, I see the only sh*t is your usless post, if you have nothing to contibute please delete your post ( so you don't loose what respect you might have left) and just move on

stars2 files made in two separate folders on my computer also video of decompiling and compiling frameworks.res.apk. NOTE: I have androids apk and jdk installed with windows enviromental path set for both

APKTOOLKIT 6 MEG

capturefoxapktoolkit.zip 142 MEG video of decompiling and compiling frameworks.res.apk

capturefoxZeroCompression.zip 48 MEG How to Zero compress files
 
Last edited:

bluebird11

Member
Apr 12, 2009
46
4
Just to report the problems I had:

- Needed to remove Android SDK from path.
- Needed to delete C:\Users\USERNAME\apktool between decompilations / recompilations.
 
Last edited:

bluebird11

Member
Apr 12, 2009
46
4
Although decompiling and recompiling worked, the apk is not running on my phone :(

I tried decompiling and recompiling the apk without making any changes, and it does not run either. I noticed that my recompiled apk is slightly larger than the original apk (I followed the instructions about zipping with 7zip with store). What <align> parameter should I use for zipalign?
 

carl1961

Senior Member
Dec 5, 2010
7,521
6,201
Tickfaw
Although decompiling and recompiling worked, the apk is not running on my phone :(

I tried decompiling and recompiling the apk without making any changes, and it does not run either. I noticed that my recompiled apk is slightly larger than the original apk (I followed the instructions about zipping with 7zip with store). What <align> parameter should I use for zipalign?

did you sign it? you have to open modified apk (not unzip) and open oridinal apk and copy the META-INF ( that signs it) to the modified one accually I always copy META-INF, AndroidManifest.xml
 
  • Like
Reactions: dsmitty166

qtwrk

Senior Member
Sep 9, 2011
2,714
867
32
Barcelona
i have problem when recompile apk file


first of all i did some mod , recompile report back with errors , second time i just decompile and then recompile it without any change , still shows error ...

attachment.php
 

bluebird11

Member
Apr 12, 2009
46
4
Did you make sure:
1. You have the right versions of the files and you have removed your android-sdk from your path (need to restart cmd if under Windows)?
2. You delete C:\Users\USERNAME\apktool before each decompilation/recompilation?

Hope this helps.
 

qtwrk

Senior Member
Sep 9, 2011
2,714
867
32
Barcelona
Did you make sure:
1. You have the right versions of the files and you have removed your android-sdk from your path (need to restart cmd if under Windows)?
2. You delete C:\Users\USERNAME\apktool before each decompilation/recompilation?

Hope this helps.

i have done 100% exact as he instructed

attachment.php


seems less errors then last time after everytime de/re-compilation with delete c:\users\name\apktool.

but still not work ...
 

Attachments

  • 1.JPG
    1.JPG
    79.2 KB · Views: 710

bluebird11

Member
Apr 12, 2009
46
4
The remaining errors you are getting are not related to apktool.

I think it means that you are using some undefined things.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 64
    This method is tested, and working for ICS 4.0.3 IML74K (stock) framework-res.apk
    ICS 4.0.3 framework-res.apk rebuild is not working with apktool 1.4.3 and latest aapt from SDK R16
    Because the 'string encoding' is not correct in the 'plurals.xml' with apktool 1.4.3, and if you tried to rebuild, you get some error...

    Decompile

    1. Download these files:

    apktool1.4.2.31e6dc5.jar
    md5: 38db374a2f733000b1b0309b2b99f74b
    aapt.exe (from the latest R16 SDK)
    md5: 26a35ee028ed08d7ad0d18ffb6bb587a
    apktool.bat
    md5: 2bf3b895011fc4b1801edcfbabfdc295

    2. Copy all files to your 'Windows' directory and rename apktool1.4.2.31e6dc5.jar to apktool.jar
    3. Open command prompt, and install framework (apktool if framework-res.apk)
    4. Decompile with apktool1.4.2.31e6dc5.jar (everytime use this to decompile framework-res.apk)

    apktool d framework-res.apk

    Rebuild

    1. Download apktool1.4.3.tar.bz2 and copy to your windows directory (overwrite the old apktool.jar)
    md5: 3d0478c4d23c7829edc024266697fef9

    2. apktool b framework-res
    3. extract all files from 'dist\apktool-res.apk' and create new archive with winrar or 7zip (archive type: zip | compression method: store)
    4. resign
    5. zipalign
    6. Rename to famework-res.apk
    11
    Are you sure you need to sign the framework-res which is a system apk? A lot of people on the forum just write some crappy guide like this. If you don't want to write then just take a break. No one wants any sh*t like this.

    look stars2 just posted this for those who need it, he did it with his free time and effort, I see the only sh*t is your usless post, if you have nothing to contibute please delete your post ( so you don't loose what respect you might have left) and just move on

    stars2 files made in two separate folders on my computer also video of decompiling and compiling frameworks.res.apk. NOTE: I have androids apk and jdk installed with windows enviromental path set for both

    APKTOOLKIT 6 MEG

    capturefoxapktoolkit.zip 142 MEG video of decompiling and compiling frameworks.res.apk

    capturefoxZeroCompression.zip 48 MEG How to Zero compress files
    2
    Are you sure you need to sign the framework-res which is a system apk? A lot of people on the forum just write some crappy guide like this. If you don't want to write then just take a break. No one wants any sh*t like this.

    your an idiot
    1
    wow,was looking for that..really thanks! it works fine..and now i can finally start my ics theme :)

    Sent from my Nexus S
    1
    i tested on my pc with 3 framework-res.apk (stock, cm9 and peter alfonso)..


    • Stock IML74K
      apktool 1.4.3 : error (when re-compiling)
      apktool 1.4.2 : no problem..:)

    • CM9 Alfa 18
      apktool 1.4.2 : no problem.
      (so didn't have to test with apktool 1.4.3..)

    • Peter Alfonso's nightly 01-02-12
      apktool 1.4.2 : no problem too.....:)
    :)...
    your results may vary...

    Yes, yes they will... I went ahead (and i recommend everyone doing this) updated my SDK... Just to test things out, i went ahead and used 1.4.2 to decompile/compile framework from AOKP... No errors... Then i went and decompiled with 1.4.2 and compiled with 1.4.3... No errors...