diff --git a/.github/workflows/mac-arm64.sh b/.github/workflows/mac-arm64.sh index 32d5202f..86b6c8e6 100755 --- a/.github/workflows/mac-arm64.sh +++ b/.github/workflows/mac-arm64.sh @@ -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 diff --git a/.github/workflows/mac-x86_64.sh b/.github/workflows/mac-x86_64.sh index 1920e944..6c227c8c 100755 --- a/.github/workflows/mac-x86_64.sh +++ b/.github/workflows/mac-x86_64.sh @@ -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 diff --git a/futurerestore/futurerestore.cpp b/futurerestore/futurerestore.cpp index 9dd0eb19..f5d1b61c 100644 --- a/futurerestore/futurerestore.cpp +++ b/futurerestore/futurerestore.cpp @@ -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");