Wipe DATADATA as well when doing factory resets or wiping DATA.

This commit is contained in:
Koushik Dutta 2010-06-15 12:56:17 -07:00
parent 8b5e1856b3
commit 63e0476b6e
3 changed files with 13 additions and 2 deletions

View File

@ -26,7 +26,7 @@ LOCAL_MODULE := recovery
LOCAL_FORCE_STATIC_EXECUTABLE := true
RECOVERY_VERSION := ClockworkMod Recovery v2.0.0.0
RECOVERY_VERSION := ClockworkMod Recovery v2.0.0.2
LOCAL_CFLAGS := -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
RECOVERY_API_VERSION := 2
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)

View File

@ -145,7 +145,15 @@ cmd_format(const char *name, void *cookie, int argc, const char *argv[],
LOGE("Can't format %s\n", root);
return 1;
}
#ifdef HAS_DATADATA
if (0 == strcmp(root, "DATA:")) {
ret = format_root_device("DATADATA:");
if (ret != 0) {
LOGE("Can't format %s\n", root);
return 1;
}
}
#endif
return 0;
}

View File

@ -392,6 +392,9 @@ wipe_data(int confirm) {
ui_print("\n-- Wiping data...\n");
device_wipe_data();
erase_root("DATA:");
#ifdef HAS_DATADATA
erase_root("DATADATA:");
#endif
erase_root("CACHE:");
erase_root("SDEXT:");
ui_print("Data wipe complete.\n");