diff --git a/nandroid.c b/nandroid.c index 4f7724a..5d7b9d4 100644 --- a/nandroid.c +++ b/nandroid.c @@ -227,7 +227,7 @@ int nandroid_restore_partition_extended(const char* backup_path, const char* mou return ret; } */ - if (0 != (ret = format_device(mount_point))) { + if (0 != (ret = format_volume(mount_point))) { ui_print("Error while formatting %s!\n", mount_point); return ret; } diff --git a/recovery.c b/recovery.c index 04d13c9..33b54ba 100644 --- a/recovery.c +++ b/recovery.c @@ -681,8 +681,9 @@ wipe_data(int confirm) { device_wipe_data(); erase_volume("/data"); erase_volume("/cache"); +#ifdef BOARD_HAS_DATADATA erase_volume("/datadata"); - erase_volume("/datadata"); +#endif erase_volume("/sd-ext"); erase_volume("/sdcard/.android_secure"); ui_print("Data wipe complete.\n"); diff --git a/roots.c b/roots.c index 184bfd0..70d5578 100644 --- a/roots.c +++ b/roots.c @@ -196,6 +196,9 @@ int ensure_path_unmounted(const char* path) { int format_volume(const char* volume) { Volume* v = volume_for_path(volume); if (v == NULL) { + // silent failure for sd-ext + if (strcmp(volume, "/sd-ext") == 0) + return -1; LOGE("unknown volume \"%s\"\n", volume); return -1; } @@ -205,8 +208,11 @@ int format_volume(const char* volume) { return -1; } if (strcmp(v->mount_point, volume) != 0) { +#if 0 LOGE("can't give path \"%s\" to format_volume\n", volume); return -1; +#endif + return format_unknown_device(volume); } if (ensure_path_unmounted(volume) != 0) {