Fix #228 and other updates

This commit is contained in:
LukeZGD 2022-11-26 21:38:37 +08:00
parent f583a594c3
commit 760af27d94
6 changed files with 34 additions and 41 deletions

1
.gitignore vendored
View File

@ -9,7 +9,6 @@
*.shsh2 *.shsh2
*.txt *.txt
Cydia* Cydia*
exploit
first_run first_run
iP*Custom*/ iP*Custom*/
iP*Restore/ iP*Restore/

View File

@ -97,10 +97,11 @@ SetToolPaths() {
fi fi
elif [[ $platform == "win" ]]; then elif [[ $platform == "win" ]]; then
ping="ping -n 1" ping="ping -n 1"
Log "WARNING - Using iOS-OTA-Downgrader on Windows is highly discouraged." Log "WARNING - Using iOS-OTA-Downgrader on Windows is HIGHLY DISCOURAGED."
Echo "* Please use it on Linux or macOS instead." Echo "* Please use it on Linux or macOS instead."
Echo "* You may still continue, but you might encounter problems with restoring the device." Echo "* You may still continue, but you might encounter problems with restoring the device."
sleep 3 Echo "* You have been warned."
sleep 10
Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)" Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)"
read -s read -s
fi fi
@ -190,7 +191,7 @@ InstallDepends() {
sudo apt install -y bsdiff curl libimobiledevice6 openssh-client python2 python3 unzip usbmuxd usbutils xmlstarlet xxd zenity sudo apt install -y bsdiff curl libimobiledevice6 openssh-client python2 python3 unzip usbmuxd usbutils xmlstarlet xxd zenity
sudo systemctl enable --now udev systemd-udevd usbmuxd 2>/dev/null sudo systemctl enable --now udev systemd-udevd usbmuxd 2>/dev/null
elif [[ $ID == "fedora" ]] && (( VERSION_ID >= 36 )); then elif [[ $ID == "fedora" || $ID == "nobara" ]] && (( VERSION_ID >= 36 )); 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 ca-certificates libimobiledevice openssl python2 python3 systemd udev usbmuxd vim-common xmlstarlet zenity sudo dnf install -y bsdiff ca-certificates libimobiledevice openssl python2 python3 systemd udev usbmuxd vim-common xmlstarlet zenity
sudo ln -sf /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-certificates.crt sudo ln -sf /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-certificates.crt

View File

@ -104,7 +104,7 @@ GetDeviceValues() {
Baseband=0 Baseband=0
BasebandURL=$(cat $Firmware/13G37/url 2>/dev/null) BasebandURL=$(cat $Firmware/13G37/url 2>/dev/null)
LatestVer="9.3.6" LatestVer="9.3.6"
if [[ $ProductType == "iPad2,2" ]]; then if [[ $ProductType == "iPad2,2" ]]; then
BasebandURL=$(cat $Firmware/13G36/url) BasebandURL=$(cat $Firmware/13G36/url)
Baseband="ICE3_04.12.09_BOOT_02.13.Release.bbfw" Baseband="ICE3_04.12.09_BOOT_02.13.Release.bbfw"
@ -413,45 +413,42 @@ kDFU() {
[[ ! $kloader ]] && kloader="kloader" [[ ! $kloader ]] && kloader="kloader"
Log "Running iproxy for SSH..." Log "Running iproxy for SSH..."
$iproxy 2222 22 & $iproxy 2222 22 >/dev/null &
iproxyPID=$! iproxyPID=$!
sleep 2 sleep 2
echo Log "Please read the message below:"
Log "Copying stuff to device via SSH..." Echo "1. Make sure to have installed the requirements from Cydia."
Echo "* Make sure OpenSSH/Dropbear is installed on the device and running!" Echo " - Only proceed if you have followed Section 2 (and 2.1 for iOS 10) in the GitHub wiki."
Echo "* Dropbear is only needed for devices on iOS 10" Echo " - You will be prompted to enter the root password of your iOS device twice."
Echo "* To make sure that SSH is successful, try these steps:" Echo " - If you have not changed it, the default password is \"alpine\""
Echo "* Reinstall OpenSSH/Dropbear, reboot and rejailbreak, then reinstall them again" Echo " - Do not worry that your input is not visible, it is still being entered."
echo Echo "2. Afterwards, the device will disconnect and its screen will stay black."
Input "Enter the root password of your iOS device when prompted." Echo " - Proceed to either press the TOP/HOME button, or unplug and replug the device."
Echo "* Note that you will be prompted twice. Do not worry that your input is not visible, it is still being entered." sleep 3
Echo "* The default password is \"alpine\"" Input "Press Enter/Return to continue (or press Ctrl+C to cancel)"
read -s
Log "Entering kDFU mode..."
$SCP -P 2222 resources/tools/$kloader tmp/pwnediBSS root@127.0.0.1:/tmp $SCP -P 2222 resources/tools/$kloader tmp/pwnediBSS root@127.0.0.1:/tmp
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
$SSH -p 2222 root@127.0.0.1 "chmod +x /tmp/$kloader; /tmp/$kloader /tmp/pwnediBSS" & $SSH -p 2222 root@127.0.0.1 "chmod +x /tmp/$kloader; /tmp/$kloader /tmp/pwnediBSS" &
else else
Log "Cannot connect to device via USB SSH." Log "Failed to connect to device via USB SSH."
Echo "* Please try the steps above to make sure that SSH is successful" Echo "* For Linux users, try running \"sudo systemctl restart usbmuxd\" before retrying USB SSH."
Echo "* Alternatively, you may use kDFUApp by tihmstar (from my repo, see \"Troubleshooting\" wiki page)" Input "Press Enter/Return to try again with Wi-Fi SSH (or press Ctrl+C to cancel and try again)"
Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel and try again)"
read -s read -s
Log "Will try again with Wi-Fi SSH..." Log "Will try again with Wi-Fi SSH..."
Echo "* Make sure that the device and your PC/Mac are on the same network!" Echo "* Make sure that your iOS device and PC/Mac are on the same network."
Echo "* You can check for your device's IP Address in: Settings > WiFi/WLAN > tap the 'i' next to your network name" Echo "* To get your device's IP Address, go to: Settings -> Wi-Fi/WLAN -> tap the 'i' next to your network name"
read -p "$(Input 'Enter the IP Address of your device:')" IPAddress read -p "$(Input 'Enter the IP Address of your device:')" IPAddress
Log "Copying stuff to device via SSH..."
$SCP resources/tools/$kloader tmp/pwnediBSS root@$IPAddress:/tmp $SCP resources/tools/$kloader tmp/pwnediBSS root@$IPAddress:/tmp
if [[ $? == 1 ]]; then if [[ $? != 0 ]]; then
Error "Cannot connect to device via SSH." \ Log "Failed to connect to device via Wi-Fi SSH."
"Please try the steps above to make sure that SSH is successful" Echo "* Alternatively, you may use kDFUApp by tihmstar from my repo (see \"Troubleshooting\" wiki page for details)"
Error "Failed to connect to device via SSH, cannot continue."
fi fi
$SSH root@$IPAddress "chmod +x /tmp/$kloader; /tmp/$kloader /tmp/pwnediBSS" & $SSH root@$IPAddress "chmod +x /tmp/$kloader; /tmp/$kloader /tmp/pwnediBSS" &
fi fi
Log "Entering kDFU mode..."
Echo "* Press TOP or HOME button when the device disconnects and its screen goes black"
Echo "* You may also try to unplug and replug your device"
FindDevice "DFU" FindDevice "DFU"
} }

