aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zheng <zhengdaniel@google.com>2024-03-21 21:19:30 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-03-21 21:19:30 +0000
commitbd61eeecd75ec69bd3c60924f61028db73742c3b (patch)
treed94255c2023ee1d9e5421cc2e32df0db6ad4885d
parent4e1a3498c1c8e1d6531b0ea537c61b83833d48e3 (diff)
parent02393ee106fdf9feb1b5d2d3532ee1418008a60c (diff)
downloadbuild-bd61eeecd75ec69bd3c60924f61028db73742c3b.tar.gz
Merge "Revert "allow command line override"" into main
-rwxr-xr-xtools/releasetools/ota_from_target_files.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 0b90b66cf0..c0ff5d2741 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -912,13 +912,12 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
# and install time performance. All OTA's with
# both the source build and target build with VIRTUAL_AB_COW_VERSION = 3
# can support the new format. Otherwise, fallback on older versions
- if not OPTIONS.vabc_cow_version:
- if not source_info.vabc_cow_version or not target_info.vabc_cow_version:
- OPTIONS.vabc_cow_version = 2
- elif source_info.vabc_cow_version != target_info.vabc_cow_version:
- OPTIONS.vabc_cow_version = min(source_info.vabc_cow_version, target_info.vabc_cow_version)
- if OPTIONS.vabc_cow_version:
- logger.info("Source or Target doesn't have VABC_COW_VERSION specified, using version: " + OPTIONS.vabc_cow_version)
+ if not source_info.vabc_cow_version or not target_info.vabc_cow_version:
+ logger.info("Source or Target doesn't have VABC_COW_VERSION specified, default to version 2")
+ OPTIONS.vabc_cow_version = 2
+ elif source_info.vabc_cow_version != target_info.vabc_cow_version:
+ logger.info("Source and Target have different cow VABC_COW_VERSION specified, default to minimum version")
+ OPTIONS.vabc_cow_version = min(source_info.vabc_cow_version, target_info.vabc_cow_version)
# Virtual AB Compression was introduced in Androd S.
# Later, we backported VABC to Android R. But verity support was not
# backported, so if VABC is used and we are on Android R, disable