diff options
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/restore.c b/src/restore.c index f60bec1..7e23bd2 100644 --- a/src/restore.c +++ b/src/restore.c @@ -952,8 +952,8 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* unsigned char* personalized_data = NULL; unsigned int personalized_size = 0; - - if (build_identity_get_component_path(build_identity, "RestoreSEP", &restore_sep_path) == 0) { + + if (!build_identity_has_component(build_identity, "RestoreSEP") && build_identity_get_component_path(build_identity, "RestoreSEP", &restore_sep_path) == 0) { component = "RestoreSEP"; if (extract_component(client->ipsw, restore_sep_path, &component_data, &component_size) < 0) { error("ERROR: Unable to extract component: %s\n", component); @@ -961,7 +961,6 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* return -1; } - if (personalize_component(component, component_data, component_size, client->tss, &personalized_data, &personalized_size) < 0) { error("ERROR: Unable to get personalized component: %s\n", component); free(component_data); @@ -978,7 +977,7 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* personalized_size = 0; } - if (build_identity_get_component_path(build_identity, "SEP", &sep_path) == 0) { + if (!build_identity_has_component(build_identity, "SEP") && build_identity_get_component_path(build_identity, "SEP", &sep_path) == 0) { component = "SEP"; if (extract_component(client->ipsw, sep_path, &component_data, &component_size) < 0) { error("ERROR: Unable to extract component: %s\n", component); @@ -986,7 +985,6 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* return -1; } - if (personalize_component(component, component_data, component_size, client->tss, &personalized_data, &personalized_size) < 0) { error("ERROR: Unable to get personalized component: %s\n", component); free(component_data); |