mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-23 16:39:17 +01:00
Limit DFU menu options on Windows
This commit is contained in:
parent
cf0c9e472c
commit
5ad141bd3c
18
restore.sh
18
restore.sh
@ -108,7 +108,7 @@ Main() {
|
|||||||
mkdir tmp
|
mkdir tmp
|
||||||
|
|
||||||
if [[ $DeviceProc == 7 && $platform == "win" ]]; then
|
if [[ $DeviceProc == 7 && $platform == "win" ]]; then
|
||||||
local Message="If you want to restore your A7 device on Windows, put the iOS device in pwnDFU mode."
|
local Message="If you want to restore your A7 device on Windows, put the device in pwnDFU mode."
|
||||||
if [[ $DeviceState == "Normal" ]]; then
|
if [[ $DeviceState == "Normal" ]]; then
|
||||||
Error "$Message"
|
Error "$Message"
|
||||||
elif [[ $DeviceState == "Recovery" ]]; then
|
elif [[ $DeviceState == "Recovery" ]]; then
|
||||||
@ -118,7 +118,7 @@ Main() {
|
|||||||
elif [[ $DeviceState == "DFU" ]]; then
|
elif [[ $DeviceState == "DFU" ]]; then
|
||||||
Log "A7 device detected in DFU mode."
|
Log "A7 device detected in DFU mode."
|
||||||
Echo "* Make sure that your device is already in pwnDFU mode with signature checks disabled."
|
Echo "* Make sure that your device is already in pwnDFU mode with signature checks disabled."
|
||||||
Echo "* If your device is not in pwnDFU mode, the restore will NOT proceed!"
|
Echo "* If your device is not in pwnDFU mode, the restore will not proceed!"
|
||||||
Echo "* Entering pwnDFU mode is not supported on Windows. You need to use a Mac/Linux machine or another iOS device to do so."
|
Echo "* Entering pwnDFU mode is not supported on Windows. You need to use a Mac/Linux machine or another iOS device to do so."
|
||||||
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
|
||||||
@ -140,8 +140,10 @@ Main() {
|
|||||||
Echo "* Advanced Options Menu"
|
Echo "* Advanced Options Menu"
|
||||||
Input "This device is in:"
|
Input "This device is in:"
|
||||||
Selection=("kDFU mode")
|
Selection=("kDFU mode")
|
||||||
[[ $DeviceProc == 5 ]] && Selection+=("pwnDFU mode (A5)")
|
if [[ $platform != "win" ]]; then
|
||||||
[[ $DeviceProc == 6 ]] && Selection+=("DFU mode (A6)")
|
[[ $DeviceProc == 5 ]] && Selection+=("pwnDFU mode (A5)")
|
||||||
|
[[ $DeviceProc == 6 ]] && Selection+=("DFU mode (A6)")
|
||||||
|
fi
|
||||||
Selection+=("Any other key to exit")
|
Selection+=("Any other key to exit")
|
||||||
select opt in "${Selection[@]}"; do
|
select opt in "${Selection[@]}"; do
|
||||||
case $opt in
|
case $opt in
|
||||||
@ -149,7 +151,7 @@ Main() {
|
|||||||
"DFU mode (A6)" ) CheckM8; break;;
|
"DFU mode (A6)" ) CheckM8; break;;
|
||||||
"pwnDFU mode (A5)" )
|
"pwnDFU mode (A5)" )
|
||||||
Echo "* Make sure that your device is in pwnDFU mode using an Arduino+USB Host Shield!";
|
Echo "* Make sure that your device is in pwnDFU mode using an Arduino+USB Host Shield!";
|
||||||
Echo "* This option will NOT work if your device is not in pwnDFU mode.";
|
Echo "* This option will not work if your device is not in pwnDFU mode.";
|
||||||
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;
|
||||||
kDFU iBSS; break;;
|
kDFU iBSS; break;;
|
||||||
@ -161,12 +163,12 @@ Main() {
|
|||||||
SkipMainMenu=1
|
SkipMainMenu=1
|
||||||
|
|
||||||
elif [[ $DeviceState == "Recovery" ]]; then
|
elif [[ $DeviceState == "Recovery" ]]; then
|
||||||
if [[ $DeviceProc == 6 ]]; then
|
if [[ $DeviceProc == 6 && $platform != "win" ]]; then
|
||||||
Recovery
|
Recovery
|
||||||
else
|
else
|
||||||
Log "32-bit A5 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 mode (or pwnDFU mode using Arduino + USB Host Shield)"
|
Echo "* For usage of advanced DFU options, 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