diff options
| author | 2024-04-25 08:17:09 -0700 | |
|---|---|---|
| committer | 2024-04-25 17:11:13 +0000 | |
| commit | cd6de1bc7f76aa059490f7d6b23e0d02e9a8bb8b (patch) | |
| tree | af9459036e1323c9d9c9473507a8dbd43eaee74a | |
| parent | 966e558e9f1b92014517822a91f9a7503c956c7c (diff) | |
Allow boot_variable_file to be read from input_target_files
If boot_variable_file is not found locally, look for it inside
input_target_files.
Bug: 335732867
Test: generate OTA with file in target-files.zip and verify metadata
Change-Id: I2e61f50850e82a3795f2e0e1aefcaf2329a8cfb1
| -rwxr-xr-x | tools/releasetools/ota_from_target_files.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 23762bba52..432ea199bb 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -195,6 +195,8 @@ A/B OTA specific options ro.product.* properties are overridden by the 'import' statement. The file expects one property per line, and each line has the following format: 'prop_name=value1,value2'. e.g. 'ro.boot.product.sku=std,pro' + The path specified can either be relative to the current working directory + or the path to a file inside of input_target_files. --skip_postinstall Skip the postinstall hooks when generating an A/B OTA package (default: @@ -1048,6 +1050,10 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None): from check_target_files_vintf import CheckVintfIfTrebleEnabled CheckVintfIfTrebleEnabled(target_file, target_info) + # Allow boot_variable_file to also exist in target-files + if OPTIONS.boot_variable_file: + if not os.path.isfile(OPTIONS.boot_variable_file): + OPTIONS.boot_variable_file = os.path.join(target_file, OPTIONS.boot_variable_file) # Metadata to comply with Android OTA package format. metadata = GetPackageMetadata(target_info, source_info) # Generate payload. |