Support wiping userdata for A/B OTA packages.
update_engine now accepts POWERWASH=1 to schedule a factory reset in the post-install phase. Hook up with the --wipe_user_data flag in the OTA script. Bug: 28700985 Change-Id: Ie73876a61db90d124d2af588d674757376e9aabc
This commit is contained in:
parent
f80e55b821
commit
38ca0be399
1 changed files with 5 additions and 0 deletions
|
@ -1276,6 +1276,11 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file,
|
|||
p1.wait()
|
||||
assert p1.returncode == 0, "brillo_update_payload properties failed"
|
||||
|
||||
if OPTIONS.wipe_user_data:
|
||||
with open(properties_file, "a") as f:
|
||||
f.write("POWERWASH=1\n")
|
||||
metadata["ota-wipe"] = "yes"
|
||||
|
||||
# Add the signed payload file and properties into the zip.
|
||||
common.ZipWrite(output_zip, properties_file, arcname="payload_properties.txt")
|
||||
common.ZipWrite(output_zip, signed_payload_file, arcname="payload.bin",
|
||||
|
|
Loading…
Reference in a new issue