Common Anti-compilation methods:
1. Change the. apk to. zip or. rar with winrar pressure to get Classes.dex file first
2. Use the Dex2jar tool to convert. Dex to. jar, and then use Jd-gui to open the. jar to view the source file.
Command:dex2jar.bat Classes.dex
Code obfuscation:
1. Can compile after confusion, just the class name, function name look not so clear.
2. Set the configuration file path in the root directory under Project.Properties.
Proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt (the former is a basic file, the latter is a personalization file)
APK is generated in 3.release mode.
Unzip the APK package, the Res directory of XML how to view it. Open with Text tool is garbled.
Using Axmlprint2.jar to decompile XML, error (Java.lang.ArrayIndexOutOfBoundsException)
Cause of error: Androidmanifest.xml android:minsdkversion cannot be greater than 7
Build with Android:minsdkversion changed to 7 or less, you can use Axmlprint2.jar to decompile.
Command:java-jar Axmlprint2.jar Main.xml >main.txt
Baksmali.jar classes.dex to Smali formatted files (under the Classout folder) and make changes where needed.
Smali.jar these modified Smali files to. dex files. Overwrite the original. dex file, and then package it as an apk. (You can also use Dex2jar to call it a jar package)