From 2a0d1da4d9c064e8cefd581aea9031aa9e79a3be Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 13 Jan 2017 11:56:54 -0800 Subject: [PATCH] releasetools: Delete the obsolete --aslr_mode/-a flag. It was added in commit 96be7205dce97977909e93b73f48779fcce3bc65 ("Working ASLR implementation.") in 2010, and removed in commit 1807e700a568d57901b835370d1b1ae05c3dbb0f ("don't generate retouch commands in OTA scripts") in 2012. Remove the obsolete --aslr_mode flag. Test: ota_from_target_files.py still works (by generating incremental and full OTAs respectively). Change-Id: I6d8e62730ac192f3574d484c4a4b9b43b4ee0a9e --- tools/releasetools/ota_from_target_files.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 4d5b8b885..0f129820c 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -75,9 +75,6 @@ Usage: ota_from_target_files [flags] input_target_files output_ota_package -e (--extra_script) Insert the contents of file at the end of the update script. - -a (--aslr_mode) - Specify whether to turn on ASLR for the package (on by default). - -2 (--two_step) Generate a 'two-step' OTA package, where recovery is updated first, so that any changes made to the system partition are done @@ -148,7 +145,6 @@ OPTIONS.patch_threshold = 0.95 OPTIONS.wipe_user_data = False OPTIONS.downgrade = False OPTIONS.extra_script = None -OPTIONS.aslr_mode = True OPTIONS.worker_threads = multiprocessing.cpu_count() // 2 if OPTIONS.worker_threads == 0: OPTIONS.worker_threads = 1 @@ -1987,11 +1983,6 @@ def main(argv): OPTIONS.oem_no_mount = True elif o in ("-e", "--extra_script"): OPTIONS.extra_script = a - elif o in ("-a", "--aslr_mode"): - if a in ("on", "On", "true", "True", "yes", "Yes"): - OPTIONS.aslr_mode = True - else: - OPTIONS.aslr_mode = False elif o in ("-t", "--worker_threads"): if a.isdigit(): OPTIONS.worker_threads = int(a) @@ -2029,7 +2020,7 @@ def main(argv): return True args = common.ParseOptions(argv, __doc__, - extra_opts="b:k:i:d:we:t:a:2o:", + extra_opts="b:k:i:d:we:t:2o:", extra_long_opts=[ "board_config=", "package_key=", @@ -2040,7 +2031,6 @@ def main(argv): "downgrade", "extra_script=", "worker_threads=", - "aslr_mode=", "two_step", "no_signing", "block",