mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-23 16:39:17 +01:00
DFU Advanced Menu now requires an argument
This commit is contained in:
parent
da42562436
commit
3b665b1627
@ -69,7 +69,8 @@ GetDeviceValues() {
|
|||||||
echo "${Color_Y}* Make sure to also trust this computer by selecting \"Trust\" at the pop-up. ${Color_N}"
|
echo "${Color_Y}* Make sure to also trust this computer by selecting \"Trust\" at the pop-up. ${Color_N}"
|
||||||
echo "${Color_Y}* For macOS users, double-check if the device is being detected by iTunes/Finder. ${Color_N}"
|
echo "${Color_Y}* For macOS users, double-check if the device is being detected by iTunes/Finder. ${Color_N}"
|
||||||
echo "${Color_Y}* Recovery or DFU mode is also applicable. For more details regarding alternative methods, read the \"Troubleshooting\" wiki page in GitHub ${Color_N}"
|
echo "${Color_Y}* Recovery or DFU mode is also applicable. For more details regarding alternative methods, read the \"Troubleshooting\" wiki page in GitHub ${Color_N}"
|
||||||
echo "${Color_Y}* To perform operations without an iOS device connected, add NoDevice as an argument. Example: ./restore.sh NoDevice ${Color_N}"
|
echo "${Color_Y}* To perform operations without an iOS device connected, add NoDevice as an argument. ${Color_N}"
|
||||||
|
echo "${Color_Y}* For more details, read the \"Troubleshooting\" wiki page in GitHub ${Color_N}"
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ -n $DeviceState ]]; then
|
elif [[ -n $DeviceState ]]; then
|
||||||
if [[ ! $ProductType ]]; then
|
if [[ ! $ProductType ]]; then
|
||||||
@ -234,7 +235,8 @@ CheckM8() {
|
|||||||
[[ $DeviceProc == 7 ]] && pwnD=$($irecovery -q | grep -c "PWND")
|
[[ $DeviceProc == 7 ]] && pwnD=$($irecovery -q | grep -c "PWND")
|
||||||
|
|
||||||
if [[ $pwnDFUDevice != 0 && $pwnD != 1 ]]; then
|
if [[ $pwnDFUDevice != 0 && $pwnD != 1 ]]; then
|
||||||
echo -e "\n${Color_R}[Error] Failed to enter pwnDFU mode. Please run the script again: ./restore.sh Downgrade ${Color_N}"
|
echo -e "\n${Color_R}[Error] Failed to enter pwnDFU mode. Please run the script again ${Color_N}"
|
||||||
|
echo "${Color_Y}* If the screen is black, exit DFU mode first by holding the TOP and HOME buttons for 15 seconds. ${Color_N}"
|
||||||
echo "${Color_Y}* This step may fail a lot, especially on Linux, and unfortunately there is nothing I can do about the low success rates. ${Color_N}"
|
echo "${Color_Y}* This step may fail a lot, especially on Linux, and unfortunately there is nothing I can do about the low success rates. ${Color_N}"
|
||||||
echo "${Color_Y}* The only option is to make sure you are using an Intel or Apple Silicon device, and to try multiple times ${Color_N}"
|
echo "${Color_Y}* The only option is to make sure you are using an Intel or Apple Silicon device, and to try multiple times ${Color_N}"
|
||||||
Echo "* For more details, read the \"Troubleshooting\" wiki page in GitHub"
|
Echo "* For more details, read the \"Troubleshooting\" wiki page in GitHub"
|
||||||
@ -265,12 +267,12 @@ Recovery() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Echo "* Hold POWER and HOME button for 8 seconds."
|
Echo "* Hold TOP and HOME buttons for 8 seconds."
|
||||||
for i in {08..01}; do
|
for i in {08..01}; do
|
||||||
echo -n "$i "
|
echo -n "$i "
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo -e "\n$(Echo '* Release POWER and hold HOME button for 8 seconds.')"
|
echo -e "\n$(Echo '* Release TOP button and hold HOME button for 8 seconds.')"
|
||||||
for i in {08..01}; do
|
for i in {08..01}; do
|
||||||
echo -n "$i "
|
echo -n "$i "
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -324,6 +326,7 @@ kDFU() {
|
|||||||
$iproxy 2222 22 &
|
$iproxy 2222 22 &
|
||||||
iproxyPID=$!
|
iproxyPID=$!
|
||||||
|
|
||||||
|
echo
|
||||||
Log "Copying stuff to device via SSH..."
|
Log "Copying stuff to device via SSH..."
|
||||||
Echo "* Make sure OpenSSH/Dropbear is installed on the device and running!"
|
Echo "* Make sure OpenSSH/Dropbear is installed on the device and running!"
|
||||||
Echo "* Dropbear is only needed for devices on iOS 10"
|
Echo "* Dropbear is only needed for devices on iOS 10"
|
||||||
@ -356,6 +359,6 @@ kDFU() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
Log "Entering kDFU mode..."
|
Log "Entering kDFU mode..."
|
||||||
Echo "* Press POWER or HOME button when the device disconnects and its screen goes black"
|
Echo "* Press TOP or HOME button when the device disconnects and its screen goes black"
|
||||||
FindDevice "DFU"
|
FindDevice "DFU"
|
||||||
}
|
}
|
||||||
|
22
restore.sh
22
restore.sh
@ -45,7 +45,6 @@ Log() {
|
|||||||
|
|
||||||
Main() {
|
Main() {
|
||||||
local Selection=()
|
local Selection=()
|
||||||
local SkipMainMenu
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
Echo "******* iOS-OTA-Downgrader *******"
|
Echo "******* iOS-OTA-Downgrader *******"
|
||||||
@ -104,10 +103,8 @@ Main() {
|
|||||||
|
|
||||||
Clean
|
Clean
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
|
|
||||||
[[ -n $1 ]] && SkipMainMenu=1
|
|
||||||
|
|
||||||
if [[ $SkipMainMenu == 1 && $1 != "NoColor" && $1 != "NoDevice" ]]; then
|
if [[ -n $1 && $1 != "NoColor" && $1 != "NoDevice" && $1 != "PwnedDevice" ]]; then
|
||||||
Mode="$1"
|
Mode="$1"
|
||||||
else
|
else
|
||||||
[[ $1 != "NoDevice" ]] && Selection+=("Downgrade Device")
|
[[ $1 != "NoDevice" ]] && Selection+=("Downgrade Device")
|
||||||
@ -165,9 +162,20 @@ Main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ $DeviceState == "DFU" ]]; then
|
elif [[ $DeviceState == "DFU" ]]; then
|
||||||
|
if [[ $1 != "PwnedDevice" ]]; then
|
||||||
|
echo -e "\n${Color_R}[Error] 32-bit A${DeviceProc} device detected in DFU mode. ${Color_N}"
|
||||||
|
echo "${Color_Y}* Please put the device in normal mode and jailbroken before proceeding. ${Color_N}"
|
||||||
|
echo "${Color_Y}* Exit DFU mode by holding the TOP and HOME buttons for 15 seconds. ${Color_N}"
|
||||||
|
echo "${Color_Y}* For usage of the DFU Advanced Menu, add PwnedDevice as an argument. ${Color_N}"
|
||||||
|
echo "${Color_Y}* For more details, read the \"Troubleshooting\" wiki page in GitHub ${Color_N}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Mode="Downgrade"
|
Mode="Downgrade"
|
||||||
Echo "* Advanced Options Menu"
|
echo
|
||||||
Input "This device is in:"
|
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."
|
||||||
|
Input "Select the mode that your device is currently in:"
|
||||||
Selection=("kDFU mode")
|
Selection=("kDFU mode")
|
||||||
[[ $DeviceProc == 5 ]] && Selection+=("pwnDFU mode (A5)")
|
[[ $DeviceProc == 5 ]] && Selection+=("pwnDFU mode (A5)")
|
||||||
[[ $DeviceProc == 6 ]] && Selection+=("DFU mode (A6)")
|
[[ $DeviceProc == 6 ]] && Selection+=("DFU mode (A6)")
|
||||||
@ -193,7 +201,7 @@ Main() {
|
|||||||
else
|
else
|
||||||
Log "32-bit A${DeviceProc} device detected in recovery mode."
|
Log "32-bit A${DeviceProc} device detected in recovery mode."
|
||||||
Echo "* Please put the device in normal mode and jailbroken before proceeding."
|
Echo "* Please put the device in normal mode and jailbroken before proceeding."
|
||||||
Echo "* For usage of advanced DFU options, put the device in kDFU or pwnDFU mode"
|
Echo "* For usage of the DFU Advanced Menu, put the device in kDFU or pwnDFU mode"
|
||||||
RecoveryExit
|
RecoveryExit
|
||||||
fi
|
fi
|
||||||
Log "Downgrading $ProductType in pwnDFU mode..."
|
Log "Downgrading $ProductType in pwnDFU mode..."
|
||||||
|
Loading…
Reference in New Issue
Block a user