From 84306559317a8ddcfba6fad5cc6ea7217161e206 Mon Sep 17 00:00:00 2001 From: "Koushik K. Dutta" Date: Sun, 18 Apr 2010 21:21:58 -0700 Subject: [PATCH] format BOOT on nandroid restore. --- Android.mk | 2 +- nandroid.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Android.mk b/Android.mk index c421d72..a440899 100644 --- a/Android.mk +++ b/Android.mk @@ -26,7 +26,7 @@ LOCAL_MODULE := recovery LOCAL_FORCE_STATIC_EXECUTABLE := true -RECOVERY_VERSION := ClockworkMod Recovery v1.8.1.0 +RECOVERY_VERSION := ClockworkMod Recovery v1.8.1.1 LOCAL_CFLAGS := -DRECOVERY_VERSION="$(RECOVERY_VERSION)" RECOVERY_API_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) diff --git a/nandroid.c b/nandroid.c index 9f039dd..44d0236 100644 --- a/nandroid.c +++ b/nandroid.c @@ -224,6 +224,9 @@ int nandroid_restore(const char* backup_path, int restore_boot, int restore_syst int ret; if (restore_boot) { + ui_print("Erasing boot before restore...\n"); + if (0 != (ret = format_root_device("BOOT:"))) + return print_and_error("Error while formatting BOOT:!\n"); sprintf(tmp, "flash_image boot %s/boot.img", backup_path); ui_print("Restoring boot image...\n"); if (0 != (ret = __system(tmp))) {