mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-12-04 13:54:18 +01:00
parent
cb049d4a01
commit
91fee9547f
@ -304,15 +304,7 @@ RecoveryExit() {
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
kDFU() {
|
PatchiBSS() {
|
||||||
local kloader
|
|
||||||
local VerDetect=$(echo $ProductVer | cut -c 1)
|
|
||||||
|
|
||||||
if [[ $DeviceState != "Normal" ]]; then
|
|
||||||
Log "Device is already in $DeviceState mode"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $iBSSBuildVer == $BuildVer && -e "$IPSW.ipsw" ]]; then
|
if [[ $iBSSBuildVer == $BuildVer && -e "$IPSW.ipsw" ]]; then
|
||||||
Log "Extracting iBSS from IPSW..."
|
Log "Extracting iBSS from IPSW..."
|
||||||
mkdir -p saved/$ProductType 2>/dev/null
|
mkdir -p saved/$ProductType 2>/dev/null
|
||||||
@ -332,6 +324,55 @@ kDFU() {
|
|||||||
|
|
||||||
Log "Patching iBSS..."
|
Log "Patching iBSS..."
|
||||||
$bspatch saved/$ProductType/$iBSS.dfu tmp/pwnediBSS resources/patches/$iBSS.patch
|
$bspatch saved/$ProductType/$iBSS.dfu tmp/pwnediBSS resources/patches/$iBSS.patch
|
||||||
|
}
|
||||||
|
|
||||||
|
SendPwnediBSS() {
|
||||||
|
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."
|
||||||
|
Input "Press Enter/Return to continue (or press Ctrl+C to cancel)"
|
||||||
|
read -s
|
||||||
|
Input "No iBSS Option"
|
||||||
|
Echo "* If you already sent pwned iBSS to the device, select Y."
|
||||||
|
Echo "* This option is disabled by default (N)."
|
||||||
|
read -p "$(Input 'Enable this option? (y/N):')" SendiBSS
|
||||||
|
if [[ $SendiBSS == 'Y' || $SendiBSS == 'y' ]]; then
|
||||||
|
Log "No iBSS option enabled by user."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
Input "Send iBSS Option"
|
||||||
|
Echo "* To let futurerestore send patched iBSS, select N."
|
||||||
|
Echo "* To send pwned iBSS using ipwndfu, select Y."
|
||||||
|
Echo "* For macOS >=12.3 and ARM Macs, install python2 first before selecting ipwndfu!"
|
||||||
|
Echo "* This option is enabled by default (Y)."
|
||||||
|
read -p "$(Input 'Enable this option? (Y/n):')" SendiBSS
|
||||||
|
if [[ $SendiBSS == 'N' || $SendiBSS == 'n' ]]; then
|
||||||
|
Log "Send iBSS option disabled by user."
|
||||||
|
SendiBSS=1
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
PatchiBSS
|
||||||
|
if [[ $platform == "macos" ]]; then
|
||||||
|
SaveExternal LukeZGD ipwndfu
|
||||||
|
fi
|
||||||
|
cd resources/ipwndfu
|
||||||
|
Log "Sending iBSS..."
|
||||||
|
$ipwndfu -l ../../tmp/pwnediBSS
|
||||||
|
cd ../..
|
||||||
|
}
|
||||||
|
|
||||||
|
kDFU() {
|
||||||
|
local kloader
|
||||||
|
local VerDetect=$(echo $ProductVer | cut -c 1)
|
||||||
|
|
||||||
|
if [[ $DeviceState != "Normal" ]]; then
|
||||||
|
Log "Device is already in $DeviceState mode"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
PatchiBSS
|
||||||
|
|
||||||
[[ $VerDetect == 1 ]] && kloader="kloader_hgsp"
|
[[ $VerDetect == 1 ]] && kloader="kloader_hgsp"
|
||||||
[[ $VerDetect == 5 ]] && kloader="kloader5"
|
[[ $VerDetect == 5 ]] && kloader="kloader5"
|
||||||
|
10
restore.sh
10
restore.sh
@ -78,7 +78,7 @@ Main() {
|
|||||||
Error "Platform unknown/not supported."
|
Error "Platform unknown/not supported."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod +x ./resources/*.sh ./resources/tools/* ./resources/libimobiledevice_$platform/*
|
chmod +x ./resources/*.sh ./resources/tools/*
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
Error "A problem with file permissions has been detected, cannot proceed."
|
Error "A problem with file permissions has been detected, cannot proceed."
|
||||||
fi
|
fi
|
||||||
@ -255,13 +255,7 @@ Main() {
|
|||||||
case $opt in
|
case $opt in
|
||||||
"kDFU mode" ) break;;
|
"kDFU mode" ) break;;
|
||||||
"DFU mode (A4/A6)" ) EnterPwnDFU; break;;
|
"DFU mode (A4/A6)" ) EnterPwnDFU; break;;
|
||||||
"pwnDFU mode (A5)" )
|
"pwnDFU mode (A5)" ) SendPwnediBSS; break;;
|
||||||
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 "* Sending pwned iBSS is not needed, futurerestore will handle that.";
|
|
||||||
Input "Press Enter/Return to continue (or press Ctrl+C to cancel)";
|
|
||||||
read -s;
|
|
||||||
SendiBSS=1; break;;
|
|
||||||
* ) exit 0;;
|
* ) exit 0;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user