releasetools: Update the fingerprint when signing.

ro.bootimage.build.fingerprint should be updated when signing.

Bug: 22720426
Bug: 24009888
Change-Id: Ib246a257581fd31f90ad6b3d21f39d1a2de24ba8
(cherry picked from commit 265d9aeb62)
This commit is contained in:
Tao Bao 2015-09-11 15:27:56 -07:00
parent 87e0e8a764
commit cb7ff77da5
1 changed files with 7 additions and 1 deletions

View File

@ -208,11 +208,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,)
@ -317,6 +319,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