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