1. Tools (please search the website and download it yourself):
①apktool (anti-compilation: can get picture resources and layout files, etc.)
②dex2jar (decompile: Can get Java code such as activity)
③jd-gui (view Dex2jar The resulting Java file)
④ Mobile Phone Signature tool (signature)
2. Steps:
①apktool anti-compilation
(1) Place the Apktool.bat aapt.exe Apktool.jar in the same directory as the apk file to decompile
(2) run cmd and switch to the path where the Apktool is located
(3) input: Apktool d a.apk Test (format: Apktool D < file name > < folder >)
② Code Change
Find the relative path to generate a test folder, in which you can modify the picture resources and layout files.
③ re-compiling
Input: Apktool B Test (format: Apktool B < folder name to recompile >)
In this directory, the generated APK file is found and the resulting APK file cannot be installed because it is not signed.
④ Signature
Download on the phone: mobile phone signature tool, and the APK sent to the phone, using the phone signature tool to find, and then click the button signature selected files
Find the signature apk installation.
3. View the Java source code:
Change the apk file extension to RAR and unzip the Classes.dex file to the Dex2jar folder
Run cmd, switch to H:\C\dex2jar, and enter Dex2jar classes.dex (format: Dex2jar < file name >)
In the directory will generate a Classes_dex2jar.jar file, run D-gui.exe, and then use the tool to open the previously generated Classes_dex2jar.jar file, you can view the Java source code
That's all, hope to be helpful to everyone's study O (∩_∩) o~
Android APK anti-compilation (decompile-Change code-recompile-signature)