Add a new flag "--disable_fec_computation" for OTA generation
We have added the flag to disable on device fec computation in
brillo_update_payload. Exposed it in ota_from_target_files as well.
Bug: 139723500
Test: generate an incremental package with the new flag
Change-Id: I683e3ec7791963a3c7e141ecb4e5a3fb53fe2108
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index c6c859c..24d0b2e 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -139,6 +139,9 @@
A/B OTA specific options
+ --disable_fec_computation
+ Disable the on device FEC data computation for incremental updates.
+
--include_secondary
Additionally include the payload for secondary slot images (default:
False). Only meaningful when generating A/B OTAs.
@@ -235,6 +238,7 @@
OPTIONS.retrofit_dynamic_partitions = False
OPTIONS.skip_compatibility_check = False
OPTIONS.output_metadata_path = None
+OPTIONS.disable_fec_computation = False
METADATA_NAME = 'META-INF/com/android/metadata'
@@ -571,6 +575,8 @@
"--target_image", target_file]
if source_file is not None:
cmd.extend(["--source_image", source_file])
+ if OPTIONS.disable_fec_computation:
+ cmd.extend(["--disable_fec_computation", "true"])
cmd.extend(additional_args)
self._Run(cmd)
@@ -2225,6 +2231,8 @@
OPTIONS.skip_compatibility_check = True
elif o == "--output_metadata_path":
OPTIONS.output_metadata_path = a
+ elif o == "--disable_fec_computation":
+ OPTIONS.disable_fec_computation = True
else:
return False
return True
@@ -2259,6 +2267,7 @@
"retrofit_dynamic_partitions",
"skip_compatibility_check",
"output_metadata_path=",
+ "disable_fec_computation",
], extra_option_handler=option_handler)
if len(args) != 2: