Add cli option to enable multi-threaded compression
Test: update_device.py --enable-threading, make sure threading is being
turned on
Change-Id: I1d0e5ab5c2e65cc48b5126fb186f770b68188351
diff --git a/scripts/update_device.py b/scripts/update_device.py
index 7cf66a5..8f4e583 100755
--- a/scripts/update_device.py
+++ b/scripts/update_device.py
@@ -483,6 +483,10 @@
help='Wipe userdata after installing OTA')
parser.add_argument('--disable-vabc', action='store_true',
help='Disable vabc during OTA')
+ parser.add_argument('--enable-threading', action='store_true',
+ help='Enable multi-threaded compression for VABC')
+ parser.add_argument('--batched-writes', action='store_true',
+ help='Enable batched writes for VABC')
parser.add_argument('--speed-limit', type=str,
help='Speed limit for serving payloads over HTTP. For '
'example: 10K, 5m, 1G, input is case insensitive')
@@ -545,6 +549,10 @@
args.extra_headers += "\nPOWERWASH=1"
if args.disable_vabc:
args.extra_headers += "\nDISABLE_VABC=1"
+ if args.enable_threading:
+ args.extra_headers += "\nENABLE_THREADING=1"
+ if args.batched_writes:
+ args.extra_headers += "\nBATCHED_WRITES=1"
with zipfile.ZipFile(args.otafile) as zfp:
CARE_MAP_ENTRY_NAME = "care_map.pb"