summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r--tools/releasetools/common.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index f76f812..1fd9f76 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -52,6 +52,8 @@ class Options(object):
self.java_args = "-Xmx2048m" # JVM Args
self.public_key_suffix = ".x509.pem"
self.private_key_suffix = ".pk8"
+ # use otatools built boot_signer by default
+ self.boot_signer_path = "boot_signer"
self.verbose = False
self.tempfiles = []
self.device_specific = None
@@ -356,7 +358,8 @@ def BuildBootableImage(sourcedir, fs_config_file, info_dict=None):
if info_dict.get("verity_key", None):
path = "/" + os.path.basename(sourcedir).lower()
- cmd = ["boot_signer", path, img.name, info_dict["verity_key"] + ".pk8",
+ cmd = [OPTIONS.boot_signer_path, path, img.name,
+ info_dict["verity_key"] + ".pk8",
info_dict["verity_key"] + ".x509.pem", img.name]
p = Run(cmd, stdout=subprocess.PIPE)
p.communicate()
@@ -634,7 +637,8 @@ def ParseOptions(argv,
argv, "hvp:s:x:" + extra_opts,
["help", "verbose", "path=", "signapk_path=", "extra_signapk_args=",
"java_path=", "java_args=", "public_key_suffix=",
- "private_key_suffix=", "device_specific=", "extra="] +
+ "private_key_suffix=", "boot_signer_path=", "device_specific=",
+ "extra="] +
list(extra_long_opts))
except getopt.GetoptError as err:
Usage(docstring)
@@ -661,6 +665,8 @@ def ParseOptions(argv,
OPTIONS.public_key_suffix = a
elif o in ("--private_key_suffix",):
OPTIONS.private_key_suffix = a
+ elif o in ("--boot_signer_path",):
+ OPTIONS.boot_signer_path = a
elif o in ("-s", "--device_specific"):
OPTIONS.device_specific = a
elif o in ("-x", "--extra"):