This wikiHow teaches you how to edit the contents of an APK file. In order to edit the files in the APK file, you will need to unpack (and recompile afterwards) the APK package using APKtool on a computer. APK file editing requires knowledge of the Java programming language, as well as the file system on Windows and Android. In addition, file editing is best done by advanced users only.
Step
Part 1 of 3: Installing APKTool
Step 1. Install the Java development tools
This tool can be downloaded from
Step 2. Install the Android SDK
You will also need to install the Android software development tool (Android Software Development Kit or SDK) to unpack and recompile the APK files. The easiest way to install it is to download and install Android Studio from this link.
Step 3. Create a new folder on the desktop
This folder will be used as a storage location for APKTool and APK files. Follow these steps to create a new folder.
- Right-click an empty space on the desktop.
- Choose " New " and click " Folders ”.
Step 4. Rename the folder to "APK"
To rename a folder, right-click the folder and select “ Rename After that, type “APK” to rename the folder.
Step 5. Right click this link and select Save link as.
A file browsing window will open and you can choose a directory to save the “apktool.bat” file.
Step 6. Open the “APK” folder and click Save
Use the file browsing window to access the already created “APK” folder on the desktop. Open the folder and click " Save " The “apktool.bat” file will be saved to the “APK” folder.
Step 7. Download the file " apktool.jar"
Follow these steps to download it:
- Visit https://ibotpeaches.github.io/Apktool/ via a web browser.
- Click " Download ” under the latest version in the " News " section.
Step 8. Rename the file “apktool.jar”
Downloaded files usually have a version number in their name. You can delete the number by right-clicking the file and selecting “ Rename " After that, just type " apktool ” as the file name. The full name of the file is " apktool.jar ". By default, you can find downloaded files in the " Downloads " folder.
Step 9. Copy the “apktool.jar” file to the “APK” folder
When finished renaming the file, right-click the file and select “ Copy " or " Cut " Open the created “APK” folder on the desktop and right-click an empty space on the folder. Click " Paste " The file " apktool.jar " will be pasted into the folder afterwards.
Part 2 of 3: Unpacking or Decompiling APK Files
Step 1. Copy the APK file that you want to edit into the “APK” folder
APK files can be downloaded from various websites. You can also get APK files from your Android device by connecting it to your computer using a charging cable and unlocking the device. Folder access Downloads ” on your device, then copy and paste the APK file into the “APK” folder on your computer's desktop.
Step 2. Open the Windows search bar and type cmd
This bar is usually to the right of the "Start" menu.
Step 3. Click Command Prompt on the search results
This program is indicated by a black screen icon with a white cursor.
Step 4. Access the “APK” folder via Command Prompt
You can open a folder from the Command Prompt by typing the command cd, followed by the name of the folder. For example, if you are in the main directory "C:\Users\Username>" when you open the Command Prompt, you can open the desktop by typing cd desktop. If you copied the “APK” folder to your desktop, you can open it by typing cd apk. You can see the address "C:\users\username\desktop\apk>" next to the command.
If the “APK” folder is saved to another directory, type cd / next to the command to return to the root or main "C:" drive. After that, type in cd, followed by the full address of the “APK” folder
Step 5. Type in apktool if, followed by the name of the APK file
The framework for the selected application will be installed afterwards.
For example, if the name of your APK file is "my-first-game.apk", type apk if my-first-game.apk into the Command Prompt
Step 6. Type in apktool d, followed by the name of the APK file
The APK file will be de-compiled afterwards. The contents of the file will be placed in a separate folder with the same name as the APK file name in the “APK” folder. Now, you can edit the contents of the unpacked/decompiled APK file. You may need coding skills to edit certain files in the folder.
For the same example as above, type apktool d-myfirstgame.apk into the Command Prompt window
Part 3 of 3: Recompiling APK Files
Step 1. Open the Windows search bar and type cmd
This bar is usually to the right of the "Start" menu. After you have finished editing the files in the APK file folder, you will need to recompile the folder into an APK file.
Step 2. Click Command Prompt on the search results
This program is indicated by a black screen icon with a white cursor.
Step 3. Access the “APK” folder via Command Prompt
You can open a folder from the Command Prompt by typing the command cd, followed by the name of the folder. For example, if you are in the main directory "C:\Users\Username>" when you open the Command Prompt, you can open the desktop by typing cd desktop. If you copied the “APK” folder to your desktop, you can open it by typing cd apk. You can see the address "C:\users\username\desktop\apk>" next to the command.
If the “APK” folder is saved to another directory, type cd / next to the command to return to the root or main "C:" drive. After that, type in cd, followed by the full address of the “APK” folder
Step 4. Type in apktool b, followed by the folder name of the APK file you want to recompile
After that, the folder will be recompiled into an APK file. The newly compiled APK file can be found in the " dist " folder, inside the unpacked/decompiled APK folder that the Apktool application created.
For example, if the app you are editing is named “my-first-game.apk”, type apktool b my-first-game.apk into the Command Prompt window
Step 5. Create a new folder named "Signapk" on the desktop
To create a new folder on the desktop, right-click an empty space on the desktop and select “ New " After that, click " Folders " Right click the new folder and select " Rename " Next, type in "Signapk" as the new name for the folder.
Step 6. Copy the recompiled APK file to the " Signapk " folder
You can find the recompiled APK files in the " dist " folder, in the decompiled APK files folder that is stored in the " Apktool " folder. Right click the APK file and select “ Copy " After that, go back to the " Signapk " folder and paste the APK file into that folder.
Step 7. Click here to download the file SignApk.zip”.
The SignApk file required to sign the APK file will be downloaded.
Step 8. Extract the contents of the “SignApk.zip” file to the “Signapk” folder
The " certificate.pem ", " key.pk8 ", and " signapk.jar " files will be extracted to the " Signapk " folder.
Step 9. Open the “Signapk” folder via Command Prompt
To access the folder via Command Prompt, type cd / to return to the root or main directory. Type in cd, followed by the full address of the “Signapk” folder.
If you create a “Signapk” folder on your desktop, the full address of the folder will be "C:\users\username\desktop\Signapk>"
Step 10. Type java -jar signapk.jar certificate.pem key.pk8 [filename].apk [filename]-signed.apk in the Command Prompt window
Replace "[filename]" with the name of the APK file you want to sign. A new signed APK file will be created in the “Signapk” folder. Use this file to install the program on your Android system.