diff --git a/README.md b/README.md index ecbbf83..5de0d75 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,8 @@ - [kloader5 for iOS 5](https://www.pmbonneau.com/cydia/com.pmbonneau.kloader5_1.2_iphoneos-arm.deb) - [kloader_hgsp for iOS 10](https://twitter.com/nyan_satan/status/945203180522045440) - [partial-zip](https://github.com/matteyeux/partial-zip) +- [zenity](https://github.com/GNOME/zenity) +- [zenity](https://github.com/ncruces/zenity) (macOS) - 32-bit bundles are from [OdysseusOTA](https://www.youtube.com/watch?v=Wo7mGdMcjxw), [OdysseusOTA2](https://www.youtube.com/watch?v=fh0tB6fp0Sc), [alitek12](https://www.mediafire.com/folder/b1z64roy512wd/FirmwareBundles), [gjest](https://www.reddit.com/r/jailbreak/comments/6yrzzj/release_firmware_bundles_for_ios_841_ipad21234567/) - A7 patches are from [MatthewPierson](https://github.com/MatthewPierson/iPhone-5s-OTA-Downgrade-Patches) - [EtasonJB](https://www.theiphonewiki.com/wiki/EtasonJB) diff --git a/resources/depends.sh b/resources/depends.sh index 6c61cd0..6784850 100755 --- a/resources/depends.sh +++ b/resources/depends.sh @@ -15,6 +15,7 @@ SetToolPaths() { ipwndfu="sudo $python ipwndfu" rmsigchks="sudo $python rmsigchks.py" SimpleHTTPServer="sudo -b $python -m SimpleHTTPServer 8888" + zenity="$(which zenity)" elif [[ $OSTYPE == "darwin"* ]]; then platform="macos" @@ -40,6 +41,7 @@ SetToolPaths() { ipwndfu="$python ipwndfu" rmsigchks="$python rmsigchks.py" SimpleHTTPServer="$python -m SimpleHTTPServer 8888" + zenity="./resources/tools/zenity_macos" elif [[ $OSTYPE == "msys" ]]; then platform="win" diff --git a/resources/downgrade.sh b/resources/downgrade.sh index 978b224..4be4201 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -88,23 +88,16 @@ Downgrade() { echo if [[ $OSVer == "Other" ]]; then - if [[ $platform == "linux" ]]; then - Input "Select your IPSW file in the file selection window." - IPSW="$(zenity --file-selection --file-filter='IPSW | *.ipsw' --title="Select IPSW file")" - IPSW="${IPSW%?????}" - Log "Selected IPSW file: $IPSW.ipsw" - Input "Select your SHSH file in the file selection window." - SHSH="$(zenity --file-selection --file-filter='SHSH | *.shsh *.shsh2' --title="Select SHSH file")" - Log "Selected SHSH file: $SHSH" - else - Input "Enter the names of your IPSW and SHSH files below." - Echo "* Move/copy the IPSW and SHSH files to the directory where the script is located" - Echo "* When entering the names of IPSW and SHSH, enter the full name including the file extension" - Echo "* Make sure to create a backup of the SHSH" - read -p "$(Input 'Enter name of IPSW file:')" IPSW - IPSW="$(basename "$IPSW" .ipsw)" - read -p "$(Input 'Enter name of SHSH file:')" SHSH - fi + Input "Select your IPSW file in the file selection window." + IPSW="$($zenity --file-selection --file-filter='IPSW | *.ipsw' --title="Select IPSW file")" + [[ ! -s "$IPSW" ]] && Error "No IPSW selected, or IPSW file not found." + IPSW="${IPSW%?????}" + Log "Selected IPSW file: $IPSW.ipsw" + Input "Select your SHSH file in the file selection window." + SHSH="$($zenity --file-selection --file-filter='SHSH | *.shsh *.shsh2' --title="Select SHSH file")" + [[ ! -s "$SHSH" ]] && Error "No SHSH selected, or SHSH file not found." + Log "Selected SHSH file: $SHSH" + unzip -o -j "$IPSW.ipsw" Restore.plist -d tmp BuildVer=$(cat tmp/Restore.plist | grep -i ProductBuildVersion -A 1 | grep -oPm1 "(?<=)[^<]+") Log "Getting firmware keys for $ProductType-$BuildVer" diff --git a/resources/tools/zenity_macos b/resources/tools/zenity_macos new file mode 100755 index 0000000..cfd4e4f Binary files /dev/null and b/resources/tools/zenity_macos differ