mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-12-23 23:01:49 +01:00
Fix #228 and other updates
This commit is contained in:
parent
f583a594c3
commit
760af27d94
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,7 +9,6 @@
|
||||
*.shsh2
|
||||
*.txt
|
||||
Cydia*
|
||||
exploit
|
||||
first_run
|
||||
iP*Custom*/
|
||||
iP*Restore/
|
||||
|
@ -97,10 +97,11 @@ SetToolPaths() {
|
||||
fi
|
||||
elif [[ $platform == "win" ]]; then
|
||||
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 "* 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)"
|
||||
read -s
|
||||
fi
|
||||
@ -190,7 +191,7 @@ InstallDepends() {
|
||||
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
|
||||
|
||||
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
|
||||
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
|
||||
|
@ -104,7 +104,7 @@ GetDeviceValues() {
|
||||
Baseband=0
|
||||
BasebandURL=$(cat $Firmware/13G37/url 2>/dev/null)
|
||||
LatestVer="9.3.6"
|
||||
|
||||
|
||||
if [[ $ProductType == "iPad2,2" ]]; then
|
||||
BasebandURL=$(cat $Firmware/13G36/url)
|
||||
Baseband="ICE3_04.12.09_BOOT_02.13.Release.bbfw"
|
||||
@ -413,45 +413,42 @@ kDFU() {
|
||||
[[ ! $kloader ]] && kloader="kloader"
|
||||
|
||||
Log "Running iproxy for SSH..."
|
||||
$iproxy 2222 22 &
|
||||
$iproxy 2222 22 >/dev/null &
|
||||
iproxyPID=$!
|
||||
sleep 2
|
||||
|
||||
echo
|
||||
Log "Copying stuff to device via SSH..."
|
||||
Echo "* Make sure OpenSSH/Dropbear is installed on the device and running!"
|
||||
Echo "* Dropbear is only needed for devices on iOS 10"
|
||||
Echo "* To make sure that SSH is successful, try these steps:"
|
||||
Echo "* Reinstall OpenSSH/Dropbear, reboot and rejailbreak, then reinstall them again"
|
||||
echo
|
||||
Input "Enter the root password of your iOS device when prompted."
|
||||
Echo "* Note that you will be prompted twice. Do not worry that your input is not visible, it is still being entered."
|
||||
Echo "* The default password is \"alpine\""
|
||||
Log "Please read the message below:"
|
||||
Echo "1. Make sure to have installed the requirements from Cydia."
|
||||
Echo " - Only proceed if you have followed Section 2 (and 2.1 for iOS 10) in the GitHub wiki."
|
||||
Echo " - You will be prompted to enter the root password of your iOS device twice."
|
||||
Echo " - If you have not changed it, the default password is \"alpine\""
|
||||
Echo " - Do not worry that your input is not visible, it is still being entered."
|
||||
Echo "2. Afterwards, the device will disconnect and its screen will stay black."
|
||||
Echo " - Proceed to either press the TOP/HOME button, or unplug and replug the device."
|
||||
sleep 3
|
||||
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
|
||||
if [[ $? == 0 ]]; then
|
||||
$SSH -p 2222 root@127.0.0.1 "chmod +x /tmp/$kloader; /tmp/$kloader /tmp/pwnediBSS" &
|
||||
else
|
||||
Log "Cannot connect to device via USB SSH."
|
||||
Echo "* 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)"
|
||||
Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel and try again)"
|
||||
Log "Failed to connect to device via USB SSH."
|
||||
Echo "* For Linux users, try running \"sudo systemctl restart usbmuxd\" before retrying USB SSH."
|
||||
Input "Press Enter/Return to try again with Wi-Fi SSH (or press Ctrl+C to cancel and try again)"
|
||||
read -s
|
||||
Log "Will try again with Wi-Fi SSH..."
|
||||
Echo "* Make sure that the device and your 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 "* Make sure that your iOS device and PC/Mac are on the same network."
|
||||
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
|
||||
Log "Copying stuff to device via SSH..."
|
||||
$SCP resources/tools/$kloader tmp/pwnediBSS root@$IPAddress:/tmp
|
||||
if [[ $? == 1 ]]; then
|
||||
Error "Cannot connect to device via SSH." \
|
||||
"Please try the steps above to make sure that SSH is successful"
|
||||
if [[ $? != 0 ]]; then
|
||||
Log "Failed to connect to device via Wi-Fi SSH."
|
||||
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
|
||||
$SSH root@$IPAddress "chmod +x /tmp/$kloader; /tmp/$kloader /tmp/pwnediBSS" &
|
||||
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"
|
||||
}
|
||||
|
||||
|
BIN
resources/firmware/src/target/n90/11D257/exploit
Normal file
BIN
resources/firmware/src/target/n90/11D257/exploit
Normal file
Binary file not shown.
@ -272,10 +272,6 @@ IPSW4() {
|
||||
elif [[ $ProductType == "iPhone3,3" && $OSVer != "7.1.2" ]]; then
|
||||
IPSW4Powder
|
||||
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
|
||||
|
||||
if [[ $Jailbreak == 1 ]]; then
|
||||
|
14
restore.sh
14
restore.sh
@ -100,10 +100,10 @@ Main() {
|
||||
elif [[ -e resources/git_hash ]]; then
|
||||
CurrentVersion="$(cat resources/git_hash)"
|
||||
else
|
||||
Echo "* Version: Unknown"
|
||||
Log ".git directory and git_hash file not found, cannot determine version."
|
||||
if [[ $NoVersionCheck != 1 ]]; then
|
||||
Error "git_hash or .git not found. Your copy of iOS-OTA-Downgrader is downloaded incorrectly." \
|
||||
"Please download iOS-OTA-Downgrader from the GitHub releases page or using git clone."
|
||||
Error "Your copy of iOS-OTA-Downgrader is downloaded incorrectly. Do not use the \"Code\" button in GitHub." \
|
||||
"Please download iOS-OTA-Downgrader using git clone or from GitHub releases: https://github.com/LukeZGD/iOS-OTA-Downgrader/releases"
|
||||
fi
|
||||
fi
|
||||
[[ -n $CurrentVersion ]] && Echo "* Version: $CurrentVersion"
|
||||
@ -290,8 +290,7 @@ Main() {
|
||||
fi
|
||||
echo
|
||||
Echo "* DFU Advanced Menu"
|
||||
Echo "* This menu is for ADVANCED USERS ONLY."
|
||||
Echo "* If you do not know what you are doing, EXIT NOW by pressing Ctrl+C and restart your device in normal mode."
|
||||
Echo "* If you do not know what you are doing, exit now and restart your device in normal mode before retrying."
|
||||
Input "Select the mode that your device is currently in:"
|
||||
Selection=("kDFU mode")
|
||||
if [[ $platform != "win" ]]; then
|
||||
@ -350,7 +349,7 @@ SelectVersion() {
|
||||
[[ $ProductType != "iPhone3,2" ]] && Selection+=("6.1.3")
|
||||
|
||||
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."
|
||||
fi
|
||||
|
||||
@ -368,6 +367,7 @@ SelectVersion() {
|
||||
Selection+=("More versions")
|
||||
|
||||
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 Ubuntu/Debian, you may install the .deb from releases."
|
||||
Echo "* For Arch, you may install darling-bin from AUR."
|
||||
@ -375,7 +375,7 @@ SelectVersion() {
|
||||
fi
|
||||
|
||||
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)"
|
||||
read -s
|
||||
OSVer="7.1.2"
|
||||
|
Loading…
Reference in New Issue
Block a user