From 77620b5a4501d1431546c016c951f02b1299f2f3 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 23 Feb 2017 11:04:36 -0800 Subject: [PATCH] Revert "Revert "releasetools: Allow using futility-host to sign old TF.zip."" This reverts commit d6145b6a160a7c171269d9408a675d8ff4f08283. The cause of the earlier breakage has been identified and fixed by commit 4b577413ff5c43e9b857f5c1685d6909e7ca27ba. Bug: 35467608 Test: lunch ryu-userdebug; m dist otatools-package (cherry picked from commit 4f30f7cfa1a46a90a1c60d81330c45d25c160aa8) --- tools/releasetools/common.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index a4862a6ab..43e387068 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -497,7 +497,13 @@ def _BuildBootableImage(sourcedir, fs_config_file, info_dict=None, elif info_dict.get("vboot", None): path = "/" + os.path.basename(sourcedir).lower() img_keyblock = tempfile.NamedTemporaryFile() - cmd = [info_dict["vboot_signer_cmd"], info_dict["futility"], + # We have switched from the prebuilt futility binary to using the tool + # (futility-host) built from the source. Override the setting in the old + # TF.zip. + futility = info_dict["futility"] + if futility.startswith("prebuilts/"): + futility = "futility-host" + cmd = [info_dict["vboot_signer_cmd"], futility, img_unsigned.name, info_dict["vboot_key"] + ".vbpubk", info_dict["vboot_key"] + ".vbprivk", info_dict["vboot_subkey"] + ".vbprivk", -- 2.11.0