Added support for building verified vendor partition
Change-Id: I762724800ccab3a365e6d2efdf86cd9c394818eb
Signed-off-by: Daniel Rosenberg <drosen@google.com>
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index f8cba44..712e0cd 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -229,7 +229,7 @@
fs_type = prop_dict.get("fs_type", "")
run_fsck = False
- is_verity_partition = prop_dict.get("mount_point") == prop_dict.get("verity_mountpoint")
+ is_verity_partition = "verity_block_device" in prop_dict
verity_supported = prop_dict.get("verity") == "true"
# adjust the partition size to make room for the hashes if this is to be verified
if verity_supported and is_verity_partition:
@@ -315,10 +315,8 @@
"selinux_fc",
"skip_fsck",
"verity",
- "verity_block_device",
"verity_key",
- "verity_signer_cmd",
- "verity_mountpoint"
+ "verity_signer_cmd"
)
for p in common_props:
copy_prop(p, p)
@@ -327,6 +325,7 @@
if mount_point == "system":
copy_prop("fs_type", "fs_type")
copy_prop("system_size", "partition_size")
+ copy_prop("system_verity_block_device", "verity_block_device")
elif mount_point == "data":
# Copy the generic fs type first, override with specific one if available.
copy_prop("fs_type", "fs_type")
@@ -338,6 +337,7 @@
elif mount_point == "vendor":
copy_prop("vendor_fs_type", "fs_type")
copy_prop("vendor_size", "partition_size")
+ copy_prop("vendor_verity_block_device", "verity_block_device")
elif mount_point == "oem":
copy_prop("fs_type", "fs_type")
copy_prop("oem_size", "partition_size")
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 701a9cb..f2f35f4 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -153,6 +153,7 @@
makeint("recovery_api_version")
makeint("blocksize")
makeint("system_size")
+ makeint("vendor_size")
makeint("userdata_size")
makeint("cache_size")
makeint("recovery_size")