Do not unmount on wipe unless needed. Add reboot binary. Restart recovery process for Galaxy S.
This commit is contained in:
		@@ -18,6 +18,10 @@ LOCAL_SRC_FILES := \
 | 
			
		||||
	ui.c \
 | 
			
		||||
	verifier.c
 | 
			
		||||
 | 
			
		||||
LOCAL_SRC_FILES += \
 | 
			
		||||
    reboot.c \
 | 
			
		||||
    setprop.c
 | 
			
		||||
 | 
			
		||||
ifndef BOARD_HAS_NO_MISC_PARTITION
 | 
			
		||||
    LOCAL_SRC_FILES += \
 | 
			
		||||
        firmware.c \
 | 
			
		||||
@@ -36,7 +40,7 @@ LOCAL_MODULE := recovery
 | 
			
		||||
 | 
			
		||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
 | 
			
		||||
 | 
			
		||||
RECOVERY_VERSION := ClockworkMod Recovery v2.5.0.1
 | 
			
		||||
RECOVERY_VERSION := ClockworkMod Recovery v2.5.0.4
 | 
			
		||||
LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
 | 
			
		||||
RECOVERY_API_VERSION := 2
 | 
			
		||||
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
 | 
			
		||||
@@ -138,7 +142,7 @@ LOCAL_STATIC_LIBRARIES += libstdc++ libc
 | 
			
		||||
 | 
			
		||||
include $(BUILD_EXECUTABLE)
 | 
			
		||||
 | 
			
		||||
RECOVERY_LINKS := amend busybox flash_image dump_image mkyaffs2image unyaffs erase_image nandroid
 | 
			
		||||
RECOVERY_LINKS := amend busybox flash_image dump_image mkyaffs2image unyaffs erase_image nandroid reboot
 | 
			
		||||
 | 
			
		||||
# nc is provided by external/netcat
 | 
			
		||||
SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(RECOVERY_LINKS))
 | 
			
		||||
 
 | 
			
		||||
@@ -6,4 +6,11 @@ touch /tmp/.ignorebootmessage
 | 
			
		||||
kill $(ps | grep /sbin/adbd)
 | 
			
		||||
kill $(ps | grep /sbin/recovery)
 | 
			
		||||
 | 
			
		||||
# On the Galaxy S, the recovery comes test signed, but the
 | 
			
		||||
# recovery is not automatically restarted.
 | 
			
		||||
if [ -f /init.smdkc110.rc ]
 | 
			
		||||
then
 | 
			
		||||
    /sbin/recovery &
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
exit 1
 | 
			
		||||
@@ -228,10 +228,12 @@ int nandroid_restore_partition_extended(const char* backup_path, const char* roo
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ui_print("Restoring %s...\n", name);
 | 
			
		||||
    /*
 | 
			
		||||
    if (0 != (ret = ensure_root_path_unmounted(root))) {
 | 
			
		||||
        ui_print("Can't unmount %s!\n", mount_point);
 | 
			
		||||
        return ret;
 | 
			
		||||
    }
 | 
			
		||||
    */
 | 
			
		||||
    if (0 != (ret = format_root_device(root))) {
 | 
			
		||||
        ui_print("Error while formatting %s!\n", root);
 | 
			
		||||
        return ret;
 | 
			
		||||
 
 | 
			
		||||
@@ -536,6 +536,10 @@ main(int argc, char **argv)
 | 
			
		||||
            return amend_main(argc, argv);
 | 
			
		||||
        if (strstr(argv[0], "nandroid"))
 | 
			
		||||
            return nandroid_main(argc, argv);
 | 
			
		||||
        if (strstr(argv[0], "reboot"))
 | 
			
		||||
            return reboot_main(argc, argv);
 | 
			
		||||
        if (strstr(argv[0], "setprop"))
 | 
			
		||||
            return setprop_main(argc, argv);
 | 
			
		||||
		return busybox_driver(argc, argv);
 | 
			
		||||
	}
 | 
			
		||||
    __system("/sbin/postrecoveryboot.sh");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								roots.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								roots.c
									
									
									
									
									
								
							@@ -345,7 +345,7 @@ format_root_device(const char *root)
 | 
			
		||||
        LOGW("format_root_device: can't resolve \"%s\"\n", root);
 | 
			
		||||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
    if (info->mount_point != NULL) {
 | 
			
		||||
    if (info->mount_point != NULL && info->device == g_mtd_device) {
 | 
			
		||||
        /* Don't try to format a mounted device.
 | 
			
		||||
         */
 | 
			
		||||
        int ret = ensure_root_path_unmounted(root);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user