summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-10-03 12:19:21 +0200
committerGravatar Nikias Bassen2013-10-03 12:19:21 +0200
commit7138a9cc3abc36b07b75bf41b9559fdaa57dc9f9 (patch)
tree1826ae0ada5a892d38d0c847675c4be0dc7b17da /src/idevicerestore.c
parentb040d1b5f4732a431c1d900b55d6bbd3684f6c74 (diff)
downloadidevicerestore-7138a9cc3abc36b07b75bf41b9559fdaa57dc9f9.tar.gz
idevicerestore-7138a9cc3abc36b07b75bf41b9559fdaa57dc9f9.tar.bz2
AppleTV: set auto-boot to true again after restore
Apparently AppleTV units don't boot up in normal mode after restore but switch into recovery mode so we set auto-boot to true to make them boot up in normal 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) {