[Guide] Decompile with Apk Tool [Easy Way]

Search This thread

PulseDroid

Senior Member
Jan 7, 2012
2,525
2,435
21
www.pulsedroid.com


## Due to exams I won't be able to reply on questions, there are however many experienced developers active on this thread like @SpaceCaker & @K.A. ##

I have seen a lot of guides on how to decompile with Apk Tool, but none are noob friendly, so I thought I would post this.

What You Need:

ApkTool
Java JDK/JRE 32 bit
Super Basic Cmd/terminal knowledge (My 5 year old brother can handle this)



Download Apk Tool Here: (Must be this one)

Mega

First you need to extract that zip folder to anywhere you choose, preferably on root of c/drive E.g: C:/android/apktool extracting the files to 'apktool' folder.

Now copy the apk you would like to mod into your Apk Tool folder.

f6f8ecf510f10ce4c2c308a5f8a0ea7b.jpg



Command Prompt:

Open up your Command Prompt by going to:
Start -> run -> type : Cmd

32013a151ec069c5099725789edc10ac.jpg


Code:
Your cmd will probly look like this..

C:\users\yourname>

so type in

cd.. [COLOR="Red"](Yes include the '..' and press enter after you type each command.)[/COLOR]

this will get you to back directory so now you will see

C:\users>

so type again

cd..

you should now see this:

C:\>

now type in:

cd 'apktoo'l/'directory'

for me it looks like:

cd android/apktool

now you should see:

C:/android/apktool>

and you are in the apktool directory

dd6f52dd0a63e9cfec11257816610e7e.jpg



Installing Framework:

Now that you are in directory we need to install the device's framework to your system for it to compile correctly so type this:

apktool if framework-res.apk

Remember: Devices like HTC / Samsung / Huawei have other frameworks that are used in their apps too, sometimes you need to install them too.

This will install the devices framework to your system. (need to do this)

0469af0a4f59683b5afd65bbaa517560.jpg


Decompiling:

Now to decompile the apk you want to edit, type this:

apktool d framework-res.apk framework1

or

apktool d music.apk music

music.apk is the apk your decompiling
music is the folder you're creating for the decompiled apk

Now go about your business :victory:

66f044a6c2f13780fcc0fc4b7cb664dc.jpg


3b486e7ae9e032f8eb4bab257abafe7f.jpg



Recompiling/Finished Product:


Now to recompile your new apk type this:

apktool b music music-new.apk

or

apktool b framework1 framework-res-new.apk

framework1 is the folder with your edited files
framework-res-new.apk is your new apk file

131ce3032fc2e7ca4371de574ebec108.jpg


16f0361f73797450f7af2457791b36fd.jpg



We are NOT done just yet, we cannot use the new apk's... we have to take what we did and add it back to the original apk file to keep proper signature

use something like 7zip, take the 'resources.arcs' file and any other xml files you edited out of the "-new" apk and copy them into Original apk

Your new modded APK is now ready, Congrats! :highfive:

If you get Java errors see here.
If you recompile fine but doesn't install " App couldn't not be installed " see here.
Good Luck Guys! :fingers-crossed:

 
Last edited:

K.A.

Senior Member
Apr 4, 2012
6,358
1,270
Actually it could be, it happened to me.

Idk then, i've been working with JB apks for a while now...no framework problems if decompile is fine.. OR, the modifications must've been incorrectly done, i think..

***.King ACE, Unofficial ERT de ACE OT.***
 

shubhamchamaria

Senior Member
Jan 28, 2011
2,792
2,243
Mumbai
Idk then, i've been working with JB apks for a while now...no framework problems if decompile is fine.. OR, the modifications must've been incorrectly done, i think..

***.King ACE, Unofficial ERT de ACE OT.***

Try compiling without modifications....if it builds fine then it is your changes....otherwise framework files

Sent from my HTC One V using Tapatalk 2
 
  • Like
Reactions: ikjadoon

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,901
netherlands
www.youtube.com
ive compiled and decompiled apks from every android version and neve had problems

only o ics an jb apks i need to use 1.4.2 for decompiling and 1.4.3 for compile but ive set up different commands for that


Sent from my ST25i using xda premium
 

K.A.

Senior Member
Apr 4, 2012
6,358
1,270
ive compiled and decompiled apks from every android version and neve had problems

only o ics an jb apks i need to use 1.4.2 for decompiling and 1.4.3 for compile but ive set up different commands for that


Sent from my ST25i using xda premium
One apktool works for me both for compile and decompile.. :)
 

K.A.

Senior Member
Apr 4, 2012
6,358
1,270
wich apktool?

