diff options
author | Martin Szulecki | 2013-11-20 16:58:29 +0100 |
---|---|---|
committer | Martin Szulecki | 2013-11-20 17:04:04 +0100 |
commit | 3c04e82be9af10e8b9b45a3d7138a67c7b04a616 (patch) | |
tree | e54bfaff924be8b4ecd4b66a6fdbbfd37da6b28d /src | |
parent | 66c0deefae3295af4b740eea0fe4fc604929dadf (diff) | |
download | idevicerestore-3c04e82be9af10e8b9b45a3d7138a67c7b04a616.tar.gz idevicerestore-3c04e82be9af10e8b9b45a3d7138a67c7b04a616.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/restore.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |