From ee19387905650cab5da7dd97ada5502cd17ac93d Mon Sep 17 00:00:00 2001 From: Andres Morales Date: Tue, 5 Aug 2014 19:49:09 -0700 Subject: Erase PST partition if its marked to be erased. We need to wipe the challenges on this partition if OEM unlock is enabled, as this is a signal that the user has opted out of factory reset protection. go/factory-reset Bug: 16633064 Change-Id: Icb8f1433bf99ca57813f5b72d5a3dd15fa94a263 --- recovery.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'recovery.cpp') diff --git a/recovery.cpp b/recovery.cpp index d2d85e7c7..f78d6e46c 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -659,6 +659,7 @@ wipe_data(int confirm, Device* device) { device->WipeData(); erase_volume("/data"); erase_volume("/cache"); + erase_persistent_partition(); ui->Print("Data wipe complete.\n"); } @@ -959,6 +960,7 @@ main(int argc, char **argv) { if (device->WipeData()) status = INSTALL_ERROR; if (erase_volume("/data")) status = INSTALL_ERROR; if (wipe_cache && erase_volume("/cache")) status = INSTALL_ERROR; + if (erase_persistent_partition() == -1 ) status = INSTALL_ERROR; if (status != INSTALL_SUCCESS) ui->Print("Data wipe failed.\n"); } else if (wipe_cache) { if (wipe_cache && erase_volume("/cache")) status = INSTALL_ERROR; -- cgit v1.2.3