APKRepatcher helps you to modify an existing apk using a simple user friendly GUI. It lets you edit java/smali code from an APK and rewrite the changes back to the modified signed APK. Additionally, it provides you option to convert Dex, Jar, Class, Smali, Class from one format to another. APKRepatcher makes use of dex2jar, jadx, rsyantaxtextarea, zip4j, apktool
Features:
- Decompiles/Recompiles the APK.
- Provides an editor to change the decompiled java code.
- Compiles the code using javac and saves the updated class.
- Allows you to view smali version of your modified java code.
- Allows you to edit smali from the original apk or from your modified java code
- Smali changes once saved would be reflected back in updated apk after building project.
- Build features re-creates new apk with all code changes and lastly it would resign the apk.
- Basic features like find/replace/increase or decrease font are also provided.
- It also allows you to convert from Dex to Jar/Class/Smali/Java, Jar to Dex/Java, Class to Dex/Smali, Smali to Class/Java/Dex. Also allows to extract and sign any apk.
- Allows you to change the amount of memory utilized by APKRepatcher.
- Patch Module
- APKRepatcher is created using Java with no os dependency (as far as i think) so you can run it with various OS
- 100% Free
java -jar APKRepatcher.jar
Download APKRepatcher:
https://github.com/csanuragjain/APKRepatcher/releases/
[OR] https://sourceforge.net/projects/apkrepatcher/
Project Git Location:
https://github.com/csanuragjain/APKRepatcher
GUI Menus:
File
- Open apk (CTRL+O)- Takes the input apk which need to be modified and extracts it inside <APKRepatcher_Software_Dir>/Projects/<APK_NAME_FOLDER>/
- Open Project (CTRL+P)– You can reopen the project created from open apk anytime using this feature. Just point it to <APK_NAME_FOLDER> inside Projects directory.
- Compile & Save (CTRL+S) – Saves & Compile the java code which is currently shown on the GUI editor.
- Build APK (CTRL+B) – Recreates a newly signed apk with the changed code.
Edit
- Increase Code FontSize (CTRL+I) – Allows you to increase font size of shown code.
- Decrease Code FontSize (CTRL+D) – Allows you to decrease the font size of shown code.
- Remove all tabs – Removes all currently shown tabs.
Extra
- Extract APK-APKTool – User can provide any apk for extraction using this option
- Convert Dex to Jar – User can convert any of dex file to jar format using this option
- Convert Dex to Class – User can convert any of dex file to class file using this option
- Convert Jar/Class to Dex – User can convert any of jar/class file to dex format using this option
- Convert Class to Smali – User can convert any of class file to smali format using this option
- Convert Smali to Class – User can convert any of smali file to class format using this option
- Convert Smali to Java – User can convert any of smali file to java format using this option
- Convert Dex to Smali – User can convert any of dex file to smali format using this option
- Convert Smali to Dex – User can convert any of smali file to dex format using this option
- Convert Dex/Jar to Java – User can convert any of dex/jar file to java format using this option
- Sign your apk – User can resign any apk using this option
Advanced
- Edit Smali using current code – Rewrite the smali version of the currently visible java code. This features requires the java code to be compilable in order to convert to smali.
- Edit Smali using original APK – This features opens the smali version of the java class from the original apk. Since it is extracted from original apk so no need of current java code to be compilable
- Save and apply smali changes – After you have edited smali code, you need to save it so that it gets reflected in modified apk.
Settings
- Change Memory Allocation – User is allowed to change the amount of memory reserved by APKRepatcher. Default is 1500mb or 1.5 GB
Help
- Update Software – Helps you to update the current software if any update is available
- How to use APKRepatcher – Contains the documentation of APKRepatcher.
Toolbar
- Allows you to find in current code/replace/replaceAll/find all class
Extra Software Content:
APKRepatcher_lib Folder
- It comes along with the software
- Contains the helper jars used by program
- APKRepatcher_lib\userLibrary is automatically added in classpath while compiling code. If you wish to compile your code using external jars then place those external jars inside APKRepatcher_lib\userLibrary
Settings.txt File
- Contains the memory utilized by APKRepatcher.
Software Screenshot:
Things to Remember:
Things to Remember:
- The default memory allocated to APKRepatcher is 1500mb which can be changed simply using Settings -> Change Memory Allocation
- You can add external library while compiling your code by simply placing them under APKRepatcher_lib\userLibrary folder
- You can also use APKRepatcher for converting dex/jar/class/smali/java from one format to another.
- Patch a module - Assume a class is non compilable because of certain modules used, but you wish to change one of methods which does not have any issue. In this case you can remove the non compilable methods, keeping only your changed method. Now select edit smali for current code under Advanced. You will obtain the smali version for your java module. Now choose Advanced -> edit smali using original apk. Replace your modified module in the original apk smali and then click on Advanced -> save and apply changes. When you build the project, it would patch the module. So you are saved from the errors :)
- You can always increase or decrease the font size of the code using hotkeys or from Edit section
- Don't forget to build the apk after you made your changes. It will create the new apk.
- All projects are stored in the Projects directory which comes along with the software.
Tutorial:
- Open APKRepatcher using java -jar APKRepatcher.jar
- Click on File -> Open APK
- Choose the apk you wish to change
- Open the package from the left pane and double click on the java file you want to edit.
- Once java file opens in editor, just make the required changes.
- After you made the changes, click on File -> Compile & Save
- If compilation fails, you will see the errors in the console view.
- Fix them and compile again
- Once compilation succeeds, you click on File -> Build APK
- If build succeeds, you would see the new apk created.
- If you are unable to compile your class, and want to make changes directly to smali then you can click on Advanced -> edit smali using original apk (which will open the current code smali from the original apk) and make the edits and then click on Advanced -> save and apply. After that you can click on File -> Build APK
- Assume a class is non compilable because of certain modules used, but you wish to change one of methods which does not have any issue. In this case you can remove the non compilable methods, keeping only your changed method. Now select edit smali for current code under Advanced. You will obtain the smali version for your java module. Now choose Advanced -> edit smali using original apk. Replace your modified module in the original apk smali and then click on Advanced -> save and apply changes. When you build the project, it would patch the module. So you are saved from the errors
Note: This software is meant for educational purpose only. Don't use it for any illegal activity.