diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2020-11-13 16:00:00 -0500 |
---|---|---|
committer | Kelvin Zhang <zhangkelvin@google.com> | 2020-11-17 16:27:43 -0500 |
commit | 8212f53f9d05472ce6f25b2cb5c9f4537a5e71a3 (patch) | |
tree | 8adbbf5e85ac55c887898c544b87b69a5847e383 /scripts/update_device.py | |
parent | 3f60d53253c609715c490f8cfe7a083d8727fc12 (diff) |
Add no_slot_switch flag to update_device script
Test: treehugger
Change-Id: I996e8ece01d5a68e9093460f24c84031f8419c53
Diffstat (limited to 'scripts/update_device.py')
-rwxr-xr-x | scripts/update_device.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/update_device.py b/scripts/update_device.py index 756d443f..757c147e 100755 --- a/scripts/update_device.py +++ b/scripts/update_device.py @@ -403,6 +403,8 @@ def main(): help='Extra headers to pass to the device.') parser.add_argument('--secondary', action='store_true', help='Update with the secondary payload in the package.') + parser.add_argument('--no-slot-switch', action='store_true', + help='Do not perform slot switch after the update.') args = parser.parse_args() logging.basicConfig( level=logging.WARNING if args.no_verbose else logging.INFO) @@ -420,6 +422,9 @@ def main(): help_cmd = ['shell', 'su', '0', 'update_engine_client', '--help'] use_omaha = 'omaha' in dut.adb_output(help_cmd) + if args.no_slot_switch: + args.extra_headers += "\nSWITCH_SLOT_ON_REBOOT=0" + if args.file: # Update via pushing a file to /data. device_ota_file = os.path.join(OTA_PACKAGE_PATH, 'debug.zip') |