Fix s to t OTA
Android S update_engine has a smaller minor version, we should use
update_engine version number from source build when generating an
incremental OTA.
Test: th
Bug: 277837157
Change-Id: Ic1ccdccd26c19bf9fb13d146a9151e699e481201
diff --git a/tools/releasetools/ota_utils.py b/tools/releasetools/ota_utils.py
index c419537..8c26114 100644
--- a/tools/releasetools/ota_utils.py
+++ b/tools/releasetools/ota_utils.py
@@ -839,6 +839,9 @@
major_version, minor_version = ParseUpdateEngineConfig(
os.path.join(target_dir, "META", "update_engine_config.txt"))
+ if source_file:
+ major_version, minor_version = ParseUpdateEngineConfig(
+ os.path.join(source_dir, "META", "update_engine_config.txt"))
if self.minor_version:
minor_version = self.minor_version
cmd.extend(["--major_version", str(major_version)])