Add zenity macos

This commit is contained in:
LukeZGD 2021-11-01 13:34:41 +08:00
parent da9d926553
commit c8ce4a5c95
4 changed files with 14 additions and 17 deletions

View File

@ -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)

View File

@ -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"

View File

@ -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 "(?<=<string>)[^<]+")
Log "Getting firmware keys for $ProductType-$BuildVer"

BIN
resources/tools/zenity_macos Executable file

Binary file not shown.