// Otherwise, get ready to boot the main system...
finish_recovery(send_intent);
ui->Print("Rebooting...\n");
property_set(ANDROID_RB_PROPERTY, "reboot,");
return EXIT_SUCCESS;
}
int recovery_restore_special(char *des_dir_path, char *src_dir_path)
{
int ret= 0;
printf("\n\n++ %s ++\n\n", __func__);
printf("src dir:%s\n", src_dir_path);
printf("des dir:%s\n", des_dir_path);
//mount path
ret = ensure_path_mounted(src_dir_path);
if(ret < 0) {
printf("mount src dir error:%s\n", src_dir_path);
return -1;
}
printf("mount:%s ret=%d\n", src_dir_path, ret);
ret = ensure_path_mounted(des_dir_path);
if(ret < 0) {
printf("mount des dir error:%s\n", des_dir_path);
ensure_path_unmounted(src_dir_path);
return -1;
}
printf("mount:%s ret=%d\n", des_dir_path, ret);
//restore dir and file
ret = restore_dir_file(des_dir_path, src_dir_path);
printf("restore ret=%d\n", ret);