aboutsummaryrefslogtreecommitdiffstats
path: root/recovery.c
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2013-08-15 17:55:04 -0700
committerKoushik Dutta <koushd@gmail.com>2013-09-26 18:13:56 -0700
commit03ad1bfa8585391b88826dde41e66623c2f355a3 (patch)
treef8da5dd44bd54738ca0a91459c4082b3157f49f8 /recovery.c
parent0f7f15cb1bd8e8811dbb8a427557d13993761478 (diff)
downloadandroid_bootable_recovery-cm-10.1.tar.gz
android_bootable_recovery-cm-10.1.tar.bz2
android_bootable_recovery-cm-10.1.zip
Fix issue where android device manager, etc, dont actually wipe data.cm-10.1
--wipe_data issues via /cache/recovery/command will now completely format data. All other manual wipe commands will preserve data on /data/media. There is another mounts/storage option that will do a true data format. Change-Id: Ie8ecd2b0e14c3bb1d8a404ea868cdf703455d2ab
Diffstat (limited to 'recovery.c')
-rw-r--r--recovery.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/recovery.c b/recovery.c
index 60eb224d..2145b60e 100644
--- a/recovery.c
+++ b/recovery.c
@@ -758,7 +758,9 @@ setup_adbd() {
check_and_fclose(file_src, key_src);
}
}
+ ignore_data_media_workaround(1);
ensure_path_unmounted("/data");
+ ignore_data_media_workaround(0);
// Trigger (re)start of adb daemon
property_set("service.adb.root", "1");
@@ -924,7 +926,9 @@ main(int argc, char **argv) {
if (status != INSTALL_SUCCESS) ui_print("Installation aborted.\n");
} else if (wipe_data) {
if (device_wipe_data()) status = INSTALL_ERROR;
+ ignore_data_media_workaround(1);
if (erase_volume("/data")) status = INSTALL_ERROR;
+ ignore_data_media_workaround(0);
if (has_datadata() && erase_volume("/datadata")) status = INSTALL_ERROR;
if (wipe_cache && erase_volume("/cache")) status = INSTALL_ERROR;
if (status != INSTALL_SUCCESS) ui_print("Data wipe failed.\n");