fallback to v2 on s build

In the case that a vendor is on s build (which doesn't have snapuserd),
and is takinga  v3 -> v3 upgrade, we want to fallback to v2 vabc ota.

Test: th
Change-Id: Iba259b139b9b423ac77d82e14a113cf35fbfea64
This commit is contained in:
Daniel Zheng
2024-03-21 10:13:16 -07:00
parent 9339d8d98f
commit 4a80c5403d
2 changed files with 8 additions and 1 deletions

View File

@@ -1313,7 +1313,11 @@ def MergeDynamicPartitionInfoDicts(framework_dict, vendor_dict):
key = "super_%s_partition_list" % partition_group
merged_dict[key] = uniq_concat(
framework_dict.get(key, ""), vendor_dict.get(key, ""))
# in the case that vendor is on s build, but is taking a v3 -> v3 vabc ota, we want to fallback to v2
if "vabc_cow_version" not in vendor_dict or "vabc_cow_version" not in framework_dict:
merged_dict["vabc_cow_version"] = '2'
else:
merged_dict["vabc_cow_version"] = min(vendor_dict["vabc_cow_version"], framework_dict["vabc_cow_version"])
# Various other flags should be copied from the vendor dict, if defined.
for key in ("virtual_ab", "virtual_ab_retrofit", "lpmake",
"super_metadata_device", "super_partition_error_limit",