Merge "Fix signing errors where some partitions aren't properly signed" am: ba106847ff
Original change: https://android-review.googlesource.com/c/platform/build/+/1583044 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Idb540ef7dd15d5354d175266f4b5327b131c2604
This commit is contained in:
@@ -444,6 +444,23 @@ def SignApk(data, keyname, pw, platform_api_level, codename_to_api_level_map,
|
|||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
def IsBuildPropFile(filename):
|
||||||
|
return filename in (
|
||||||
|
"SYSTEM/etc/prop.default",
|
||||||
|
"BOOT/RAMDISK/prop.default",
|
||||||
|
"RECOVERY/RAMDISK/prop.default",
|
||||||
|
|
||||||
|
"VENDOR_BOOT/RAMDISK/default.prop",
|
||||||
|
"VENDOR_BOOT/RAMDISK/prop.default",
|
||||||
|
|
||||||
|
# ROOT/default.prop is a legacy path, but may still exist for upgrading
|
||||||
|
# devices that don't support `property_overrides_split_enabled`.
|
||||||
|
"ROOT/default.prop",
|
||||||
|
|
||||||
|
# RECOVERY/RAMDISK/default.prop is a legacy path, but will always exist
|
||||||
|
# as a symlink in the current code. So it's a no-op here. Keeping the
|
||||||
|
# path here for clarity.
|
||||||
|
"RECOVERY/RAMDISK/default.prop") or filename.endswith("build.prop")
|
||||||
|
|
||||||
def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
|
def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
|
||||||
apk_keys, apex_keys, key_passwords,
|
apk_keys, apex_keys, key_passwords,
|
||||||
@@ -534,33 +551,7 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# System properties.
|
# System properties.
|
||||||
elif filename in (
|
elif IsBuildPropFile(filename):
|
||||||
"SYSTEM/build.prop",
|
|
||||||
|
|
||||||
"VENDOR/build.prop",
|
|
||||||
"SYSTEM/vendor/build.prop",
|
|
||||||
|
|
||||||
"ODM/etc/build.prop",
|
|
||||||
"VENDOR/odm/etc/build.prop",
|
|
||||||
|
|
||||||
"PRODUCT/build.prop",
|
|
||||||
"SYSTEM/product/build.prop",
|
|
||||||
|
|
||||||
"SYSTEM_EXT/build.prop",
|
|
||||||
"SYSTEM/system_ext/build.prop",
|
|
||||||
|
|
||||||
"SYSTEM/etc/prop.default",
|
|
||||||
"BOOT/RAMDISK/prop.default",
|
|
||||||
"RECOVERY/RAMDISK/prop.default",
|
|
||||||
|
|
||||||
# ROOT/default.prop is a legacy path, but may still exist for upgrading
|
|
||||||
# devices that don't support `property_overrides_split_enabled`.
|
|
||||||
"ROOT/default.prop",
|
|
||||||
|
|
||||||
# RECOVERY/RAMDISK/default.prop is a legacy path, but will always exist
|
|
||||||
# as a symlink in the current code. So it's a no-op here. Keeping the
|
|
||||||
# path here for clarity.
|
|
||||||
"RECOVERY/RAMDISK/default.prop"):
|
|
||||||
print("Rewriting %s:" % (filename,))
|
print("Rewriting %s:" % (filename,))
|
||||||
if stat.S_ISLNK(info.external_attr >> 16):
|
if stat.S_ISLNK(info.external_attr >> 16):
|
||||||
new_data = data
|
new_data = data
|
||||||
@@ -877,7 +868,6 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info):
|
|||||||
WriteOtacerts(output_tf_zip, "SYSTEM/etc/security/otacerts.zip", mapped_keys)
|
WriteOtacerts(output_tf_zip, "SYSTEM/etc/security/otacerts.zip", mapped_keys)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def ReplaceVerityPublicKey(output_zip, filename, key_path):
|
def ReplaceVerityPublicKey(output_zip, filename, key_path):
|
||||||
"""Replaces the verity public key at the given path in the given zip.
|
"""Replaces the verity public key at the given path in the given zip.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user