Android 5.x system.img greater than 2G causes compile otapackage times wrong how to handle

Source: Internet
Author: User

if the IMG size exceeds 2G when the system partition is pre-fabricated too many apk will report the following error when make OtapackageZipFile. Largezipfile:zipfile size would require ZIP64 extensionsorIn writestr zinfo. CRC = Crc32 (bytes) & 0xFFFFFFFF # CRC-32 checksum overflowerror:size does not fit in an int
//http://blog.csdn.net/sergeycao
this is due to Python 2.7 scripting limitationsReference/prebuilts/python/linux-x86/2.7.5/lib/python2.7/Zip64_limit = (1 <<)-1 (31bits equivalent to 2G) python 3.0+ has provided solution, but the current Android compilation environment uses 2.x syntax incompatible with 3.0Google offers a workaround solutionrefer to the following URL for detailed patch contenthttps://android-review.googlesource.com/#/c/142984(But this method takes up the time to increase the write size to 32bits equivalent to 4G, and if more than 4G is still problematic) You also need to modify the script build/tool/releasetools/1, Sign_target_files_apks
2, replace_img_from_target_files.py
3, Ota_from_target_files
4, img_from_target_files.py
5, Img_from_target_files
6, common.py
7, Add_img_to_target_filesfor all ZipFile. ZipFile adding the last allowzip64=true parameter valueex:Original file:output_zip = ZipFile. ZipFile (filename, "a", compression=zipfile. zip_deflated)
Modified to:output_zip = ZipFile. ZipFile (filename, "a", compression=zipfile. zip_deflated, Allowzip64=true)

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android 5.x system.img greater than 2G causes compilation otapackage times wrong how to handle

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.