releasetools: Pass --virtual-ab to lpmake.

Note that we are currently excluding this flag for retrofit devices,
since it necessitates support for a newer super.img format, which
retrofit devices may not fully support.

Bug: 134949511
Test: m -j, lpdump super_empty.img
Change-Id: Id69a8d755b9f4c4bb5fbd456a416ced1a5f1d135
This commit is contained in:
David Anderson
2019-12-13 15:44:41 -08:00
parent 5c3bf1b164
commit 117b52f74e

View File

@@ -76,6 +76,8 @@ def BuildSuperImageFromDict(info_dict, output):
"--super-name", info_dict["super_metadata_device"]]
ab_update = info_dict.get("ab_update") == "true"
virtual_ab = info_dict.get("virtual_ab") == "true"
virtual_ab_retrofit = info_dict.get("virtual_ab_retrofit") == "true"
retrofit = info_dict.get("dynamic_partition_retrofit") == "true"
block_devices = shlex.split(info_dict.get("super_block_devices", "").strip())
groups = shlex.split(info_dict.get("super_partition_groups", "").strip())
@@ -89,6 +91,8 @@ def BuildSuperImageFromDict(info_dict, output):
if ab_update and retrofit:
cmd.append("--auto-slot-suffixing")
if virtual_ab and not virtual_ab_retrofit:
cmd.append("--virtual-ab")
for device in block_devices:
size = info_dict["super_{}_device_size".format(device)]