mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 18:34:14 +01:00
Update SaveExternal and other stuff
remove git from depends download ipwndfu only when needed small update to readme
This commit is contained in:
parent
8100305b14
commit
cdff02e852
@ -69,7 +69,7 @@
|
|||||||
- [**Ubuntu**](https://ubuntu.com/) 20.04 and newer, and Ubuntu-based distros like [Linux Mint](https://www.linuxmint.com/)
|
- [**Ubuntu**](https://ubuntu.com/) 20.04 and newer, and Ubuntu-based distros like [Linux Mint](https://www.linuxmint.com/)
|
||||||
- [**Arch Linux**](https://www.archlinux.org/) and Arch-based distros like [EndeavourOS](https://endeavouros.com/)
|
- [**Arch Linux**](https://www.archlinux.org/) and Arch-based distros like [EndeavourOS](https://endeavouros.com/)
|
||||||
- [**Fedora**](https://getfedora.org/) 33 and newer
|
- [**Fedora**](https://getfedora.org/) 33 and newer
|
||||||
- [**Debian**](https://www.debian.org/) 11 Bullseye, Testing and Unstable
|
- [**Debian**](https://www.debian.org/) Bullseye, Bookworm/Sid, and Debian-based distros
|
||||||
- [**openSUSE**](https://www.opensuse.org/) Tumbleweed and Leap 15.3 to 15.4
|
- [**openSUSE**](https://www.opensuse.org/) Tumbleweed and Leap 15.3 to 15.4
|
||||||
- **macOS** 10.13 and newer
|
- **macOS** 10.13 and newer
|
||||||
- **Windows** 7 and newer
|
- **Windows** 7 and newer
|
||||||
|
@ -55,7 +55,6 @@ SetToolPaths() {
|
|||||||
|
|
||||||
if [[ $platform != "win" ]]; then
|
if [[ $platform != "win" ]]; then
|
||||||
expect="$(which expect)"
|
expect="$(which expect)"
|
||||||
git="$(which git)"
|
|
||||||
fi
|
fi
|
||||||
ideviceenterrecovery="$MPath/ideviceenterrecovery"
|
ideviceenterrecovery="$MPath/ideviceenterrecovery"
|
||||||
ideviceinfo="$MPath/ideviceinfo"
|
ideviceinfo="$MPath/ideviceinfo"
|
||||||
@ -103,18 +102,15 @@ SetToolPaths() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SaveExternal() {
|
SaveExternal() {
|
||||||
local ExternalURL="https://github.com/$1/$2.git"
|
if [[ -d ./resources/$2 ]]; then
|
||||||
local External=$2
|
return
|
||||||
cd resources
|
|
||||||
if [[ ! -d $External || ! -d $External/.git ]]; then
|
|
||||||
Log "Downloading $External..."
|
|
||||||
rm -rf $External
|
|
||||||
$git clone --depth 1 $ExternalURL $External
|
|
||||||
fi
|
|
||||||
if [[ ! $(ls $External/*.md) || ! -d $External/.git ]]; then
|
|
||||||
rm -rf $External
|
|
||||||
Error "Downloading/updating $2 failed. Please run the script again"
|
|
||||||
fi
|
fi
|
||||||
|
cd tmp
|
||||||
|
Log "Downloading $2..."
|
||||||
|
SaveFile $1 $2.zip $3
|
||||||
|
cd ../resources
|
||||||
|
unzip -q ../tmp/$2.zip -d .
|
||||||
|
mv $2* $2
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,11 +157,11 @@ InstallDepends() {
|
|||||||
(( DebianVer >= 11 )) || [[ $DebianVer == "sid" ]]; then
|
(( DebianVer >= 11 )) || [[ $DebianVer == "sid" ]]; then
|
||||||
[[ -n $UBUNTU_CODENAME ]] && sudo add-apt-repository -y universe
|
[[ -n $UBUNTU_CODENAME ]] && sudo add-apt-repository -y universe
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y bsdiff curl expect git libimobiledevice6 openssh-client python2 unzip usbmuxd usbutils xmlstarlet xxd zenity
|
sudo apt install -y bsdiff curl expect libimobiledevice6 openssh-client python2 unzip usbmuxd usbutils xmlstarlet xxd zenity
|
||||||
|
|
||||||
elif [[ $ID == "fedora" ]] && (( VERSION_ID >= 33 )); then
|
elif [[ $ID == "fedora" ]] && (( VERSION_ID >= 33 )); then
|
||||||
ln -sf /usr/lib64/libbz2.so.1.* ../resources/lib/libbz2.so.1.0
|
ln -sf /usr/lib64/libbz2.so.1.* ../resources/lib/libbz2.so.1.0
|
||||||
sudo dnf install -y bsdiff expect git libimobiledevice perl-Digest-SHA python2 vim-common xmlstarlet zenity
|
sudo dnf install -y bsdiff expect libimobiledevice perl-Digest-SHA python2 vim-common xmlstarlet zenity
|
||||||
|
|
||||||
elif [[ $ID == "opensuse-tumbleweed" || $PRETTY_NAME == *"Leap 15.3" || $PRETTY_NAME == *"Leap 15.4" ]]; then
|
elif [[ $ID == "opensuse-tumbleweed" || $PRETTY_NAME == *"Leap 15.3" || $PRETTY_NAME == *"Leap 15.4" ]]; then
|
||||||
libimobiledevice="libimobiledevice-1_0-6"
|
libimobiledevice="libimobiledevice-1_0-6"
|
||||||
@ -173,7 +169,7 @@ InstallDepends() {
|
|||||||
ln -sf /lib64/libreadline.so.7 ../resources/lib/libreadline.so.8
|
ln -sf /lib64/libreadline.so.7 ../resources/lib/libreadline.so.8
|
||||||
[[ $VERSION == "15.3" ]] && libimobiledevice="libimobiledevice6"
|
[[ $VERSION == "15.3" ]] && libimobiledevice="libimobiledevice6"
|
||||||
fi
|
fi
|
||||||
sudo zypper -n in bsdiff curl expect git $libimobiledevice python-base vim xmlstarlet zenity
|
sudo zypper -n in bsdiff curl expect $libimobiledevice python-base vim xmlstarlet zenity
|
||||||
|
|
||||||
elif [[ $platform == "macos" ]]; then
|
elif [[ $platform == "macos" ]]; then
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
|
@ -221,6 +221,7 @@ EnterPwnDFU() {
|
|||||||
done
|
done
|
||||||
else
|
else
|
||||||
pwnDFUTool="ipwndfu"
|
pwnDFUTool="ipwndfu"
|
||||||
|
SaveExternal https://github.com/LukeZGD/ipwndfu/archive/6e67c9e28a5f7f63f179dea670f7f858712350a0.zip ipwndfu 61333249eb58faebbb380c4709384034ce0e019a
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Log "Entering pwnDFU mode with: $pwnDFUTool..."
|
Log "Entering pwnDFU mode with: $pwnDFUTool..."
|
||||||
@ -354,9 +355,7 @@ SendPwnediBSS() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $platform == "macos" ]]; then
|
SaveExternal https://github.com/LukeZGD/ipwndfu/archive/6e67c9e28a5f7f63f179dea670f7f858712350a0.zip ipwndfu 61333249eb58faebbb380c4709384034ce0e019a
|
||||||
SaveExternal LukeZGD ipwndfu
|
|
||||||
fi
|
|
||||||
PatchiBSS
|
PatchiBSS
|
||||||
cd resources/ipwndfu
|
cd resources/ipwndfu
|
||||||
Log "Sending iBSS..."
|
Log "Sending iBSS..."
|
||||||
|
@ -169,13 +169,13 @@ iDeviceRestore() {
|
|||||||
[[ $1 == "latest" ]] && ExtraArgs="-ey" || ExtraArgs="-ewy"
|
[[ $1 == "latest" ]] && ExtraArgs="-ey" || ExtraArgs="-ewy"
|
||||||
$idevicerestore $ExtraArgs "$IPSWRestore.ipsw"
|
$idevicerestore $ExtraArgs "$IPSWRestore.ipsw"
|
||||||
if [[ $platform == "macos" && $? != 0 ]]; then
|
if [[ $platform == "macos" && $? != 0 ]]; then
|
||||||
Log "Restoring done! Read the message below if any error has occured:"
|
Log "Restoring done! Read the message below if any error has occurred:"
|
||||||
Echo "* If the \"Killed: 9\" or other similar error pops up, try these steps:"
|
Echo "* If the \"Killed: 9\" or other similar error pops up, try these steps:"
|
||||||
Echo "* Using Terminal, cd to where the script is located, then run"
|
Echo "* Using Terminal, cd to where the script is located, then run"
|
||||||
Echo "* sudo codesign --sign - --force --deep resources/tools/idevicerestore_macos"
|
Echo "* sudo codesign --sign - --force --deep resources/tools/idevicerestore_macos"
|
||||||
Echo "* For more details, read the \"Troubleshooting\" wiki page in GitHub"
|
Echo "* For more details, read the \"Troubleshooting\" wiki page in GitHub"
|
||||||
elif [[ $platform == "win" && $? != 0 ]]; then
|
elif [[ $platform == "win" && $? != 0 ]]; then
|
||||||
Log "Restoring done! Read the message below if any error has occured:"
|
Log "Restoring done! Read the message below if any error has occurred:"
|
||||||
Echo "* Windows users may encounter errors like \"Unable to send APTicket\" or \"Unable to send iBEC\" in the restore process."
|
Echo "* Windows users may encounter errors like \"Unable to send APTicket\" or \"Unable to send iBEC\" in the restore process."
|
||||||
Echo "* To fix this, follow troubleshooting steps from here: https://github.com/LukeZGD/iOS-OTA-Downgrader/wiki/Troubleshooting#windows"
|
Echo "* To fix this, follow troubleshooting steps from here: https://github.com/LukeZGD/iOS-OTA-Downgrader/wiki/Troubleshooting#windows"
|
||||||
else
|
else
|
||||||
|
13
restore.sh
13
restore.sh
@ -107,21 +107,12 @@ Main() {
|
|||||||
ExitWin 0
|
ExitWin 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $platform == "linux" ]]; then
|
|
||||||
SaveExternal LukeZGD ipwndfu
|
|
||||||
fi
|
|
||||||
GetDeviceValues $1
|
GetDeviceValues $1
|
||||||
Clean
|
Clean
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
|
|
||||||
if [[ $ProductType == "iPhone3,1" && ! -d ./resources/ch3rryflower ]]; then
|
if [[ $ProductType == "iPhone3,1" ]]; then
|
||||||
cd tmp
|
SaveExternal https://web.archive.org/web/20210529174714if_/https://codeload.github.com/dora2-iOS/ch3rryflower/zip/316d2cdc5351c918e9db9650247b91632af3f11f ch3rryflower 790d56db354151b9740c929e52c097ba57f2929d
|
||||||
Log "Downloading ch3rryflower..."
|
|
||||||
SaveFile https://web.archive.org/web/20210529174714if_/https://codeload.github.com/dora2-iOS/ch3rryflower/zip/316d2cdc5351c918e9db9650247b91632af3f11f ch3rryflower.zip 790d56db354151b9740c929e52c097ba57f2929d
|
|
||||||
cd ../resources
|
|
||||||
unzip -q ../tmp/ch3rryflower.zip -d .
|
|
||||||
mv ch3rryflower* ch3rryflower
|
|
||||||
cd ..
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $1 && $1 != "NoColor" && $1 != "NoDevice" && $1 != "PwnedDevice" ]]; then
|
if [[ -n $1 && $1 != "NoColor" && $1 != "NoDevice" && $1 != "PwnedDevice" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user