The built-in Android app apk file is best optimized because the APK package is essentially a ZIP archive that is optimized to arrange the uncompressed data within the package in an orderly manner, reducing memory consumption while the application is running. We can use the Zipalign tool for APK optimization.
According to the official Android website, Zipalign is an important tool for optimizing the APK application.
Most software developers are officially launching their Android apps, using the Zipalign tool to optimize the APK package. However, there are still some applications that require our own zipalign optimizations, such as some personally developed software and some cracked versions of the software.
Here I mainly introduce the two methods of using the ADB to do the APK optimization directly and the APK optimization on the root Android phone.
Please download the binaries and script code on the Web at the beginning: Zipalign.zip, after extracting a binary file Zipalign, an executable script Zipalign_apks.
method One: Adb method (requires that the computer has an Android SDK installed)
1. Installation Code
ADB Shell Mount-o Remount,rw/system
ADB push Zipalign/system/bin
ADB push zipalign_apks/system/sd/zipalign_apks.sh
ADB shell chmod 755/system/bin/zipalign/system/sd/zipalign_apks.sh
ADB Shell Mount-o Remount,ro/system
2. Run script code
ADB Shell sh/system/sd/zipalign_apks.sh
or run it on the phone's super terminal.
Su
sh/system/sd/zipalign_apks.sh
method Two: use root Explorer
Root explorer (re) is a powerful root manager that can read and write to the system area.
First copy the Zipalign to/system/bin with re and set the permissions to Rwxr-xr-x as shown in:
Then copy the Zipalign_apks to/system/sd/or somewhere else, rename it to Zipalign_apks.sh, and set the permissions to Zipalign.
Then run zipalign_apks.sh by clicking the file with Re, jumping out of the dialog box, and choosing Execute.
Once run, the log file Zipalign.log will be generated in/data/and you will be able to see which applications are optimized.