releasetools: Prefer the avbtool specified in target_files.
This allows a consistent logic in using the avbtool which could be
board-specific.
Test: `atest releasetools_test`
Test: Run sign_target_files_apks.py on a target_files.zip.
Change-Id: I8cd93b8e71146985734f85c31f4662f5e2e9534c
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 668ad9b..5d0efc3 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -468,6 +468,7 @@
maxsize, name, payload_key))
signed_apex = apex_utils.SignApex(
+ misc_info['avb_avbtool'],
data,
payload_key,
container_key,
@@ -572,7 +573,8 @@
# key is specified via --avb_system_other_key.
signing_key = OPTIONS.avb_keys.get("system_other")
if signing_key:
- public_key = common.ExtractAvbPublicKey(signing_key)
+ public_key = common.ExtractAvbPublicKey(
+ misc_info['avb_avbtool'], signing_key)
print(" Rewriting AVB public key of system_other in /product")
common.ZipWrite(output_tf_zip, public_key, filename)