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
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 8a8a613..513fce5 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1313,7 +1313,11 @@
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",