Don't generate hashtree when signing bundled APEXes.

Bug: 139957269
Test: Sign a target_files.zip. Extract a re-signed APEX and check the
      hashtree size (being zero).
Test: Use sign_apex to sign an APEX file. Check the hashtree size (not
      being zero).
Test: python -m unittest test_apex_utils
Test: python -m unittest test_sign_apex
Change-Id: I927b7681d66920d7732b700ec3a8f7a65b4cb351
This commit is contained in:
Tao Bao
2019-09-19 07:55:02 -07:00
parent 7be2b01f3c
commit 448004af9d
4 changed files with 54 additions and 17 deletions

View File

@@ -56,6 +56,7 @@ def SignApexFile(avbtool, apex_file, payload_key, container_key,
container_key=container_key,
container_pw=None,
codename_to_api_level_map=None,
no_hashtree=False,
signing_args=signing_args)
@@ -103,7 +104,8 @@ def main(argv):
args[0],
options['payload_key'],
options['container_key'],
options.get('payload_extra_args'))
no_hashtree=False,
signing_args=options.get('payload_extra_args'))
shutil.copyfile(signed_apex, args[1])
logger.info("done.")