How to Decompile and Recompile android app
If you are a developer or want to be a developer then this article helps you in many ways. Today we are talking about How to Decompile and Recompile android app. If you make an app then in this technique you want to see the source code of that app and make an app in that way.
And you can also modify apk and enjoy the mod version of that app or game and make money also show off in your friends. There are few ways for decompiling or recompile apk. Today we are talking about the that is best of all the technique and easiest way and this way also very effective for me.
Tools You Need:
1. Apktool( search in google for apktool)
2. Java JDK must install on PC if not download and install it
3. PC/Laptop with “CMD”
How to Decompile apk:
- Open the command prompt
- navigate to the folder where you placed apktool.jar, batch script and the aapt.exe
- For this guide, I am using a simple xyz.apk for reference.
- Once you are in the folder via cmd prompt,
- type the following command [ apktool d name of your apk( in my case xyz.apk) and press ENTER
- After the app is decompiled, a new folder will be created in the same folder where you placed your app. This contains all the XML’s and small files which can be edited.
Then edit your app and modify properly. Then its time for recompile the apk file make the app.
How to Recompile apk:
To recompile you just go for same technique just change the coding that’s it-
- Open the command prompt in the folder where you put all the file
- Then same way open a command prompt and type the following code- [apktool b your app name ( in my case XYZ) this time only apk name, not .app extension and press ENTER
That all now you make successfully modify and make an app. Note that you can not install the app in your mobile for installation you need to sign the apk file.
How to Sign the apk:
- to sign an apk file download the “sign-apk.rar” ( for download click here )
- extract it to any place.
- open a new command prompt and change into the sign-apk directory using cmd
- Then just copy and paste the modified-unsigned back into the folder where you put apktool and other files.
Next type the following command code –
java -jar signapk.jar certificate.pm key.pk8 path-of-the-folder-containing-the-apk .apk path-of-the-new-signed-apk .apk
java -jar signapk.jar certificate.pm key.pk8 xyz-res.apk xyz-res-signed.apk
Once compiled, the signed apk will be found in the same folder.