mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 10:24:16 +01:00
Update restore.sh
This commit is contained in:
parent
e6125ce079
commit
1291e74d78
34
restore.sh
34
restore.sh
@ -151,7 +151,7 @@ set_tool_paths() {
|
|||||||
*"sid" | "kali"* ) debian_ver="sid";;
|
*"sid" | "kali"* ) debian_ver="sid";;
|
||||||
* ) debian_ver="$(echo "$debian_ver" | cut -c -2)";;
|
* ) debian_ver="$(echo "$debian_ver" | cut -c -2)";;
|
||||||
esac
|
esac
|
||||||
elif [[ $ID == "fedora" || $ID == "nobara" || $ID_LIKE == "fedora" ]]; then
|
elif [[ $ID == "fedora" || $ID_LIKE == "fedora" || $ID == "nobara" ]]; then
|
||||||
fedora_ver=$VERSION_ID
|
fedora_ver=$VERSION_ID
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -187,10 +187,11 @@ set_tool_paths() {
|
|||||||
live_cdusb_str+=" - Persistent storage"
|
live_cdusb_str+=" - Persistent storage"
|
||||||
else
|
else
|
||||||
warn "Detected Legacy iOS Kit running on temporary storage."
|
warn "Detected Legacy iOS Kit running on temporary storage."
|
||||||
print "* You may run out of space and get errors during the downgrade process."
|
print "* You may run out of space and get errors during the restore process."
|
||||||
print "* Please move Legacy iOS Kit to a drive that is NOT used for the live USB."
|
print "* Please move Legacy iOS Kit to a drive that is NOT used for the live USB."
|
||||||
print "* This may mean using another external HDD/flash drive to store Legacy iOS Kit on."
|
print "* This may mean using another external HDD/flash drive to store Legacy iOS Kit on."
|
||||||
print "* To use one USB drive only, create the live USB using Rufus with Persistent Storage enabled."
|
print "* To use one USB drive only, create the live USB using Rufus with Persistent Storage enabled."
|
||||||
|
sleep 5
|
||||||
pause
|
pause
|
||||||
live_cdusb_str+=" - Temporary storage"
|
live_cdusb_str+=" - Temporary storage"
|
||||||
fi
|
fi
|
||||||
@ -300,7 +301,7 @@ set_tool_paths() {
|
|||||||
if [[ $device_sudoloop == 1 ]]; then
|
if [[ $device_sudoloop == 1 ]]; then
|
||||||
sudo chmod +x $dir/*
|
sudo chmod +x $dir/*
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
error "Failed to set up execute permissions, cannot continue. Try to move Legacy iOS Kit somewhere else."
|
error "Failed to set up execute permissions of binaries, cannot continue. Try to move Legacy iOS Kit somewhere else."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
chmod +x $dir/*
|
chmod +x $dir/*
|
||||||
@ -308,11 +309,8 @@ set_tool_paths() {
|
|||||||
|
|
||||||
futurerestore+="$dir/futurerestore"
|
futurerestore+="$dir/futurerestore"
|
||||||
gaster+="$dir/gaster"
|
gaster+="$dir/gaster"
|
||||||
ideviceactivation="$dir/ideviceactivation"
|
|
||||||
ideviceenterrecovery="$dir/ideviceenterrecovery"
|
|
||||||
ideviceinfo="$dir/ideviceinfo"
|
ideviceinfo="$dir/ideviceinfo"
|
||||||
idevicerestore+="$dir/idevicerestore"
|
idevicerestore+="$dir/idevicerestore"
|
||||||
iproxy="$dir/iproxy"
|
|
||||||
ipwnder+="$dir/ipwnder"
|
ipwnder+="$dir/ipwnder"
|
||||||
irecovery+="$dir/irecovery"
|
irecovery+="$dir/irecovery"
|
||||||
irecovery2+="$dir/irecovery2"
|
irecovery2+="$dir/irecovery2"
|
||||||
@ -376,6 +374,7 @@ install_depends() {
|
|||||||
log "Installing Rosetta 2"
|
log "Installing Rosetta 2"
|
||||||
softwareupdate --install-rosetta
|
softwareupdate --install-rosetta
|
||||||
fi
|
fi
|
||||||
|
print "* Make sure to install requirements from Homebrew/MacPorts: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/How-to-Use"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$platform_ver" > "../resources/firstrun"
|
echo "$platform_ver" > "../resources/firstrun"
|
||||||
@ -1142,7 +1141,7 @@ device_iproxy() {
|
|||||||
if [[ -n $1 ]]; then
|
if [[ -n $1 ]]; then
|
||||||
port=$1
|
port=$1
|
||||||
fi
|
fi
|
||||||
$iproxy $ssh_port $port >/dev/null &
|
"$dir/iproxy" $ssh_port $port >/dev/null &
|
||||||
iproxy_pid=$!
|
iproxy_pid=$!
|
||||||
sleep 1
|
sleep 1
|
||||||
}
|
}
|
||||||
@ -1303,7 +1302,7 @@ device_enter_mode() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
log "Entering recovery mode..."
|
log "Entering recovery mode..."
|
||||||
$ideviceenterrecovery "$device_udid" >/dev/null
|
"$dir/ideviceenterrecovery" "$device_udid" >/dev/null
|
||||||
device_find_mode Recovery 50
|
device_find_mode Recovery 50
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -1998,19 +1997,20 @@ ipsw_preference_set() {
|
|||||||
if [[ $ipsw_isbeta == 1 ]]; then
|
if [[ $ipsw_isbeta == 1 ]]; then
|
||||||
case $device_target_vers in
|
case $device_target_vers in
|
||||||
8* )
|
8* )
|
||||||
if [[ $device_target_build == "12A4265u" || $device_target_build == "12A4297e" || $device_target_powder != 1 ]]; then
|
if [[ $device_target_build == "12A4265u" || $device_target_build == "12A4297e" ]]; then
|
||||||
warn "iOS beta detected. Disabling jailbreak option"
|
warn "iOS beta detected. Disabling jailbreak option"
|
||||||
ipsw_canjailbreak=
|
ipsw_canjailbreak=
|
||||||
elif [[ $ipsw_canjailbreak == 1 ]]; then
|
|
||||||
warn "iOS beta detected. Jailbreak option might not work properly"
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
[76]* ) warn "iOS beta detected. Jailbreak option might not work properly";;
|
[76]* ) :;;
|
||||||
* )
|
* )
|
||||||
warn "iOS beta detected. Disabling jailbreak option"
|
warn "iOS beta detected. Disabling jailbreak option"
|
||||||
ipsw_canjailbreak=
|
ipsw_canjailbreak=
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
if [[ $ipsw_canjailbreak == 1 ]]; then
|
||||||
|
warn "iOS beta detected. Jailbreak option might not work properly"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $ipsw_fourthree == 1 ]]; then
|
if [[ $ipsw_fourthree == 1 ]]; then
|
||||||
@ -7674,11 +7674,11 @@ device_activate() {
|
|||||||
print "* For hacktivation, go to \"Restore/Downgrade\" or \"Hacktivate Device\" instead."
|
print "* For hacktivation, go to \"Restore/Downgrade\" or \"Hacktivate Device\" instead."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
$ideviceactivation activate
|
"$dir/ideviceactivation" activate
|
||||||
case $device_type in
|
case $device_type in
|
||||||
iPod[123],1 )
|
iPod[123],1 )
|
||||||
if (( device_det <= 3 )); then
|
if (( device_det <= 3 )); then
|
||||||
$ideviceactivation itunes
|
"$dir/ideviceactivation" itunes
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -7696,11 +7696,7 @@ device_hacktivate() {
|
|||||||
6.1 ) build="10B141";;
|
6.1 ) build="10B141";;
|
||||||
esac
|
esac
|
||||||
log "Checking ideviceactivation status..."
|
log "Checking ideviceactivation status..."
|
||||||
local check=$($ideviceactivation activate 2>&1 | grep -c "SIM Required")
|
"$dir/ideviceactivation" activate
|
||||||
if [[ $check != 1 ]]; then
|
|
||||||
warn "The SIM Required message did not show up at ideviceactivation, cannot continue."
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
local patch="../resources/firmware/FirmwareBundles/Down_${type}_${device_vers}_${build}.bundle/lockdownd.patch"
|
local patch="../resources/firmware/FirmwareBundles/Down_${type}_${device_vers}_${build}.bundle/lockdownd.patch"
|
||||||
print "* Note: This is for hacktivating devices that are already restored, jailbroken, and have OpenSSH installed."
|
print "* Note: This is for hacktivating devices that are already restored, jailbroken, and have OpenSSH installed."
|
||||||
|
Loading…
Reference in New Issue
Block a user