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
This commit is contained in:
@@ -472,11 +472,11 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info):
|
||||
# recovery uses a version of the key that has been slightly
|
||||
# predigested (by DumpPublicKey.java) and put in res/keys.
|
||||
# extra_recovery_keys are used only in recovery.
|
||||
|
||||
p = common.Run(["java", "-jar",
|
||||
os.path.join(OPTIONS.search_path, "framework", "dumpkey.jar")]
|
||||
+ mapped_keys + extra_recovery_keys,
|
||||
stdout=subprocess.PIPE)
|
||||
cmd = ([OPTIONS.java_path] + OPTIONS.java_args +
|
||||
["-jar",
|
||||
os.path.join(OPTIONS.search_path, "framework", "dumpkey.jar")] +
|
||||
mapped_keys + extra_recovery_keys)
|
||||
p = common.Run(cmd, stdout=subprocess.PIPE)
|
||||
new_recovery_keys, _ = p.communicate()
|
||||
if p.returncode != 0:
|
||||
raise common.ExternalError("failed to run dumpkeys")
|
||||
|
Reference in New Issue
Block a user