diff --git a/resources/blobs.sh b/resources/blobs.sh index bd533f0..6505e80 100755 --- a/resources/blobs.sh +++ b/resources/blobs.sh @@ -43,7 +43,7 @@ SaveOTABlobs() { if [[ ! -z $SHSH && $SHSHContinue != 1 ]]; then mkdir -p saved/shsh 2>/dev/null - [[ -z $APNonce ]] && cp "$SHSH" saved/shsh + [[ -z $APNonce && ! $SHSHExisting ]] && cp "$SHSH" saved/shsh Log "Successfully saved $OSVer blobs." fi } diff --git a/resources/depends.sh b/resources/depends.sh index 622c993..6c61cd0 100755 --- a/resources/depends.sh +++ b/resources/depends.sh @@ -9,6 +9,7 @@ SetToolPaths() { MPath+="$platform" bspatch="$(which bspatch)" futurerestore="sudo LD_LIBRARY_PATH=./resources/lib ./resources/tools/futurerestore_linux" + futurerestore2="sudo LD_LIBRARY_PATH=./resources/lib ./resources/tools/futurerestore2_linux" idevicerestore="sudo LD_LIBRARY_PATH=./resources/lib ./resources/tools/idevicerestore_linux" python="$(which python2)" ipwndfu="sudo $python ipwndfu" @@ -32,6 +33,7 @@ SetToolPaths() { bspatch="/usr/bin/bspatch" futurerestore="./resources/tools/futurerestore_macos_$(uname -m)" [[ ! -e $futurerestore ]] && futurerestore="./resources/tools/futurerestore_macos_arm64" + futurerestore2="./resources/tools/futurerestore2_macos" idevicerestore="./resources/tools/idevicerestore_macos" ipwnder32="./resources/tools/ipwnder32_macos" python="/usr/bin/python" diff --git a/resources/downgrade.sh b/resources/downgrade.sh index 83e7fc9..10e6261 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -64,6 +64,16 @@ FutureRestore() { fi } +SetIPSWCustomW() { + if [[ $DeviceProc == 7 ]]; then + IPSWCustomW=2 + futurerestore=$futurerestore2 + else + IPSWCustom="${IPSWCustom}W" + IPSWCustomW=1 + fi +} + Downgrade() { local IPSWExtract local IPSWSHA1 @@ -143,12 +153,17 @@ Downgrade() { IPSWCustom="${IPSWType}_${OSVer}_${BuildVer}_Custom" if [[ $Jailbreak != 1 && $platform == "win" ]]; then - if [[ $DeviceProc == 7 ]]; then - IPSWCustomW=2 - else - IPSWCustom="${IPSWCustom}W" - IPSWCustomW=1 + SetIPSWCustomW + elif [[ $Jailbreak != 1 ]]; then + Input "Custom IPSW Option" + Echo "* When this option is enabled, a custom IPSW will be made for the restore." + Echo "* Enable this option later if you experience issues with futurerestore." + Echo "* This option is disabled by default (N)." + read -p "$(Input 'Enable this option? (y/N):')" IPSWCustomW + if [[ $IPSWCustomW == 'Y' || $IPSWCustomW == 'y' ]]; then + SetIPSWCustomW fi + echo fi if [[ $Jailbreak == 1 || ! -z $IPSWCustomW ]]; then @@ -208,6 +223,8 @@ Downgrade() { if [[ $Jailbreak == 1 || $IPSWCustomW == 1 ]]; then IPSW32 IPSWExtract="$IPSWCustom" + elif [[ $IPSWCustomW == 2 && $Verify != 1 ]]; then + IPSWExtract="$IPSWCustom" else IPSWExtract="$IPSW" fi @@ -233,7 +250,7 @@ Downgrade() { Log "Setting restore IPSW to: $IPSW.ipsw" IPSWRestore="$IPSW" fi - + if [[ $Jailbreak == 1 || $IPSWCustomW == 1 ]]; then iDeviceRestore else diff --git a/resources/tools/futurerestore2_linux b/resources/tools/futurerestore2_linux new file mode 100755 index 0000000..5d8f48f Binary files /dev/null and b/resources/tools/futurerestore2_linux differ diff --git a/resources/tools/futurerestore2_macos b/resources/tools/futurerestore2_macos new file mode 100755 index 0000000..ef6c34c Binary files /dev/null and b/resources/tools/futurerestore2_macos differ