From 265d9aeb622c5829787b16b903f028cacaa99c18 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 11 Sep 2015 15:27:56 -0700 Subject: releasetools: Update the fingerprint when signing. ro.bootimage.build.fingerprint should be updated when signing. Bug: 22720426 Bug: 24009888 Change-Id: I5bd31858c6bc31edcecc6f5248f4274481506288 --- tools/releasetools/sign_target_files_apks.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index ec49112..60d62c2 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -203,11 +203,13 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info, common.ZipWriteStr(output_tf_zip, out_info, data) elif info.filename in ("SYSTEM/build.prop", "VENDOR/build.prop", + "BOOT/RAMDISK/default.prop", "RECOVERY/RAMDISK/default.prop"): print "rewriting %s:" % (info.filename,) new_data = RewriteProps(data, misc_info) common.ZipWriteStr(output_tf_zip, out_info, new_data) - if info.filename == "RECOVERY/RAMDISK/default.prop": + if info.filename in ("BOOT/RAMDISK/default.prop", + "RECOVERY/RAMDISK/default.prop"): write_to_temp(info.filename, info.external_attr, new_data) elif info.filename.endswith("mac_permissions.xml"): print "rewriting %s with new keys." % (info.filename,) @@ -310,6 +312,10 @@ def RewriteProps(data, misc_info): pieces = value.split("/") pieces[-1] = EditTags(pieces[-1]) value = "/".join(pieces) + elif key == "ro.bootimage.build.fingerprint": + pieces = value.split("/") + pieces[-1] = EditTags(pieces[-1]) + value = "/".join(pieces) elif key == "ro.build.description": pieces = value.split(" ") assert len(pieces) == 5 -- cgit v1.1