Use Zipalign tool to optimize Android APK app record

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.