From ac89f2f629ded140511fc6239e63d9d73eee6328 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 26 Sep 2012 13:05:26 +0200 Subject: idevicerestore: Make first nonce request not mandatory to support "old" iOS builds Devices running iOS 4.x and older do not use or supply a nonce before an actual iBEC of the target firmware version is loaded which does so. This caused older devices to fail to restore. --- src/idevicerestore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/idevicerestore.c') diff --git a/src/idevicerestore.c b/src/idevicerestore.c index d22b36a..c60da0e 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -541,8 +541,8 @@ int idevicerestore_start(struct idevicerestore_client_t* client) int nonce_size = 0; int nonce_changed = 0; if (get_nonce(client, &nonce, &nonce_size) < 0) { - error("ERROR: Unable to get nonce from device!\n"); - return -2; + /* the first nonce request with older firmware releases can fail and it's OK */ + info("NOTE: Unable to get nonce from device\n"); } if (!client->nonce || (nonce_size != client->nonce_size) || (memcmp(nonce, client->nonce, nonce_size) != 0)) { -- cgit v1.1-32-gdbae