I got "error: Unable to access jarfile C:\Apktools\\apktool.jarHello
I want to keep things simple and very easy. I will write a 5 step guide for setting up apktool and start modifying your app's or any other android framework. This guide will be strictly for windows users, since setting up and using apktool in windows is the easiest.
So lets begin -
What you need before you learn how to use apktool -
- A computer running windows
- A working internet connection for downloading the following -
- JAVA SDK and JRE
- Android SDK
- Apktool core tool
- Sign apk tool
- Basic command prompt commands and path knowledge
- A good linux format code editing program like NotePad ++ [Get it from HERE]
STEP 1 - Install JAVA - Go HERE
- Just go to the above website and download java SDK and JRE.
- We mostly use only SDK libraries but JRE is required when you want to modify games or apps like whatsapp. So its best if we install both.
- install them in any directory for example C:\ drive and you are good to go to next step 2.
STEP 2 - Install Android SDK- Go HERE
- Just go to the above website and download the SDK.
- Install it in an easy path. For example - C:\android
- The short path will be useful when you are using adb for logcat purposes, since typing in a long path every-time you want to access the adb executable file is painful.
- So once you installed the SDK move on to next step 3
STEP 3 - Download Apktool - Go HERE
- For downloading apktool related files, you need to go HERE
- Download latest apktool version, currenlty 1.5.2
- Download the batch file and aapt.exe
- Create a folder anywhere in the pc and put all the apktool.jar, aapt.exe and the batch script in that folder. [see screenshot]
- This will be the operating folder for you now.
- Next move to next step 4
STEP 4 - Using apktool for decompiling anything
- Open command prompt
- navigate to the folder where you placed apktool.jar, batch script and the aapt.exe [see screenshot]
- For this guide i am using a simple framework-res.apk for reference.
- Once you are in the folder via cmd prompt, you need to install the file using the " IF " command
- type the following command -
For example, once the command is executed correctly, it will look like this -Code:
[B]apktool if [I]name-of-the-app[/I] .apk[/B]
[B]apktool if framework-res.apk[/B]
- Once the app is installed you need to decompile it.
- For decompiling use the command "d". The "d" stands for decompile.
For example -Code:
[B]apktool d [I]name-of-the-app[/I] .apk[/B]
[B]apktool d [I]framework-res.apk[/I][/B]
- After the app is correctly decompiled, a new folder will be created in the same folder where you placed your app. This contains all the xml's and smali files which can be edited for different mod's.
For example, here's how it will look once the app is decompiled -
- Then after you are finished with your modding, you need to recompile your app for using it.
- To recompile the app use the following command " B ". The "b" simply means recompile.
[B]apktool b [I]name-of-the-app-folder[/I][/B]
- NOTE - While recompiling the app, you just need to type the name of the folder the app's files contains.
For example -
framework-res is the name of the folderCode:
[B]apktool b [I]framework-res[/I][/B]
- The final modded app will be in the dist folder located inside the original app folder created by apktool.
For example -
- Congrats ! If everything went well, you successfully created a modified app !
- Now the most important step is below in step 5
STEP 5 - Signing the apk
- to sign an apk download the "sign-apk.rar" from below attachements
- extract it to any place.
- open a new command prompt and change into the sign-apk directory using cmd
- move the modified-unsigned apk into this folder [see screenshot] -
- then type the following command -
For example -Code:
[B]java -jar signapk.jar certificate.pem key.pk8 [I]path-of-the-folder-contaning-the-apk .apk path-of-the-new-signed-apk .apk[/I][/B]
[B]java -jar signapk.jar certificate.pem key.pk8 [I]framework-res.apk framework-res-signed.apk[/I][/B]
- Once compiled, the signed apk will be found in the same folder.
- This is FINAL APK.
- Simply rename it to the original apk and push it into the system ! DONE !
If you have any errors or problems related to apktool, post them here, I will try to solve them.