apktool 1.5.0 didnt installed properly or atleast dont work but when i use the other apktools the work perfectly

Sent from my ST25i using xda premium
How am i to find out the version now? :\

---------- Post added at 11:22 PM ---------- Previous post was at 11:15 PM ----------

Apk Manager works too... 5.0.2.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 177


    ## Due to exams I won't be able to reply on questions, there are however many experienced developers active on this thread like @SpaceCaker & @K.A. ##

    I have seen a lot of guides on how to decompile with Apk Tool, but none are noob friendly, so I thought I would post this.

    What You Need:

    ApkTool
    Java JDK/JRE 32 bit
    Super Basic Cmd/terminal knowledge (My 5 year old brother can handle this)



    Download Apk Tool Here: (Must be this one)

    Mega

    First you need to extract that zip folder to anywhere you choose, preferably on root of c/drive E.g: C:/android/apktool extracting the files to 'apktool' folder.

    Now copy the apk you would like to mod into your Apk Tool folder.

    f6f8ecf510f10ce4c2c308a5f8a0ea7b.jpg



    Command Prompt:

    Open up your Command Prompt by going to:
    Start -> run -> type : Cmd

    32013a151ec069c5099725789edc10ac.jpg


    Code:
    Your cmd will probly look like this..
    
    C:\users\yourname>
    
    so type in
    
    cd.. [COLOR="Red"](Yes include the '..' and press enter after you type each command.)[/COLOR]
    
    this will get you to back directory so now you will see
    
    C:\users>
    
    so type again
    
    cd..
    
    you should now see this:
    
    C:\>
    
    now type in:
    
    cd 'apktoo'l/'directory'
    
    for me it looks like:
    
    cd android/apktool
    
    now you should see:
    
    C:/android/apktool>
    
    and you are in the apktool directory

    dd6f52dd0a63e9cfec11257816610e7e.jpg



    Installing Framework:

    Now that you are in directory we need to install the device's framework to your system for it to compile correctly so type this:

    apktool if framework-res.apk

    Remember: Devices like HTC / Samsung / Huawei have other frameworks that are used in their apps too, sometimes you need to install them too.

    This will install the devices framework to your system. (need to do this)

    0469af0a4f59683b5afd65bbaa517560.jpg


    Decompiling:

    Now to decompile the apk you want to edit, type this:

    apktool d framework-res.apk framework1

    or

    apktool d music.apk music

    music.apk is the apk your decompiling
    music is the folder you're creating for the decompiled apk

    Now go about your business :victory:

    66f044a6c2f13780fcc0fc4b7cb664dc.jpg


    3b486e7ae9e032f8eb4bab257abafe7f.jpg



    Recompiling/Finished Product:


    Now to recompile your new apk type this:

    apktool b music music-new.apk

    or

    apktool b framework1 framework-res-new.apk

    framework1 is the folder with your edited files
    framework-res-new.apk is your new apk file

    131ce3032fc2e7ca4371de574ebec108.jpg


    16f0361f73797450f7af2457791b36fd.jpg



    We are NOT done just yet, we cannot use the new apk's... we have to take what we did and add it back to the original apk file to keep proper signature

    use something like 7zip, take the 'resources.arcs' file and any other xml files you edited out of the "-new" apk and copy them into Original apk

    Your new modded APK is now ready, Congrats! :highfive:

    If you get Java errors see here.
    If you recompile fine but doesn't install " App couldn't not be installed " see here.
    Good Luck Guys! :fingers-crossed:

    11
    Fix a corrupted Java Jre ( Development package )

    • Download JavaRa




    • Run with Administrator permissions

    • Click Remove Java Runtime

    ex5FCGf.png


    • Click on Additional Tasks

    CKCvO2t.png


    • Select the following and click Run

    HkBLp3U.png


    ( Remove Startup Entry, Remove Outdated JRE Firefox Extensions, Clean JRE Temp Files. )

    • Re-install from here:



    Note that JavaRA might have updated and has onscreen instructions to help you fix your JRE.

    4
    AFAIK, for systemUI, you need to replace resources.arsc, classes.dex and the res folder..
    Nicely done, btw..
    3
    Has the APK been signed? If not, see Here.
    3
    can u share your apktool stuff ?



    Sent from my ST25i using xda premium
    The aapt file, the apktool jar and apktool file? That only, right?

    ---------- Post added at 11:57 PM ---------- Previous post was at 11:53 PM ----------

    http://www.mediafire.com/?b4au2n8pz1e153p
    This is the 3 files i put..in C:\Windows...
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone