Allow pwndfu on all chips

This commit is contained in:
Cryptiiiic 2021-08-22 22:39:22 -07:00
parent 1c99b08092
commit 6c5c0a6211
No known key found for this signature in database
GPG key ID: 6027B509EFE3A76B

View file

@ -523,8 +523,7 @@ void futurerestore::enterPwnRecovery(plist_t build_identity, string bootargs){
retassure(((_client->mode == &idevicerestore_modes[MODE_UNKNOWN]) || (mutex_unlock(&_client->device_event_mutex),0)), "Device did not disconnect. Possibly invalid iBSS. Reset device and try again"); retassure(((_client->mode == &idevicerestore_modes[MODE_UNKNOWN]) || (mutex_unlock(&_client->device_event_mutex),0)), "Device did not disconnect. Possibly invalid iBSS. Reset device and try again");
info("Booting iBSS, waiting for device to reconnect...\n"); info("Booting iBSS, waiting for device to reconnect...\n");
cond_wait_timeout(&_client->device_event_cond, &_client->device_event_mutex, 10000); cond_wait_timeout(&_client->device_event_cond, &_client->device_event_mutex, 10000);
switch(_client->device->chip_id) { if((_client->device->chip_id >= 0x7000 && _client->device->chip_id <= 0x8004) || (_client->device->chip_id >= 0x8900 && _client->device->chip_id <= 0x8965)) {
case 0x8000: {
retassure(((_client->mode == &idevicerestore_modes[MODE_DFU]) || (mutex_unlock(&_client->device_event_mutex),0)), "Device did not reconnect. Possibly invalid iBSS. Reset device and try again"); retassure(((_client->mode == &idevicerestore_modes[MODE_DFU]) || (mutex_unlock(&_client->device_event_mutex),0)), "Device did not reconnect. Possibly invalid iBSS. Reset device and try again");
if (_client->build_major > 8) { if (_client->build_major > 8) {
mutex_unlock(&_client->device_event_mutex); mutex_unlock(&_client->device_event_mutex);
@ -546,17 +545,15 @@ void futurerestore::enterPwnRecovery(plist_t build_identity, string bootargs){
mutex_unlock(&_client->device_event_mutex); mutex_unlock(&_client->device_event_mutex);
getDeviceMode(true); getDeviceMode(true);
retassure(((recovery_client_new(_client) == IRECV_E_SUCCESS) || (mutex_unlock(&_client->device_event_mutex),0)), "Failed to connect to device in Recovery Mode!"); retassure(((recovery_client_new(_client) == IRECV_E_SUCCESS) || (mutex_unlock(&_client->device_event_mutex),0)), "Failed to connect to device in Recovery Mode!");
mutex_lock(&_client->device_event_mutex);
} }
break; } else if((_client->device->chip_id >= 0x8006 && _client->device->chip_id <= 0x8030) || (_client->device->chip_id >= 0x8101 && _client->device->chip_id <= 0x8301)) {
} mutex_unlock(&_client->device_event_mutex);
case 0x8015: {
retassure(((_client->mode == &idevicerestore_modes[MODE_RECOVERY]) || (mutex_unlock(&_client->device_event_mutex),0)), "Device did not reconnect. Possibly invalid iBSS. Reset device and try again"); retassure(((_client->mode == &idevicerestore_modes[MODE_RECOVERY]) || (mutex_unlock(&_client->device_event_mutex),0)), "Device did not reconnect. Possibly invalid iBSS. Reset device and try again");
break; mutex_lock(&_client->device_event_mutex);
} } else {
default: { mutex_unlock(&_client->device_event_mutex);
reterror("Device not supported!\n"); reterror("Device not supported!\n");
break;
}
} }
/* Verify correct nonce/set nonce */ /* Verify correct nonce/set nonce */