Research on the packaging method of Android multi-platform installation package

Source: Internet
Author: User

Following the Google I/O announcing the new system Android L brings 64-bit support, Android NDK has officially launched the Revision 10 update, adding 64-bit ABI support for ARM, x86 and MISP architecture chips.

Thus, the total number of ABI is at least 8. If each platform has a link library size of 10M, add up to reach 80 trillion, if directly installed into the phone, it will waste the phone's valuable storage space. Of course, in the cloud era, there is a solution, after installation in the cloud download, the problem comes again, Cloud download requires traffic or broadband, but also to the cloud maintenance, the problem is not small. Another option is that each platform can be packaged separately, individually packaged to reduce the volume of the installation package, but it will cause a problem that appears confusing and cumbersome to manage.

is there a better way? The answer is yes, it is known that the APK is a zip file, the zip file can contain all the files. Use this to solve.

in the APK, Lib is the platform's dynamic link library, each platform needs and only one. Therefore, Lib is saved as a link library for each platform. We just need to make a few more signatures, so to sign, how many types of link library to make the number of signatures, the signature ignores the other platform's link library, Then generate the Meta-inf file (. Mf. SF,. RAS). Use the directory name that the link library belongs to to name its directory, such as Armeabi. Then place the directory in the Meta-infs directory under the assets directory. This directory is more than the previous apk.

Assets Directory

|--meta-infs

   | |--Armeabi

   | |--armeabi-v7a

   | |--x86

  .......

-----------------------------------------------

Armeabi Directory

  | |--manifest. MF

  | |--cert. SF

  | |--cert. RSA

--------------------------

Finally, use the signing tool to sign the installation package.

In this way, after publishing to the channel, the channel can disassemble the multi-platform installation package, when the user downloads a platform of the APK, the background can directly extract the platform, discard unnecessary, and then package to the user to download. Of course, this requires a channel to support the application distribution platform.

if the user to download all the platform, you can also install the full platform of the installation package, if the installer can identify the part can be installed, the platform can be extracted, packaged and installed.

of course, there is a zip alignment problem, in fact, this problem is easy to solve.

 

Research on the packaging method of Android multi-platform installation package

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.