What is decompiling? What is recompiling? First off, you ... - Navthai

3 downloads 382 Views 339KB Size Report
I've seen many users inquiring about how to decompile apps. Although there are ... Android apps are BASICALLY made up of
[GUIDE] How to use APKTOOL I've seen many users inquiring about how to decompile apps. Although there are many threads on this, still users don't search. So i decided to create this guide as our GT-S5360 forum didn't have one. I learnt this from v6ser's tut about 5-6 months ago, so i would like to thank him before starting this guide. Please PM me guys if I've missed something or written something wrong!

What is decompiling?

Android apps are BASICALLY made up of Java codes and XML files. After compiling the app, these files cannot be viewed. Decompiling is a process which decompiles the binary form of XMLs and .Java files into readable form. The XML files can be retained as it is, but the .java files are converted into smali files, a totally different language.

What is recompiling?

Recompiling is simply a way to convert the XML and smali files back into the binary form and building up of the APK with the changes made. All apps after recompiled have to be signed (except system apps). Let's start! Things needed :JRE (Java Runtime Environment) Windows - Download apktool Download apktool-install-windows Place both apktool files in C:\Windows\"HERE"

First off, you need to install the framework. The three apks needed :framework-res.apk (location : /system/framework) SystemUI.apk (location : /system/app) twframework-res.apk (location : /system/framework) Go to Command Prompt, and type :Code: apktool if {framework's folder/location}

Example in the image here :-

Repeat the same step for SystemUI.apk and twframework-res.apk too, besides framework-res.apk These will be saved here - C:\Users\your_user_name\apktool\"HERE"

Next step, is the decompiling. Code:

apktool d C:\filename.apk C:\folder_of_the_decompiled_files

Example in the image here :-

Now, you can view the XML and smali files. I would recommend Notepad++ to edit them. After making your changes, you're gonna need to recompile so that the files are again in the apk form.

Next step, recompiling. Code:

apktool b C:\folder_of_the_decompiled_files C:\newfilename.apk

(You can use other directories too, I've just used C:\ as an example) Example in the image here :-

Now, final step is signing the apk file. Remember don't sign the apk if it's a SYSTEM app, unless you have edited the AndroidManifest.xml. Signing. Download the zip file here :- http://www.mediafire.com/?gs6n10oh09c039n Extract the files in a folder named "SignApk", in any convienient location. (I preferred C:\) Example of the code in image here :-

That's it! I hope this guide helps a lot of newbies and other users out there!