Skip to content

Commit a5905b7

Browse files
committed
Fix iPhone 16e restore from normal mode
Because of the new Apple baseband the initial TSS request won't succeed when restoring from normal mode due to missing data for a @bbticket. So now if the baseband information is missing, we don't try to add BBTicket data at all, which will make it work for iPhone 16e devices.
1 parent 2ee5021 commit a5905b7

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/idevicerestore.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2406,18 +2406,20 @@ int get_tss_response(struct idevicerestore_client_t* client, plist_t build_ident
24062406
plist_dict_copy_uint(parameters, pinfo, "BbGoldCertId", "CertID");
24072407
plist_dict_copy_data(parameters, pinfo, "BbSNUM", "ChipSerialNo");
24082408

2409-
/* add baseband parameters */
2410-
tss_request_add_baseband_tags(request, parameters, NULL);
2411-
2412-
plist_dict_copy_uint(parameters, pinfo, "eUICC,ChipID", "EUICCChipID");
2413-
if (plist_dict_get_uint(parameters, "eUICC,ChipID") >= 5) {
2414-
plist_dict_copy_data(parameters, pinfo, "eUICC,EID", "EUICCCSN");
2415-
plist_dict_copy_data(parameters, pinfo, "eUICC,RootKeyIdentifier", "EUICCCertIdentifier");
2416-
plist_dict_copy_data(parameters, pinfo, "EUICCGoldNonce", NULL);
2417-
plist_dict_copy_data(parameters, pinfo, "EUICCMainNonce", NULL);
2418-
2419-
/* add vinyl parameters */
2420-
tss_request_add_vinyl_tags(request, parameters, NULL);
2409+
if (plist_dict_get_item(parameters, "BbSNUM")) {
2410+
/* add baseband parameters */
2411+
tss_request_add_baseband_tags(request, parameters, NULL);
2412+
2413+
plist_dict_copy_uint(parameters, pinfo, "eUICC,ChipID", "EUICCChipID");
2414+
if (plist_dict_get_uint(parameters, "eUICC,ChipID") >= 5) {
2415+
plist_dict_copy_data(parameters, pinfo, "eUICC,EID", "EUICCCSN");
2416+
plist_dict_copy_data(parameters, pinfo, "eUICC,RootKeyIdentifier", "EUICCCertIdentifier");
2417+
plist_dict_copy_data(parameters, pinfo, "EUICCGoldNonce", NULL);
2418+
plist_dict_copy_data(parameters, pinfo, "EUICCMainNonce", NULL);
2419+
2420+
/* add vinyl parameters */
2421+
tss_request_add_vinyl_tags(request, parameters, NULL);
2422+
}
24212423
}
24222424
}
24232425
client->firmware_preflight_info = pinfo;

0 commit comments

Comments
 (0)