diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/idevicerestore.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index ef547eb..a08d319 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -647,18 +647,6 @@ int idevicerestore_start(struct idevicerestore_client_t* client) } idevicerestore_progress(client, RESTORE_STEP_PREPARE, 0.1); - // if the device is in normal mode, place device into recovery mode - if (client->mode->index == MODE_NORMAL) { - info("Entering recovery mode...\n"); - if (normal_enter_recovery(client) < 0) { - error("ERROR: Unable to place device into recovery mode from %s mode\n", client->mode->string); - if (client->tss) - plist_free(client->tss); - plist_free(buildmanifest); - return -5; - } - } - // Get filesystem name from build identity char* fsname = NULL; if (build_identity_get_component_path(build_identity, "OS", &fsname) < 0) { @@ -753,6 +741,18 @@ int idevicerestore_start(struct idevicerestore_client_t* client) } } + // if the device is in normal mode, place device into recovery mode + if (client->mode->index == MODE_NORMAL) { + info("Entering recovery mode...\n"); + if (normal_enter_recovery(client) < 0) { + error("ERROR: Unable to place device into recovery mode from %s mode\n", client->mode->string); + if (client->tss) + plist_free(client->tss); + plist_free(buildmanifest); + return -5; + } + } + idevicerestore_progress(client, RESTORE_STEP_PREPARE, 0.3); // if the device is in DFU mode, place device into recovery mode |