diff options
author | Gabriele M <moto.falcon.git@gmail.com> | 2017-01-10 23:14:12 +0100 |
---|---|---|
committer | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2017-01-23 11:06:28 +0800 |
commit | 24d91d8dd36b1b2a681461bea56a44605521861e (patch) | |
tree | cab307e72db417adcbfdfdce7975b4cffa6878d3 /tools/releasetools/ota_from_target_files.py | |
parent | ce54189f4551fda90f95d6a015bd0b897c9c73a3 (diff) | |
download | build-24d91d8dd36b1b2a681461bea56a44605521861e.zip build-24d91d8dd36b1b2a681461bea56a44605521861e.tar.gz build-24d91d8dd36b1b2a681461bea56a44605521861e.tar.bz2 |
ota_from_target_files: Remove device dependent arguments
These device-specific arguments are defined at build time and are
necessary to generate the zip correctly. Don't use command line
arguments to specify them, but write all the needed information
in misc_info.txt when the target-files zip is generated.
ota_from_target_files will then read misc_info.txt and set
everything automatically.
Change-Id: Ibdbca575b76eb07b53fccfcea52a351c7e333f91
Diffstat (limited to 'tools/releasetools/ota_from_target_files.py')
-rwxr-xr-x | tools/releasetools/ota_from_target_files.py | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index e483b1c..c2fbb1d 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 @@ -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,15 +1646,18 @@ 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: common.Usage(__doc__) sys.exit(1) + 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 OPTIONS.extra_script is not None: OPTIONS.extra_script = open(OPTIONS.extra_script).read() |