Binary file not shown.

View File

@ -272,10 +272,6 @@ IPSW4() {
elif [[ $ProductType == "iPhone3,3" && $OSVer != "7.1.2" ]]; then elif [[ $ProductType == "iPhone3,3" && $OSVer != "7.1.2" ]]; then
IPSW4Powder IPSW4Powder
return return
else
local JBURL2="https://github.com/LukeZGD/powdersn0w_pub/raw/main/xpwn/src/target/n90/11D257/exploit"
JailbreakFiles $JBURL2 exploit bedd10a96ba0f305a0af74a15e1eee88946070a1
cp resources/jailbreak/exploit resources/firmware/src/target/n90/11D257/
fi fi
if [[ $Jailbreak == 1 ]]; then if [[ $Jailbreak == 1 ]]; then

View File

@ -100,10 +100,10 @@ Main() {
elif [[ -e resources/git_hash ]]; then elif [[ -e resources/git_hash ]]; then
CurrentVersion="$(cat resources/git_hash)" CurrentVersion="$(cat resources/git_hash)"
else else
Echo "* Version: Unknown" Log ".git directory and git_hash file not found, cannot determine version."
if [[ $NoVersionCheck != 1 ]]; then if [[ $NoVersionCheck != 1 ]]; then
Error "git_hash or .git not found. Your copy of iOS-OTA-Downgrader is downloaded incorrectly." \ Error "Your copy of iOS-OTA-Downgrader is downloaded incorrectly. Do not use the \"Code\" button in GitHub." \
"Please download iOS-OTA-Downgrader from the GitHub releases page or using git clone." "Please download iOS-OTA-Downgrader using git clone or from GitHub releases: https://github.com/LukeZGD/iOS-OTA-Downgrader/releases"
fi fi
fi fi
[[ -n $CurrentVersion ]] && Echo "* Version: $CurrentVersion" [[ -n $CurrentVersion ]] && Echo "* Version: $CurrentVersion"
@ -290,8 +290,7 @@ Main() {
fi fi
echo echo
Echo "* DFU Advanced Menu" Echo "* DFU Advanced Menu"
Echo "* This menu is for ADVANCED USERS ONLY." Echo "* If you do not know what you are doing, exit now and restart your device in normal mode before retrying."
Echo "* If you do not know what you are doing, EXIT NOW by pressing Ctrl+C and restart your device in normal mode."
Input "Select the mode that your device is currently in:" Input "Select the mode that your device is currently in:"
Selection=("kDFU mode") Selection=("kDFU mode")
if [[ $platform != "win" ]]; then if [[ $platform != "win" ]]; then
@ -350,7 +349,7 @@ SelectVersion() {
[[ $ProductType != "iPhone3,2" ]] && Selection+=("6.1.3") [[ $ProductType != "iPhone3,2" ]] && Selection+=("6.1.3")
if [[ $platform == "macos" ]]; then if [[ $platform == "macos" ]]; then
Echo "* Using iPhone4Down on macOS is not recommended for downgrading." Echo "* WARNING - Using iPhone4Down on macOS is not recommended for downgrading."
Echo "* Please use powdersn0w or cherryflowerJB from dora2ios instead." Echo "* Please use powdersn0w or cherryflowerJB from dora2ios instead."
fi fi
@ -368,6 +367,7 @@ SelectVersion() {
Selection+=("More versions") Selection+=("More versions")
elif [[ $ProductType == "iPhone3,3" && $platform != "macos" && $Mode != "Restore712" ]]; then elif [[ $ProductType == "iPhone3,3" && $platform != "macos" && $Mode != "Restore712" ]]; then
Echo "* WARNING - iPhone3,3 support is not well tested. Please use powdersn0w from dora2ios instead."
Echo "* For creating 6.1.3 custom IPSW, make sure to have darling installed: https://github.com/darlinghq/darling" Echo "* For creating 6.1.3 custom IPSW, make sure to have darling installed: https://github.com/darlinghq/darling"
Echo "* For Ubuntu/Debian, you may install the .deb from releases." Echo "* For Ubuntu/Debian, you may install the .deb from releases."
Echo "* For Arch, you may install darling-bin from AUR." Echo "* For Arch, you may install darling-bin from AUR."
@ -375,7 +375,7 @@ SelectVersion() {
fi fi
if [[ $Mode == "Restore712" ]]; then if [[ $Mode == "Restore712" ]]; then
Echo "* Make sure to disable the exploit first! See the README for more details." Echo "* Make sure to disable the exploit first! See the README and wiki for more details."
Input "Press Enter/Return to continue (or press Ctrl+C to cancel)" Input "Press Enter/Return to continue (or press Ctrl+C to cancel)"
read -s read -s
OSVer="7.1.2" OSVer="7.1.2"