Table of contents
1. Download the decompilation toolkit.
Decompilation toolkit address: Baidu Netdisk
Extraction code: dsu3
After decompression, there are four compressed packages: apktool.rar, dex2jar, jdgui, Auto-Sign;
note, change the path of the decompilation package to English to prevent this. Accident.
2. Rename the APK package to ZIP and unzip it. Place it in the decompilation root directory.
Modify the suffix of the APK to zip and unzip it.
Enter the unzipped package and get the classes.dex file.
Copy the classes.dex file to the dex2jar folder.
Enter cmd in the folder, enter the command line, and use the following command: dex2jar.bat classes.dex.
A jar file will be generated in the dex2jar folder.
Use jdgui to open the jar package and you can see the source code, but it cannot be modified. You need to perform the following operations to modify the code.
3. Use apktool to decompile and modify the smail file and repackage it.
There are three tools in the apktool folder.
Place the APK that needs to be decompiled into a different folder.
Open cmd and enter the following command: apktool.bat d -f <APK name> -o <output folder name>
After decompilation, a folder will be generated
. Contains various resource files for the program.
Check the location of the code that needs to be modified in jdgui, and then modify it in the smali folder.
Save after modification.
4.Repackage
Go back to the apktool directory and execute the packaging command: apktool.bat b <folder name>
Two folders will be generated in the folder.
The dist file contains the APK we need. Although the APK was generated, it cannot be installed directly due to the signature.
5.Re-sign
Copy the generated APK into the Auto-Sign folder.
Execute the signing command: java -jar signapk.jar testkey.x509.pem testkey.pk8 app-Luohu-release.apk app-Luohu-release-new.apk.
app-Luohu-release-new.apk is the re-signed software name (you can choose the name yourself).