diff options
author | Brint E. Kriebel <bekit@cyngn.com> | 2016-02-16 17:47:46 -0800 |
---|---|---|
committer | Brint E. Kriebel <bekit@cyngn.com> | 2016-02-16 17:47:46 -0800 |
commit | 78479274e4ca2617646755b3d0197d1e232c24a6 (patch) | |
tree | 923dc11ddbea18d958eb269432dea17a1b5f4bf9 /tools/releasetools | |
parent | b77db58cbdfb4cbff5e2bd321453835f29165f02 (diff) | |
download | build-78479274e4ca2617646755b3d0197d1e232c24a6.zip build-78479274e4ca2617646755b3d0197d1e232c24a6.tar.gz build-78479274e4ca2617646755b3d0197d1e232c24a6.tar.bz2 |
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
Diffstat (limited to 'tools/releasetools')
-rwxr-xr-x | tools/releasetools/sign_target_files_apks.py | 8 |
1 files changed, 8 insertions, 0 deletions
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. |