Add a tool to merge two partial OTAs

Some partners have large number of products that share common
images. Generating OTAs for all these products waste a lot of CPU
cycles, because we waste time diffing the same images multiple times.
To mitigate this, add a tool for merging partial OTAs. Partners can
generate a partial OTA for common images, and re-use the generated OTA
by merging with each product specific OTA.

Bug: 227848550
Test: Run merge_otas.py on 4 OTAs, install the generated OTA

Change-Id: Ie38d522cdc9b89b1123b3d8190516c3648f99788
This commit is contained in:
Kelvin Zhang
2022-04-26 15:15:11 -07:00
parent bf01f8b3f0
commit 197772f069
7 changed files with 379 additions and 3 deletions

View File

@@ -2357,7 +2357,7 @@ def SignFile(input_name, output_name, key, password, min_api_level=None,
stdoutdata, _ = proc.communicate(password)
if proc.returncode != 0:
raise ExternalError(
"Failed to run signapk.jar: return code {}:\n{}".format(
"Failed to run {}: return code {}:\n{}".format(cmd,
proc.returncode, stdoutdata))
def SignSePolicy(sepolicy, key, password):