Add option to wipe userdata am: 2451a30502 am: 0452942d6b
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2040556
Change-Id: I43d1154378f4cda6ca3f74396f3e3cff4305fb5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/scripts/update_device.py b/scripts/update_device.py
index db653dc..72cee49 100755
--- a/scripts/update_device.py
+++ b/scripts/update_device.py
@@ -442,6 +442,8 @@
help='Perform slot switch for this OTA package')
parser.add_argument('--perform-reset-slot-switch', action='store_true',
help='Perform reset slot switch for this OTA package')
+ parser.add_argument('--wipe-user-data', action='store_true',
+ help='Wipe userdata after installing OTA')
args = parser.parse_args()
logging.basicConfig(
level=logging.WARNING if args.no_verbose else logging.INFO)
@@ -493,6 +495,8 @@
args.extra_headers += "\nSWITCH_SLOT_ON_REBOOT=0"
if args.no_postinstall:
args.extra_headers += "\nRUN_POST_INSTALL=0"
+ if args.wipe_user_data:
+ args.extra_headers += "\nPOWERWASH=1"
with zipfile.ZipFile(args.otafile) as zfp:
CARE_MAP_ENTRY_NAME = "care_map.pb"