Results 1 to 8 of 8

Thread: [HOW TO] Compile/Decompile ICS Apk easily|100% working

      
   
  1. #1
    Buckeye Fan flyers2114's Avatar
    Join Date
    Feb 2011
    Location
    MI
    Posts
    2,134
    Post Thanks / Like

    [HOW TO] Compile/Decompile ICS Apk easily|100% working

    Thx to our friend memnoc for this!

    We are all here to learn, take from community and give back to community!!!
    @Lord ClockaN

    Hya guys, after A LOT of requests, I decided to share with the community something that I found really REALLY useful for Dev's but also for other users too that want to mess up with compiling and decompiling process. Usually, non problems at all with that, but since ICS come out, many dev\users are not able to decompile\compile properly many ics apk (not all). This guide will ensure you a good result, 100% working, easy, and fastest way to mess up with ics for theming and resizing purposes, or whatever you want
    BIG THX to my friend and Dev teammate @Bichon for this

    Credits
    @Bichon (yes, again)
    @Xavierjohn22, the amazing author of AutoApktool! Visit his thread HERE, click his thanks button, and support his work with donations, and my personal thanks to author for this tool which is the most powerful and easiest tool ever.
    @Brut_all for Apktool
    @XDA Community
    @Google

    NOTE from cstayton :One thing to take note of as is with any de-compiling and re-compiling of apks, your resource files (i.e. framework-res.apk and com.htc.resources.apk) MUST be the original unmodified versions in order to guarantee that your modded apk will de-compile and re-compile correctly. If you are using modified framework files you may end up having problems with your apk.

    About Apktool

    Please consider to visit the original thread about this tool, because what I'm explaining here is just 1\10 of the real skill of this tool. You can do basically whatever you want with AutoApktool, themers will love it, Dev's will appreciate it a lot, I'm sure.

    Why can't we use Apktool???

    Well, you can, but it's more difficult, that's it.

    Why do you say "must use 1.4.1 apktool version"??

    The reason why is that since 1.4.2 version, apktool generate java code while recompiling process is going on, and this lead to errors that 9/10 makes decompile process fail.

    Requirements (Windows environment, mine is Seven 64 bit)

    Java (last version)
    JDK (last version)
    JDR (last version, usually included in JDK or Java)
    SDK (last 3.0 version for ICS source code)
    Auto_Apktool 2.0.0 (DOWNLOAD THIS ONE NOT OTHERS!!!)

    HOW-TO (NOTE: before start, select Apktool version with option 21, YOU MUST CHOOSE 1.4.1 version!!)

    1)Download and simply unpack Auto_ApkTool 2.0.0
    2)Click on "autoapktoolmain.bat", prompt will open


    3)put the apk you want to mess up with in "_INPUT_APK"


    4) you can chose more than one option to decompile (option 6 is strongly recommended)
    5) when option 6 is being selected, drag the apk from _INPUT_APK folder into the windows prompt and click enter


    6) A Note window will appear, and will show IF the decompiling process has been done properly. Once you close that window, you will see the decompiled folder in _INPUT_APK folder


    7) do your edits (xml, snali, or png, doesn't matter)
    8) recompile with option 7 (NOTE: this time you MUST drag all the FOLDER, NOT the apk)
    9) Once recompiling finished, open the decompiled folder, go to "dist" folder, and here you got your edited apk


    10) you MUST sign the apk with option 10 (NOTE: drag the apk from dist folder to the prompt, then press enter, and in the SAME folder, a signedxxx.apk will appear)


    11) Rename the apk, and push it |NOTE: you can push the apk with 62 option or with sdk typing:

    Code:
    adb remount
    adb push xxx.apk system/app
    adb reboot
    That's it

    Last edited by flyers2114; 04-07-2012 at 11:08 AM.

  2. #2
    Buckeye Fan flyers2114's Avatar
    Join Date
    Feb 2011
    Location
    MI
    Posts
    2,134
    Post Thanks / Like

    Re: [HOW TO] Compile/Decompile ICS Apk easily|100% working

    NOTE FOR SAMSUNG USERS

    Samsung changed some Hex value in the compiled dex code.
    It has nothing to do with resources apks or anthing.
    If you want to decompile those apks you have to do the follwing:

    Using 7zip extract the classes.dex file from the apk and save it somewhere.\
    Delete the classes.dex file from the apk.
    Now you can decompile the apk using this tutorial.
    If you want to decompile the classes.dex to edit the smali code, download baksmali 1.3.2 and smali 1.3.2 and use them to decompile and recompile the classes.dex.
    After you recompiled the edited smali code, just drag back in the new classes.dex file you made.

    this won't be fixed until Brut will make a new Apktool, or someone inserted the new baksmali/smali code into apktool

    THX @Firefeds

    When you're in trouble...try this one, you can apply the following method to the op too
    Downloads:
    http://code.google.com/p/smali/downloads/list
    smali/baksmali editing v1.3.2

    - Download both smali and baksmali v1.3.2

    http://code.google.com/p/android-apktool/downloads/list
    This is the latest apktool used to compile/decompile .apk.
    Download apktool1.4.3.tar.bz2 and apktool-install-windows-r04-brut1.tar.bz2 for Windows or
    apktool-install-macosx-r04-brut1.tar.bz2 and apktool-install-linux-r04-brut1.tar.bz2 for Mac. Follow the instruction on installation.


    Step by step:
    1. Extract the classes.dex from the desired apk.
    2. Decompile it with baksmali v1.3.2 (for modding smali)
    3. Recompile classes.dex with smali v1.3.2.
    4. Decompile the apk with apktool (without classes.dex in the apk itself).
    4a. Modify the apk however you want to, adding your changes.
    4b. Recompile it with apktool.
    5. Put the modified apk back into classes.dex.
    6. Sign the apk.


    thx @djolebih

    Last edited by flyers2114; 04-05-2012 at 01:09 PM.

  3. #3
    nemosfate
    Guest nemosfate's Avatar

    Re: [HOW TO] Compile/Decompile ICS Apk easily|100% working

    that Rapidshare link under requirements is dead...


  4. #4
    Buckeye Fan flyers2114's Avatar
    Join Date
    Feb 2011
    Location
    MI
    Posts
    2,134
    Post Thanks / Like
    Ok thx...will fix when I get home in a bit..


    Link is fixed...thx for catching it again...

    Last edited by flyers2114; 04-05-2012 at 04:35 PM.

  5. #5
    ACS Developer cstayton's Avatar
    Join Date
    Aug 2011
    Location
    Somewhere in Minnesota
    Age
    52
    Posts
    218
    Post Thanks / Like

    Re: [HOW TO] Compile/Decompile ICS Apk easily|100% working

    One thing to take note of as is with any de-compiling and re-compiling of apks, your resource files (i.e. framework-res.apk and com.htc.resources.apk) MUST be the original unmodified versions in order to gaurantee that your modded apk will de-compile and re-compile correctly. If you are using modified framework files you may end up having problems with your apk.

    HTC Inspire 4G
    Blackout ICS XL
    StarDroid ICS XL
    StarDroid ICS AOKP v6.0.0
    Ice Cold Sandwich v7.2 Farewell Edition
    StarDroid Twilight Edition v0.0.4 - DEV
    StarDroid Ranger (HYBRID) v1.0.2
    StarDroid ELF v1.0.5 DEV
    StarDroid Goblin v1.0.1 DEV
    StarDroid MyBliss v1.0.3 P.O.C
    StarDroid 3D Edition 5.0.0
    RCMix3D ACS Kernel v10
    Radio 12.59.60.26U_26.11.04.21M
    RIL 12.59.60.26U_26.11.04.21M

    My ROM's & Themes are now available via the "ACS Updater" app from the market.



  6. #6
    Buckeye Fan flyers2114's Avatar
    Join Date
    Feb 2011
    Location
    MI
    Posts
    2,134
    Post Thanks / Like
    Thx sir, I added this to the op.


    Quote Originally Posted by cstayton View Post
    One thing to take note of as is with any de-compiling and re-compiling of apks, your resource files (i.e. framework-res.apk and com.htc.resources.apk) MUST be the original unmodified versions in order to gaurantee that your modded apk will de-compile and re-compile correctly. If you are using modified framework files you may end up having problems with your apk.


    Sent from my SPH-D710 using Tapatalk 2 Beta-5


  7. #7
    ACS Recognized Developer Memnoc's Avatar
    Join Date
    Apr 2012
    Posts
    13
    Post Thanks / Like

    Re: [HOW TO] Compile/Decompile ICS Apk easily|100% working

    "Thx to our friend memnoc for this!"

    It's all my pleasure :)


  8. #8
    Forum Member jogen's Avatar
    Join Date
    Aug 2012
    Posts
    1
    Post Thanks / Like

    Re: [HOW TO] Compile/Decompile ICS Apk easily|100% working

    the link for the apk tool is broken... is there any mirror for this



Visitors found this page by searching for:

Auto_Apktool 2.0.0

apktool ics

AutoAPKtool 2.0.0

decompile ics apk

ics apktool

autoapktool 2.0.0 download

auto apktool 2.0.0

apktool for ics

edit apk ics

apk decompiler

ics apk

decompile apk

apktool mac

decompile ics framework

apktool 1.4.2 download

how to decompile ics framework

apktool 2.0.0

ics apktool linuxapktool mac tutorialapk decompile toolhtc apktool ICS framework-resautoapktool linuxdecompile ics framework-res.apkeasy apk disassemblerapktool ics linuxsign ics apkapktool linuxapktool recompile error icsworking ics apktooldecompilare apk ics
SEO Blog

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •