mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-23 16:39:17 +01:00
Use zenity file selection for "Other" downgrades (Linux only)
This commit is contained in:
parent
8f7603c602
commit
c053bb5569
@ -7,7 +7,7 @@ SetToolPaths() {
|
|||||||
platform="linux"
|
platform="linux"
|
||||||
platformver="$PRETTY_NAME"
|
platformver="$PRETTY_NAME"
|
||||||
MPath+="$platform"
|
MPath+="$platform"
|
||||||
|
|
||||||
bspatch="$(which bspatch)"
|
bspatch="$(which bspatch)"
|
||||||
futurerestore1="sudo LD_PRELOAD=./resources/lib/libcurl.so.3 LD_LIBRARY_PATH=./resources/lib ./resources/tools/futurerestore1_linux"
|
futurerestore1="sudo LD_PRELOAD=./resources/lib/libcurl.so.3 LD_LIBRARY_PATH=./resources/lib ./resources/tools/futurerestore1_linux"
|
||||||
futurerestore2="sudo LD_LIBRARY_PATH=./resources/lib ./resources/tools/futurerestore2_linux"
|
futurerestore2="sudo LD_LIBRARY_PATH=./resources/lib ./resources/tools/futurerestore2_linux"
|
||||||
@ -107,7 +107,7 @@ InstallDepends() {
|
|||||||
read -s
|
read -s
|
||||||
fi
|
fi
|
||||||
if [[ $ID == "arch" || $ID_LIKE == "arch" || $ID == "artix" ]]; then
|
if [[ $ID == "arch" || $ID_LIKE == "arch" || $ID == "artix" ]]; then
|
||||||
sudo pacman -Syu --noconfirm --needed base-devel bsdiff curl libcurl-compat libpng12 libimobiledevice libzip openssh openssl-1.0 python2 unzip usbutils
|
sudo pacman -Syu --noconfirm --needed base-devel bsdiff curl libcurl-compat libpng12 libimobiledevice libzip openssh openssl-1.0 python2 unzip usbutils zenity
|
||||||
ln -sf /usr/lib/libcurl.so.3 ../resources/lib/libcurl.so.3
|
ln -sf /usr/lib/libcurl.so.3 ../resources/lib/libcurl.so.3
|
||||||
ln -sf /usr/lib/libzip.so.5 ../resources/lib/libzip.so.4
|
ln -sf /usr/lib/libzip.so.5 ../resources/lib/libzip.so.4
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ InstallDepends() {
|
|||||||
[[ $VERSION == "11 (bullseye)" || $PRETTY_NAME == "Debian"*"sid" ]]; then
|
[[ $VERSION == "11 (bullseye)" || $PRETTY_NAME == "Debian"*"sid" ]]; then
|
||||||
[[ ! -z $UBUNTU_CODENAME ]] && sudo add-apt-repository -y universe
|
[[ ! -z $UBUNTU_CODENAME ]] && sudo add-apt-repository -y universe
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y bsdiff curl git libimobiledevice6 openssh-client python2 unzip usbmuxd usbutils
|
sudo apt install -y bsdiff curl git libimobiledevice6 openssh-client python2 unzip usbmuxd usbutils zenity
|
||||||
SavePkg
|
SavePkg
|
||||||
cp libcrypto.so.1.0.0 libcurl.so.3 libpng12.so.0 libssl.so.1.0.0 ../resources/lib
|
cp libcrypto.so.1.0.0 libcurl.so.3 libpng12.so.0 libssl.so.1.0.0 ../resources/lib
|
||||||
if [[ $VERSION_ID == "20"* ]]; then
|
if [[ $VERSION_ID == "20"* ]]; then
|
||||||
@ -125,7 +125,7 @@ InstallDepends() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ $ID == "fedora" ]] && (( $VERSION_ID >= 33 )); then
|
elif [[ $ID == "fedora" ]] && (( $VERSION_ID >= 33 )); then
|
||||||
sudo dnf install -y bsdiff git libimobiledevice libpng12 libzip perl-Digest-SHA python2
|
sudo dnf install -y bsdiff git libimobiledevice libpng12 libzip perl-Digest-SHA python2 zenity
|
||||||
SavePkg
|
SavePkg
|
||||||
cp libcrypto.so.1.0.0 libssl.so.1.0.0 ../resources/lib
|
cp libcrypto.so.1.0.0 libssl.so.1.0.0 ../resources/lib
|
||||||
ln -sf /usr/lib64/libzip.so.5 ../resources/lib/libzip.so.4
|
ln -sf /usr/lib64/libzip.so.5 ../resources/lib/libzip.so.4
|
||||||
@ -138,7 +138,7 @@ InstallDepends() {
|
|||||||
libimobiledevice="libimobiledevice6"
|
libimobiledevice="libimobiledevice6"
|
||||||
ln -sf /lib64/libreadline.so.7 ../resources/lib/libreadline.so.8
|
ln -sf /lib64/libreadline.so.7 ../resources/lib/libreadline.so.8
|
||||||
fi
|
fi
|
||||||
sudo zypper -n in bsdiff curl git $libimobiledevice libpng12-0 libopenssl1_0_0 libzip5 python-base
|
sudo zypper -n in bsdiff curl git $libimobiledevice libpng12-0 libopenssl1_0_0 libzip5 python-base zenity
|
||||||
ln -sf /usr/lib64/libzip.so.5 ../resources/lib/libzip.so.4
|
ln -sf /usr/lib64/libzip.so.5 ../resources/lib/libzip.so.4
|
||||||
|
|
||||||
elif [[ $platform == "macos" ]]; then
|
elif [[ $platform == "macos" ]]; then
|
||||||
@ -157,7 +157,6 @@ InstallDepends() {
|
|||||||
libimobiledevice=("https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_linux.zip" "4344b3ca95d7433d5a49dcacc840d47770ba34c4")
|
libimobiledevice=("https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_linux.zip" "4344b3ca95d7433d5a49dcacc840d47770ba34c4")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -d ../resources/libimobiledevice_$platform && $MPath == "./resources"* ]]; then
|
if [[ ! -d ../resources/libimobiledevice_$platform && $MPath == "./resources"* ]]; then
|
||||||
Log "Downloading libimobiledevice..."
|
Log "Downloading libimobiledevice..."
|
||||||
SaveFile ${libimobiledevice[0]} libimobiledevice.zip ${libimobiledevice[1]}
|
SaveFile ${libimobiledevice[0]} libimobiledevice.zip ${libimobiledevice[1]}
|
||||||
|
@ -70,12 +70,21 @@ Downgrade() {
|
|||||||
local Verify
|
local Verify
|
||||||
|
|
||||||
if [[ $OSVer == "Other" ]]; then
|
if [[ $OSVer == "Other" ]]; then
|
||||||
Echo "* Move/copy the IPSW and SHSH to the directory where the script is located"
|
if [[ $platform == "linux" ]]; then
|
||||||
Echo "* Remember to create a backup of the SHSH"
|
IPSW="$(zenity --file-selection --file-filter='IPSW | *.ipsw' --title="Select IPSW file")"
|
||||||
read -p "$(Input 'Path to IPSW (drag IPSW to terminal window):')" IPSW
|
IPSW="${IPSW%?????}"
|
||||||
IPSW="$(basename $IPSW .ipsw)"
|
Log "Selected IPSW file: $IPSW"
|
||||||
read -p "$(Input 'Path to SHSH (drag SHSH to terminal window):')" SHSH
|
SHSH="$(zenity --file-selection --file-filter='SHSH | *.shsh *.shsh2' --title="Select SHSH file")"
|
||||||
|
Log "Selected SHSH file: $SHSH"
|
||||||
|
else
|
||||||
|
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 "* Remember 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
|
||||||
|
|
||||||
elif [[ $Mode == "Downgrade" && $DeviceProc != 7 ]]; then
|
elif [[ $Mode == "Downgrade" && $DeviceProc != 7 ]]; then
|
||||||
read -p "$(Input 'Jailbreak the selected iOS version? (Y/n):')" Jailbreak
|
read -p "$(Input 'Jailbreak the selected iOS version? (Y/n):')" Jailbreak
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user