From 9c84e50f4c5f0fd6cd437c1a5869452c53a51d29 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 22 Aug 2016 10:31:05 -0700 Subject: [PATCH] releasetools: Allow creating target_files with ZIP64. add_img_to_target_files.py fails when the target_files.zip is over 4GiB when adding IMAGES/ folder. Specify the flag to allow creating target_files.zip with ZIP64 extension. Other zip artifacts (-img.zip, -ota.zip etc) remain in non-ZIP64 format. zip2zip is not affected, which still creates non-ZIP64 zips even when copying from target_files in ZIP64. Bug: 30961841 Test: "make dist" with large system image and check the artifacts. Change-Id: I0568745f01ef8f0239081f783eac92288d4fdd84 --- tools/releasetools/add_img_to_target_files.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py index 5730019aa..c9a80386b 100755 --- a/tools/releasetools/add_img_to_target_files.py +++ b/tools/releasetools/add_img_to_target_files.py @@ -316,7 +316,8 @@ def AddImagesToTargetFiles(filename): common.ZipClose(input_zip) output_zip = zipfile.ZipFile(filename, "a", - compression=zipfile.ZIP_DEFLATED) + compression=zipfile.ZIP_DEFLATED, + allowZip64=True) has_recovery = (OPTIONS.info_dict.get("no_recovery") != "true") system_root_image = (OPTIONS.info_dict.get("system_root_image", None) == "true")