A Helpful Guide to Music Streaming Services

With the launch of Apple Music, music streaming services have recently gained a lot of … more

An Inside Look at the Redesign of Business Calendar

The much-acclaimed calendar app, Business Calendar, underwent a major design … more

New Android One Device Dead On Arrival

Today, Google announced the second generation of Android One devices, with the new Lava Pixel … more

OnePlus 2 Leaked, Actually Prettier Than Expected

The OnePlus 2 launch event is mere hours away, and we have been treated to clear, … more

[TUTORIAL][HOW TO]Decompile,Recompile apps via APKTOOL{screenshot explanation]

797 posts
Thanks Meter: 2,005
By Powerhouse, Senior Member on 28th December 2013, 06:21 PM
Post Reply Subscribe to Thread Email Thread

It is a tool for re-engineering 3rd party, closed, binary Android apps.

It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step.

Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc.
Suppose you want to modify an App according to the way you want it to be ..!!! This can't be done without any Tool .. So @iBotPeaches introduced the legendary Tool "APK-TOOL" ... It is used to modify the apps ..!! De-odexed app's make the work more easier ..It can decode resources to nearly original form..It hepls us with many repetitive tasks ..


1) Install Java JDK :-

Before installing the Android SDK, you’ll have to install Oracle’s Java development kit. You can download it from here...(click me !!)

Even if you already have the Java runtime (JRE) installed, you’ll need to install the JDK as well...

After installing Java JDK , you can now download the Android SDK from Google .

NOTE :- If you see a any type of Java-related error during installation, then download and install the x86 version of the JDK, not the x64 one ...

2) Install Android SDK :-

Download Android SDK from here...(click me !!!)

After clicking on "DOWNLOAD FOR OTHER PLATFORMS" , you will get an extended menu ..

After downloading the .exe file , then Double click on the .exe file and install it in C:\ Drive or on whichever drive you wanna install .

3) Android SDK Setup :

Once the Android SDK is downloaded and installed, launch the SDK Manager application from your Start menu.

Enable the Android SDK tools and SDK Platform-tools checkbox and click the Install button. This downloads and installs the platform-tools package, which contains ADB and other utilities.


Download Apk-tool from here ...(click me ...!! )

Now extract the Tar file...Open the extracted Apk-tool Folder...

Now hold shift and right-click button ..Now select "open command prompt here" in the new extended menu ..

And now , you gotta install Framework-res.apk,system-UI.apk ..etc ..

apktool if framework-res.apk

apktool if name_of_apk_you_wanna_install .apk

Now lets decompile a .apk file ..

Here i will take Framework-res.apk as example ..

apktool d framework-res.apk

apktool d name_of_app_you_wanna_decompile .apk

After Modding the app it's time to re-compile the app ... Note that here you need not to enter the .apk extension as weel Just add the Decompiled folder name .. Like in my case the folder name is "framework-res"

apktool b framework-res
apktool b name_of _the_folder_of_app_you_decompiled
Now you can find your Modified new app in the 'dist" folder which is present in the De-compiled app Folder ..

Most important part is that you gotta sign your modified app .. In case of a system app there is no need . But if you modded any non-system app then signing the app is necessary or else the app won't install ..


Download this..{click me..!!}

Extract the .zip file and place the app which is to be signed in the folder..Now

java -jar signapk.jar certificate.pem key.pk8 path_of-folder-having-the-apkWhichIsToBeSigned .apk path-of-the-new-signed-apk.apk
eg ::
 java -jar signapk.jar certificate.pem key.pk8 c:/xda/apktool/system_unsigned.apk c:/xda/apktool/system_signed.apk


copy zipalign.exe from C:\Program Files\Android\android-sdk\tools

Open cmd and type this code

zipalign -fv 4 nameOfAppYouWantToZipalign.apk New_NameOfZipalignedApp.apk
eg :

zipalign -fv 4 framework-res.apk framework-new.apk


All the guys who supported me and whatsapp friends ..
android-blog {learn it from 'em when i was new}
Last edited by Powerhouse; 16th January 2014 at 02:31 AM.
The Following 4 Users Say Thank You to Powerhouse For This Useful Post: [ View ]
28th December 2013, 06:22 PM |#2  
Powerhouse's Avatar
OP Senior Member
Thanks Meter: 2,005
Please click me ..!!

Dont forget to Rate the thread as 5stars and newsWorthy thread
Last edited by Powerhouse; 28th December 2013 at 06:29 PM.
The Following 3 Users Say Thank You to Powerhouse For This Useful Post: [ View ]
28th December 2013, 06:23 PM |#3  
Powerhouse's Avatar
OP Senior Member
Thanks Meter: 2,005
reserved once again}
The Following 2 Users Say Thank You to Powerhouse For This Useful Post: [ View ]
28th December 2013, 07:56 PM |#4  
iamareebjamal's Avatar
Recognized Contributor / Themer
Flag Batcave
Thanks Meter: 4,912
(Just saying)

You don't require Android SDK for apktool
29th December 2013, 02:46 AM |#5  
Powerhouse's Avatar
OP Senior Member
Thanks Meter: 2,005
Originally Posted by iamareebjamal

(Just saying)

You don't require Android SDK for apktool

Ya ..There is no need of Android SDK for apktoool but the tools might be helpful for Logcat'ting and Pushing the files via ADB ..
29th December 2013, 05:07 AM |#6  
Hitesh2626's Avatar
Recognized Contributor
Flag ☆◢Mumbai◣☆
Thanks Meter: 1,441
Nice explanation it is very helpful for Newbies
The Following User Says Thank You to Hitesh2626 For This Useful Post: [ View ]
16th March 2014, 12:38 AM |#7  
Nonta72's Avatar
Senior Member
Flag Gallifrey
Thanks Meter: 524
Anyway to do this using Android Device itself ?

Sent from Gallifrey using TARDIS
The Following User Says Thank You to Nonta72 For This Useful Post: [ View ]
Post Reply Subscribe to Thread

how to decompile recompile using apk-tool, how to hack xda accounts xd 2, how to kill people xd, how to use apktool
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes