A jadx plugin to edit decompiled .java files and compile to a new .jar file.
Features:
- edit decompiled
.javafiles in jadx - single and multi-jar support
- edits are saved in project
- compile edited
.javafiles and replace corresponding.classfiles in an updated.jar - integrated jdk swap option to compile with
- setting to disable jadx' tab-interception
- from GitHub releases
- or clone this project and build it with the gradle
disttask
In jadx, go to Plugins > Manage plugins > Install plugin and select the plugin .jar
- Edit - enables edit mode for a java code area
- Save - saves edits in the jaredit folder generated next to the
.jadxproject file (alternative: Ctrl + S) - Exclude - excludes the selected tab from the compile step
- Compile - compiles all files found in the
<project-path>-jareditdirectory that are not excluded and replaces them in an updated.jar - Add JDK - opens a directory selection window, where the
binfolder of the desired JDK to compile with should be selected. The JDK can be changed inPreferences > Plugins > Jar Edit > JDKs
JarEdit requires jadx version 1.5.2 or newer to function properly.
To be able to use the plugin, opened files have to be saved as a project first.
Warning
Please note, that this feature is currently under development. Due to the outdated dx tool, that dex2jar makes use of and the generally lossy conversion from .dex to .jar files, it is likely that the resulting .apk won't function as intended.
The build scripts require a keystore that can be generated with the following command:
keytool -genkey -v -keystore <my-release-key.keystore> -alias <alias_name> -keyalg RSA -keysize 2048 -validity 10000In the apkedit scripts, the path to you dex2jar folder has to be adjusted.
In the apkbuild scripts, the paths to your desired android sdk build-tools and platform folders have to be adjusted. Additionally, the options required for the apksigner to work (specifically the previously generated key and keystore) have to be modified.
<script> <apk-file>
Thanks to Jakob Bille and Martin Tkatchev.
Licensed under the Apache 2.0 License