summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2017-09-29 12:55:51 +0200
committerGravatar Nikias Bassen2017-09-29 12:55:51 +0200
commit875c9696ce691db571f8910dce062ae560703a51 (patch)
tree54ec430f0de8bcdfdf8d62c5dbfa4e528e44db64 /src/restore.c
parenta39524af6efe2743622743c3a97087f64da4c863 (diff)
downloadidevicerestore-875c9696ce691db571f8910dce062ae560703a51.tar.gz
idevicerestore-875c9696ce691db571f8910dce062ae560703a51.tar.bz2
restore: Fix restore of iPhone 8/8+ SE firmware
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/restore.c b/src/restore.c
index a7f0ab8..46e4a0f 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -1777,7 +1777,7 @@ int restore_send_fud_data(restored_client_t restore, struct idevicerestore_clien
plist_t restore_get_se_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
{
- const char *comp_name = "SE,Firmware";
+ const char *comp_name = NULL;
char *comp_path = NULL;
unsigned char* component_data = NULL;
unsigned int component_size = 0;
@@ -1787,6 +1787,15 @@ plist_t restore_get_se_firmware_data(restored_client_t restore, struct idevicere
plist_t response = NULL;
int ret;
+ if (build_identity_has_component(build_identity, "SE,Firmware")) {
+ comp_name = "SE,Firmware";
+ } else if (build_identity_has_component(build_identity, "SE,UpdatePayload")) {
+ comp_name = "SE,UpdatePayload";
+ } else {
+ error("ERROR: Neither 'SE,Firmware' nor 'SE,UpdatePayload' found in build identity.\n");
+ return NULL;
+ }
+
if (build_identity_get_component_path(build_identity, comp_name, &comp_path) < 0) {
error("ERROR: Unable get path for '%s' component\n", comp_name);
return NULL;