summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/ota_from_target_files.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/releasetools/ota_from_target_files.py')
-rwxr-xr-xtools/releasetools/ota_from_target_files.py23
1 files changed, 7 insertions, 16 deletions
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index bc40873..66db227 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -96,14 +96,6 @@ Usage: ota_from_target_files [flags] input_target_files output_ota_package
--backup <boolean>
Enable or disable the execution of backuptool.sh.
Disabled by default.
-
- --override_device <device>
- Override device-specific asserts. Can be a comma-separated list.
-
- --override_prop <boolean>
- Override build.prop items with custom vendor init.
- Enabled when TARGET_UNIFIED_DEVICE is defined in BoardConfig
-
"""
from __future__ import print_function
@@ -753,7 +745,7 @@ endif;
common.ZipWriteStr(output_zip, "system/build.prop",
""+input_zip.read("SYSTEM/build.prop"))
- common.ZipWriteStr(output_zip, "META-INF/org/cyanogenmod/releasekey",
+ common.ZipWriteStr(output_zip, "META-INF/org/lineageos/releasekey",
""+input_zip.read("META/releasekey.txt"))
def WritePolicyConfig(file_name, output_zip):
@@ -1629,10 +1621,6 @@ def main(argv):
"a float" % (a, o))
elif o in ("--backup",):
OPTIONS.backuptool = bool(a.lower() == 'true')
- elif o in ("--override_device",):
- OPTIONS.override_device = a
- elif o in ("--override_prop",):
- OPTIONS.override_prop = bool(a.lower() == 'true')
else:
return False
return True
@@ -1658,9 +1646,7 @@ def main(argv):
"verify",
"no_fallback_to_full",
"stash_threshold=",
- "backup=",
- "override_device=",
- "override_prop="
+ "backup="
], extra_option_handler=option_handler)
if len(args) != 2:
@@ -1676,6 +1662,11 @@ def main(argv):
OPTIONS.target_tmp = OPTIONS.input_tmp
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
+ if "ota_override_device" in OPTIONS.info_dict:
+ OPTIONS.override_device = OPTIONS.info_dict.get("ota_override_device")
+ if "ota_override_prop" in OPTIONS.info_dict:
+ OPTIONS.override_prop = OPTIONS.info_dict.get("ota_override_prop") == "true"
+
# If this image was originally labelled with SELinux contexts, make sure we
# also apply the labels in our new image. During building, the "file_contexts"
# is in the out/ directory tree, but for repacking from target-files.zip it's