Skip to content

Commit

Permalink
Initial support for iPhone 16 restore
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Sep 21, 2024
1 parent d2e1c4f commit 48350d6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/idevicerestore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,16 @@ int idevicerestore_start(struct idevicerestore_client_t* client)
error("ERROR: Unable to get SHSH blobs for this device (recovery OS Root Ticket)\n");
return -1;
}
} else {
plist_t recovery_variant = plist_access_path(build_identity, 2, "Info", "RecoveryVariant");
if (recovery_variant) {
const char* recovery_variant_str = plist_get_string_ptr(recovery_variant, NULL);
plist_t recovery_build_identity = build_manifest_get_build_identity_for_model_with_variant(client->build_manifest, client->device->hardware_model, recovery_variant_str, 1);
if (get_tss_response(client, recovery_build_identity, &client->tss_recoveryos_root_ticket) < 0) {
error("ERROR: Unable to get SHSH blobs for this device (%s)\n", recovery_variant_str);
return -1;
}
}
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/img4.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,14 @@ int img4_stitch_component(const char* component_name, const unsigned char* compo
memcpy((void*)tag, "rcio", 4);
} else if (strcmp(component_name, "Ap,DCP2") == 0) {
memcpy((void*)tag, "dcp2", 4);
} else if (strcmp(component_name, "Ap,RestoreSecureM3Firmware") == 0) {
memcpy((void*)tag, "rsm3", 4);
} else if (strcmp(component_name, "Ap,RestoreSecurePageTableMonitor") == 0) {
memcpy((void*)tag, "rspt", 4);
} else if (strcmp(component_name, "Ap,RestoreTrustedExecutionMonitor") == 0) {
memcpy((void*)tag, "rtrx", 4);
} else if (strcmp(component_name, "Ap,RestorecL4") == 0) {
memcpy((void*)tag, "rxcl", 4);
}
}

Expand Down

0 comments on commit 48350d6

Please sign in to comment.