According to the official Android website, zipalign is an important APK optimization application.Program. The essence of the APK package is a zip compressed file. The optimized object is to arrange uncompressed data in the package in an orderly manner, thus reducing the memory consumption during application running.
Most software developers are using zipalign to optimize the APK package when releasing their android applications. However, there are still some applications that require our own zipalign optimization, such as some personal software and some cracked software.
If SDK optimization is used, you can directly refer to instructions on the official Android website. This article mainly describes how to optimize the APK on the Root Android client. Download binary files and scriptsCode: Zipalign.zip. decompress the package and generate a binary file zipalign. An executable script zipalign_apks is generated.
Method 1: ADB method (Android SDK must be installed on the computer)
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 the script code
ADB shell sh/system/SD/zipalign_apks.sh
Or run it on a cell phone Super Terminal.
Su
SH/system/SD/zipalign_apks.sh
Method 2: Use root Explorer
Root Explorer (re) is a powerful root manager that can perform read and write operations on the system zone.
Copy zipalign to/system/bin with RE and set the permission to rwxr-XR-X, as shown in:
Copy zipalign_apks to/system/SD/or another place and change it to zipalign_apks.sh. Set the permission to be the same as zipalign.
Then run zipalign_apks.sh (the method is to click the file with RE. In the dialog box that appears, select execute.
After running, a log file zipalign. log is generated in/data/. You can view this log file to find out which applications are optimized.
PS: bytes. The zipalign will be generated in/data/after the optimization is automatically run on the machine. log. If you have installed other software, we recommend that you delete this log file. Then, it will be optimized the next time you start the system.