Use zipalign to optimize the APK application on Android mobile phones

Source: Internet
Author: User

 

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.

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.