diff options
author | Tao Bao <tbao@google.com> | 2019-05-10 15:47:37 -0700 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2019-05-10 15:57:20 -0700 |
commit | 1dac1d4164bbdd80c22b42220b1335d5bab264df (patch) | |
tree | ffb4332495573ca767f2b32347d6a8f764425b82 | |
parent | aa448d138ba92790f8283fda9e525bb736b38916 (diff) | |
download | build-1dac1d4164bbdd80c22b42220b1335d5bab264df.tar.gz |
releasetools: Unzip all files when generating image archive.
Commit 7df64c3e starts to call common.LoadInfoDict() when generating
image archive, which reads additional files under BOOT/, RECOVERY/ and
ROOT/. Unzip everything from the target_files.zip.
Bug: 132456827
Test: Run img_from_target_files.py on previously failing
target_files.zip.
Change-Id: I22ee57c4f765bee9494478bf115b1581877401f4
-rwxr-xr-x | tools/releasetools/img_from_target_files.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/releasetools/img_from_target_files.py b/tools/releasetools/img_from_target_files.py index 6165d96d6e..8fb98717b5 100755 --- a/tools/releasetools/img_from_target_files.py +++ b/tools/releasetools/img_from_target_files.py @@ -180,8 +180,10 @@ def main(argv): OPTIONS.input_tmp = target_files elif zipfile.is_zipfile(target_files): logger.info("Building image zip from target files zip.") - OPTIONS.input_tmp = common.UnzipTemp(target_files, - ["IMAGES/*", "OTA/*", "META/*"]) + # We need files under IMAGES/, OTA/, META/ for img_from_target_files.py. + # However, common.LoadInfoDict() may read additional files under BOOT/, + # RECOVERY/ and ROOT/. So unzip everything from the target_files.zip. + OPTIONS.input_tmp = common.UnzipTemp(target_files) else: raise ValueError("%s is not a valid path." % target_files) |