Change client call to dfu

This commit is contained in:
Cryptiiiic 2021-08-23 11:00:38 -07:00
parent 90d0747ed7
commit 5c64d001ac
No known key found for this signature in database
GPG key ID: 6027B509EFE3A76B
3 changed files with 5 additions and 7 deletions

View file

@ -19,7 +19,7 @@ sudo ${PROCURSUS}/bin/apt dist-upgrade -y
sudo ${PROCURSUS}/bin/apt install autopoint autoconf autoconf-archive automake bash bison cmake coreutils docbook-xml docbook-xsl dpkg fakeroot flex findutils gawk gnupg git grep groff ldid libtool make ncurses-bin openssl patch pkg-config po4a python3 sed tar triehash wget xz-utils zstd fd libgeneral-proc libimg4tool-proc libimobiledevice-proc libinsn-proc libipatcher-proc libirecovery-proc liboffsetfinder64-proc libplist-proc libpng16-proc libssl-proc libusbmuxd-proc libxpwn-proc libzip-proc libfragmentzip-proc -y
echo 'step 3:'
cd ${BASE}/../..
export FUTURERESTORE_VERSION=$(git rev-parse HEAD | tr -d '\n')
export FUTURERESTORE_VERSION=$(git rev-list --count HEAD | tr -d '\n')
export FUTURERESTORE_VERSION_RELEASE=$(cat version.txt | tr -d '\n')
echo 'step 4:'
git submodule init; git submodule update --recursive

View file

@ -19,7 +19,7 @@ sudo ${PROCURSUS}/bin/apt dist-upgrade -y
sudo ${PROCURSUS}/bin/apt install autopoint autoconf autoconf-archive automake bash bison cmake coreutils docbook-xml docbook-xsl dpkg fakeroot flex findutils gawk gnupg git grep groff ldid libtool make ncurses-bin openssl patch pkg-config po4a python3 sed tar triehash wget xz-utils zstd fd libgeneral-proc libimg4tool-proc libimobiledevice-proc libinsn-proc libipatcher-proc libirecovery-proc liboffsetfinder64-proc libplist-proc libpng16-proc libssl-proc libusbmuxd-proc libxpwn-proc libzip-proc libfragmentzip-proc -y
echo 'step 3:'
cd ${BASE}/../..
export FUTURERESTORE_VERSION=$(git rev-parse HEAD | tr -d '\n')
export FUTURERESTORE_VERSION=$(git rev-list --count HEAD | tr -d '\n')
export FUTURERESTORE_VERSION_RELEASE=$(cat version.txt | tr -d '\n')
echo 'step 4:'
git submodule init; git submodule update --recursive

View file

@ -524,8 +524,8 @@ void futurerestore::enterPwnRecovery(plist_t build_identity, string bootargs){
cond_wait_timeout(&_client->device_event_cond, &_client->device_event_mutex, 10000);
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");
cond_wait_timeout(&_client->device_event_cond, &_client->device_event_mutex, 10000);
if((_client->device->chip_id >= 0x7000 && _client->device->chip_id <= 0x8004) || (_client->device->chip_id >= 0x8900 && _client->device->chip_id <= 0x8965)) {
cond_wait_timeout(&_client->device_event_cond, &_client->device_event_mutex, 10000);
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) {
mutex_unlock(&_client->device_event_mutex);
@ -550,9 +550,8 @@ void futurerestore::enterPwnRecovery(plist_t build_identity, string bootargs){
mutex_lock(&_client->device_event_mutex);
}
} 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);
cond_wait_timeout(&_client->device_event_cond, &_client->device_event_mutex, 10000);
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");
mutex_lock(&_client->device_event_mutex);
} else {
mutex_unlock(&_client->device_event_mutex);
reterror("Device not supported!\n");
@ -567,10 +566,9 @@ void futurerestore::enterPwnRecovery(plist_t build_identity, string bootargs){
});
mutex_unlock(&_client->device_event_mutex);
if(_client->device->chip_id < 0x8015) {
assure(!irecv_send_command(_client->recovery->client, "bgcolor 255 0 0"));
assure(!irecv_send_command(_client->dfu->client, "bgcolor 255 0 0"));
sleep(2);
}
auto nonceelem = img4tool::getValFromIM4M({_im4ms[0].first,_im4ms[0].second}, 'BNCH');
info("ApNonce pre-hax:\n");