aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2016-11-08 14:08:53 -0600
committerTao Bao2016-11-08 14:48:43 -0600
commite95540e06000f3b0b33bf12374135111ecf45bd5 (patch)
tree0885c77f99d18cbe5a0c73e2a60b7dd9c84d7b95 /tools/releasetools/sign_target_files_apks.py
parent49758959f204f408f3391e9c1541e8f3e61a0b6f (diff)
downloadplatform-build-e95540e06000f3b0b33bf12374135111ecf45bd5.tar.gz
platform-build-e95540e06000f3b0b33bf12374135111ecf45bd5.tar.xz
platform-build-e95540e06000f3b0b33bf12374135111ecf45bd5.zip
releasetools: Use java_path in sign_target_files_apks.py.
Prior to this CL, it was calling the hard-coded "java" although it was accepting a "--java_path" option. Also switch OPTIONS.java_args from string to list. Otherwise it won't work when providing multiple args. Bug: 32737832 Test: Specify "--java_path=" and "--java_args" when invoking sign_target_files_apks.py with "-v". Check the commands being called. Change-Id: Id7ef98e778646d532027434de7fba9b7a104dbd0
Diffstat (limited to 'tools/releasetools/sign_target_files_apks.py')
-rwxr-xr-xtools/releasetools/sign_target_files_apks.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 7f69a575e..394ad0a88 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -472,11 +472,11 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info):
472 # recovery uses a version of the key that has been slightly 472 # recovery uses a version of the key that has been slightly
473 # predigested (by DumpPublicKey.java) and put in res/keys. 473 # predigested (by DumpPublicKey.java) and put in res/keys.
474 # extra_recovery_keys are used only in recovery. 474 # extra_recovery_keys are used only in recovery.
475 475 cmd = ([OPTIONS.java_path] + OPTIONS.java_args +
476 p = common.Run(["java", "-jar", 476 ["-jar",
477 os.path.join(OPTIONS.search_path, "framework", "dumpkey.jar")] 477 os.path.join(OPTIONS.search_path, "framework", "dumpkey.jar")] +
478 + mapped_keys + extra_recovery_keys, 478 mapped_keys + extra_recovery_keys)
479 stdout=subprocess.PIPE) 479 p = common.Run(cmd, stdout=subprocess.PIPE)
480 new_recovery_keys, _ = p.communicate() 480 new_recovery_keys, _ = p.communicate()
481 if p.returncode != 0: 481 if p.returncode != 0:
482 raise common.ExternalError("failed to run dumpkeys") 482 raise common.ExternalError("failed to run dumpkeys")