From 7138a9cc3abc36b07b75bf41b9559fdaa57dc9f9 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 3 Oct 2013 12:19:21 +0200 Subject: 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. --- src/idevicerestore.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/idevicerestore.c') 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) { -- cgit v1.1-32-gdbae