summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index ca760d4..34ee350 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -855,6 +855,7 @@ int idevicerestore_start(struct idevicerestore_client_t* client)
unlink(filesystem);
return -2;
}
+ recovery_client_free(client);
}
idevicerestore_progress(client, RESTORE_STEP_PREPARE, 0.9);
@@ -874,6 +875,19 @@ int idevicerestore_start(struct idevicerestore_client_t* client)
if (delete_fs && filesystem)
unlink(filesystem);
+ /* special handling of AppleTVs */
+ if (strncmp(client->device->product_type, "AppleTV", 7) == 0) {
+ if (recovery_client_new(client) == 0) {
+ if (recovery_set_autoboot(client, 1) == 0) {
+ recovery_send_reset(client);
+ } else {
+ error("Setting auto-boot failed?!\n");
+ }
+ } else {
+ error("Could not connect to device in recovery mode.\n");
+ }
+ }
+
info("DONE\n");
if (result == 0) {