From 3c04e82be9af10e8b9b45a3d7138a67c7b04a616 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 20 Nov 2013 16:58:29 +0100 Subject: restore: Make sure iBoot is the first entry in the NORImage array Apparently restored is very picky about the order and expects the iBoot component as the first item in the array. This fixes restore of new models. --- src/restore.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/restore.c b/src/restore.c index 9729e72..53f2367 100644 --- a/src/restore.c +++ b/src/restore.c @@ -945,7 +945,13 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* component_data = NULL; component_size = 0; - plist_array_append_item(norimage_array, plist_new_data((char*)nor_data, (uint64_t)nor_size)); + /* make sure iBoot is the first entry in the array */ + if (!strncmp("iBoot", filename, 4)) { + plist_array_insert_item(norimage_array, plist_new_data((char*)nor_data, (uint64_t)nor_size), 0); + } else { + plist_array_append_item(norimage_array, plist_new_data((char*)nor_data, (uint64_t)nor_size)); + } + free(nor_data); nor_data = NULL; nor_size = 0; -- cgit v1.1-32-gdbae