support DATADATA
This commit is contained in:
parent
14239d291a
commit
8b5e1856b3
@ -26,7 +26,7 @@ LOCAL_MODULE := recovery
|
||||
|
||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
||||
|
||||
RECOVERY_VERSION := ClockworkMod Recovery v1.8.2.8
|
||||
RECOVERY_VERSION := ClockworkMod Recovery v2.0.0.0
|
||||
LOCAL_CFLAGS := -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
|
||||
RECOVERY_API_VERSION := 2
|
||||
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
|
||||
@ -67,6 +67,10 @@ ifdef BOARD_CACHE_FILESYSTEM
|
||||
LOCAL_CFLAGS += -DCACHE_FILESYSTEM=\"$(BOARD_CACHE_FILESYSTEM)\"
|
||||
endif
|
||||
|
||||
ifdef BOARD_HAS_DATADATA
|
||||
LOCAL_CFLAGS += -DHAS_DATADATA
|
||||
endif
|
||||
|
||||
# This binary is in the recovery ramdisk, which is otherwise a copy of root.
|
||||
# It gets copied there in config/Makefile. LOCAL_MODULE_TAGS suppresses
|
||||
# a (redundant) copy of the binary in /system/bin for user builds.
|
||||
|
12
nandroid.c
12
nandroid.c
@ -145,6 +145,11 @@ int nandroid_backup(const char* backup_path)
|
||||
if (0 != (ret = nandroid_backup_partition(backup_path, "DATA:")))
|
||||
return ret;
|
||||
|
||||
#ifdef HAS_DATADATA
|
||||
if (0 != (ret = nandroid_backup_partition(backup_path, "DATADATA:")))
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
if (0 != (ret = nandroid_backup_partition(backup_path, "CACHE:")))
|
||||
return ret;
|
||||
|
||||
@ -156,7 +161,7 @@ int nandroid_backup(const char* backup_path)
|
||||
else
|
||||
{
|
||||
if (0 != ensure_root_path_mounted("SDEXT:"))
|
||||
ui_print("Could not mount sd-ext. sd-ext backup may not be supported on this device. Skipping backup of sd-ext.");
|
||||
ui_print("Could not mount sd-ext. sd-ext backup may not be supported on this device. Skipping backup of sd-ext.\n");
|
||||
else if (0 != (ret = nandroid_backup_partition(backup_path, "SDEXT:")))
|
||||
return ret;
|
||||
}
|
||||
@ -252,6 +257,11 @@ int nandroid_restore(const char* backup_path, int restore_boot, int restore_syst
|
||||
|
||||
if (restore_data && 0 != (ret = nandroid_restore_partition(backup_path, "DATA:")))
|
||||
return ret;
|
||||
|
||||
#ifdef HAS_DATADATA
|
||||
if (restore_data && 0 != (ret = nandroid_restore_partition(backup_path, "DATADATA:")))
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
if (restore_cache && 0 != (ret = nandroid_restore_partition(backup_path, "CACHE:")))
|
||||
return ret;
|
||||
|
11
roots.c
11
roots.c
@ -60,6 +60,14 @@ static const char g_package_file[] = "@\0g_package_file";
|
||||
#define DATA_FILESYSTEM "yaffs2"
|
||||
#endif
|
||||
|
||||
#ifndef DATADATA_DEVICE
|
||||
#define DATADATA_DEVICE g_mtd_device
|
||||
#endif
|
||||
|
||||
#ifndef DATADATA_FILESYSTEM
|
||||
#define DATADATA_FILESYSTEM "yaffs2"
|
||||
#endif
|
||||
|
||||
#ifndef CACHE_DEVICE
|
||||
#define CACHE_DEVICE g_mtd_device
|
||||
#endif
|
||||
@ -72,6 +80,9 @@ static RootInfo g_roots[] = {
|
||||
{ "BOOT:", g_mtd_device, NULL, "boot", NULL, g_raw },
|
||||
{ "CACHE:", CACHE_DEVICE, NULL, "cache", "/cache", CACHE_FILESYSTEM },
|
||||
{ "DATA:", DATA_DEVICE, NULL, "userdata", "/data", DATA_FILESYSTEM },
|
||||
#ifdef HAS_DATADATA
|
||||
{ "DATADATA:", DATADATA_DEVICE, NULL, "datadata", "/datadata", DATADATA_FILESYSTEM },
|
||||
#endif
|
||||
{ "MISC:", g_mtd_device, NULL, "misc", NULL, g_raw },
|
||||
{ "PACKAGE:", NULL, NULL, NULL, NULL, g_package_file },
|
||||
{ "RECOVERY:", g_mtd_device, NULL, "recovery", "/", g_raw },
|
||||
|
Loading…
Reference in New Issue
Block a user