From 700d8f580e79ddc2f853cec8acc848706cbcbff5 Mon Sep 17 00:00:00 2001 From: "Brint E. Kriebel" Date: Tue, 16 Feb 2016 17:47:46 -0800 Subject: releasetools: Store the proper base64 release key in the target files This code was dropped when the original change (I7528a8e7c484ea9209cd665b9263328ae834586a) was cherry-picked into 13.0. Add it back in to the sign_target_files_apks.py file. Change-Id: I0177a7d2a39ae03b21d0b2b4ad48a621ca5afd7b Ticket: CYNGNOS-2067 --- tools/releasetools/sign_target_files_apks.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools') diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index ed7a4b7..abdb845 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -398,6 +398,14 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info): common.ZipWriteStr(output_tf_zip, "RECOVERY/RAMDISK/res/keys", new_recovery_keys) + # Save the base64 key representation in the update for key-change + # validations + p = common.Run(["python", "build/tools/getb64key.py", mapped_keys[0]], + stdout=subprocess.PIPE) + data, _ = p.communicate() + if p.returncode == 0: + common.ZipWriteStr(output_tf_zip, "META/releasekey.txt", data) + # SystemUpdateActivity uses the x509.pem version of the keys, but # put into a zipfile system/etc/security/otacerts.zip. # We DO NOT include the extra_recovery_keys (if any) here. -- cgit v1.1