From 2b8f489e304e1afd7ae607000d5e7022328293db Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 13 Jun 2017 12:54:58 -0700 Subject: [PATCH] Allow sign_target_files_apks.py to create zip64 signed TF.zip. We should only disallow zip64 for the image and OTA zips (because we don't have zip64 support in libziparchive yet). But target_files zips are fine to use zip64 with host tools (and we already do that in add_img_to_target_files.py). This CL also sets the default compression method to DEFLATED when creating the signed TF.zip. Test: sign_target_files.apks.py signing a large TF.zip passes. Change-Id: I8043739860604134fa1166e920c95c28797bbcc1 --- tools/releasetools/sign_target_files_apks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index cabceec51..c66133363 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -634,7 +634,9 @@ def main(argv): sys.exit(1) input_zip = zipfile.ZipFile(args[0], "r") - output_zip = zipfile.ZipFile(args[1], "w") + output_zip = zipfile.ZipFile(args[1], "w", + compression=zipfile.ZIP_DEFLATED, + allowZip64=True) misc_info = common.LoadInfoDict(input_zip)