summaryrefslogtreecommitdiff
path: root/apexer/apexer.py
diff options
context:
space:
mode:
authorJooyung Han <jooyung@google.com>2019-06-15 03:36:34 +0900
committerJooyung Han <jooyung@google.com>2019-08-28 00:23:20 +0900
commit78976855eb63cf1e6ea2e3f800e3011e92cf90e0 (patch)
tree7df8ce5141a2805695a53c164f5146454f662875 /apexer/apexer.py
parent53b703e8724506c1d8e84919b13c814cf2bd2f5a (diff)
apexer: add --no_hashtree option
This option is passed to avbtool so that it can omit hashtree of the payload image. It is used by apex build rule when it is not Unbundled_build. Bug: 139957269 Test: m {apex, e.g. com.android.resolv} Test: jar -x --file $OUT/apex/com.android.resolv.apex Test: avbtool info_image --image apex_payload.img Test: check if tree size is zero Change-Id: Ib2ef6e591df82a4826dba7d998cd81b7176d7bb1
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r--apexer/apexer.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py
index 4f2cb35..1b27c97 100644
--- a/apexer/apexer.py
+++ b/apexer/apexer.py
@@ -85,6 +85,12 @@ def ParseArgs(argv):
help='package name of the APK container. Default is the apex name in --manifest.'
)
parser.add_argument(
+ '--no_hashtree',
+ required=False,
+ action='store_true',
+ help='hashtree is omitted from "image".'
+ )
+ parser.add_argument(
'--android_jar_path',
required=False,
default='prebuilts/sdk/current/public/android.jar',
@@ -338,6 +344,8 @@ def CreateApex(args, work_dir):
salt = hashlib.sha256(manifest_raw).hexdigest()
cmd.extend(['--salt', salt])
cmd.extend(['--image', img_file])
+ if args.no_hashtree:
+ cmd.append('--no_hashtree')
RunCommand(cmd, args.verbose)
# Get the minimum size of the partition required.