Using Baksmali and
SmaliModify APK and Package
Download The tool, please Google yourself.
Sometimes an error occurs when you use the Apktool anti-compilation apk to modify the Smali file before making a build, in which case you can try a later version of Apktool.
If the later version of the Apktool still can not succeed, there is a bit of trouble, you can modify the Apktool, but this large-scale technology, I still do not.
In this case, you can choose to use baksmali+Smali to modify and repackage the APK.
1. First unzip the apk file to get the Classes.dex file
2. Use Baksmali to decompile the Classes.dex
The command is: java-jar baksmali.jar-o classout/classes.dex
3. The smali file of the anti-compilation exists./classout.
4. The smali file in the Classout directory can be modified at this time
After modification, the Smali. Jar will be used to recompile the Smali directory to Classes.dex
5. Replace the original Classes.dex with the new Classes.dex plug-in APK package using the compression tool
It is to be explained here that the generated Smali file using the Baksmali.jar decompile uses the Baksmali syntax, which is slightly different from the Smali syntax generated by Apktool anti-compilation .
6. After replacing the Classes.dex file in the APK package, you need to re-sign the APK to install
Use Baksmali and Smali to modify APK and package