mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 10:24:16 +01:00
parent
74073e4cb4
commit
8e9995f42a
@ -85,19 +85,16 @@
|
|||||||
- **Windows** 8.1 and newer
|
- **Windows** 8.1 and newer
|
||||||
|
|
||||||
## Tools and other stuff used
|
## Tools and other stuff used
|
||||||
- cURL
|
- curl
|
||||||
- bspatch
|
- bspatch
|
||||||
- python2 (ipwndfu, rmsigchks, SimpleHTTPServer), python3 (http.server)
|
|
||||||
- [powdersn0w_pub](https://github.com/dora2-iOS/powdersn0w_pub) - dora2ios; [LukeZGD fork](https://github.com/LukeZGD/powdersn0w_pub)
|
- [powdersn0w_pub](https://github.com/dora2-iOS/powdersn0w_pub) - dora2ios; [LukeZGD fork](https://github.com/LukeZGD/powdersn0w_pub)
|
||||||
- [ch3rryflower](https://web.archive.org/web/20200708040313/https://github.com/dora2-iOS/ch3rryflower) - dora2ios (used for iOS 4.3.x only)
|
- [ch3rryflower](https://web.archive.org/web/20200708040313/https://github.com/dora2-iOS/ch3rryflower) - dora2ios (used for iOS 4.3.x only)
|
||||||
- [ipwndfu](https://github.com/LukeZGD/ipwndfu) - LukeZGD fork
|
- [ipwndfu](https://github.com/LukeZGD/ipwndfu) - LukeZGD fork
|
||||||
- [iPwnder32](https://github.com/dora2-iOS/iPwnder32) - dora2ios
|
|
||||||
- [ipwnder_lite](https://github.com/dora2-iOS/ipwnder_lite) - dora2ios
|
- [ipwnder_lite](https://github.com/dora2-iOS/ipwnder_lite) - dora2ios
|
||||||
- [gaster](https://github.com/0x7ff/gaster) - 0x7ff; [verygenericname (Nathan) fork](https://github.com/verygenericname/gaster)
|
|
||||||
- [daibutsuCFW](https://github.com/dora2-iOS/daibutsuCFW) - dora2ios; [LukeZGD fork](https://github.com/LukeZGD/daibutsuCFW)
|
- [daibutsuCFW](https://github.com/dora2-iOS/daibutsuCFW) - dora2ios; [LukeZGD fork](https://github.com/LukeZGD/daibutsuCFW)
|
||||||
- [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice), [libirecovery](https://github.com/libimobiledevice/libirecovery) - libimobiledevice ([macOS/Windows builds](https://github.com/libimobiledevice-win32/imobiledevice-net))
|
- [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice), [libirecovery](https://github.com/libimobiledevice/libirecovery) - libimobiledevice ([macOS/Windows builds](https://github.com/libimobiledevice-win32/imobiledevice-net))
|
||||||
- [tsschecker](https://github.com/tihmstar/tsschecker) - tihmstar; [1Conan fork](https://github.com/1Conan/tsschecker)
|
- [tsschecker](https://github.com/tihmstar/tsschecker) - tihmstar; [1Conan fork](https://github.com/1Conan/tsschecker)
|
||||||
- [futurerestore](https://github.com/futurerestore/futurerestore) - futurerestore beta (and 194)
|
- [futurerestore](https://github.com/tihmstar/futurerestore) - tihmstar; [LukeZGD fork](https://github.com/LukeZGD/futurerestore)
|
||||||
- [idevicerestore](https://github.com/libimobiledevice/idevicerestore) - libimobiledevice; [LukeZGD fork](https://github.com/LukeZGD/idevicerestore)
|
- [idevicerestore](https://github.com/libimobiledevice/idevicerestore) - libimobiledevice; [LukeZGD fork](https://github.com/LukeZGD/idevicerestore)
|
||||||
- [idevicererestore](https://github.com/LukeZGD/daibutsuCFW) from daibutsuCFW (used on Linux ARM/Windows restores for 32-bit devices)
|
- [idevicererestore](https://github.com/LukeZGD/daibutsuCFW) from daibutsuCFW (used on Linux ARM/Windows restores for 32-bit devices)
|
||||||
- [kloader](https://www.youtube.com/watch?v=fh0tB6fp0Sc)
|
- [kloader](https://www.youtube.com/watch?v=fh0tB6fp0Sc)
|
||||||
|
BIN
bin/macos/futurerestore_194
Executable file
BIN
bin/macos/futurerestore_194
Executable file
Binary file not shown.
BIN
bin/macos/gaster
BIN
bin/macos/gaster
Binary file not shown.
57
restore.sh
57
restore.sh
@ -4,7 +4,7 @@ device_disable_bbupdate="iPad2,3" # Disable baseband update for this device. You
|
|||||||
ipsw_openssh=1 # If this value is 1, OpenSSH will be added to custom IPSW. (8.4.1 daibutsu and 6.1.3 p0sixspwn only)
|
ipsw_openssh=1 # If this value is 1, OpenSSH will be added to custom IPSW. (8.4.1 daibutsu and 6.1.3 p0sixspwn only)
|
||||||
|
|
||||||
print() {
|
print() {
|
||||||
echo "${color_B}$1${color_N}"
|
echo "${color_B}${1}${color_N}"
|
||||||
}
|
}
|
||||||
|
|
||||||
input() {
|
input() {
|
||||||
@ -24,6 +24,15 @@ error() {
|
|||||||
clean_and_exit 1
|
clean_and_exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pause() {
|
||||||
|
input "Press Enter/Return to continue (or press Ctrl+C to cancel)"
|
||||||
|
read -s
|
||||||
|
}
|
||||||
|
|
||||||
|
clean() {
|
||||||
|
rm -rf "$(dirname "$0")/tmp/"* "$(dirname "$0")/iP"*/ "$(dirname "$0")/tmp/"
|
||||||
|
}
|
||||||
|
|
||||||
clean_and_exit() {
|
clean_and_exit() {
|
||||||
if [[ $platform == "windows" ]]; then
|
if [[ $platform == "windows" ]]; then
|
||||||
input "Press Enter/Return to exit."
|
input "Press Enter/Return to exit."
|
||||||
@ -32,16 +41,11 @@ clean_and_exit() {
|
|||||||
if [[ $device_sudoloop == 1 ]]; then
|
if [[ $device_sudoloop == 1 ]]; then
|
||||||
sudo rm -rf /tmp/futurerestore /tmp/*.json
|
sudo rm -rf /tmp/futurerestore /tmp/*.json
|
||||||
fi
|
fi
|
||||||
rm -rf "$(dirname "$0")/tmp/"* "$(dirname "$0")/iP"*/ "$(dirname "$0")/tmp/"
|
clean
|
||||||
kill $iproxy_pid $httpserver_pid $sudoloop_pid 2>/dev/null
|
kill $iproxy_pid $httpserver_pid $sudoloop_pid 2>/dev/null
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
pause() {
|
|
||||||
input "Press Enter/Return to continue (or press Ctrl+C to cancel)"
|
|
||||||
read -s
|
|
||||||
}
|
|
||||||
|
|
||||||
bash_version=$(/usr/bin/env bash -c 'echo ${BASH_VERSINFO[0]}')
|
bash_version=$(/usr/bin/env bash -c 'echo ${BASH_VERSINFO[0]}')
|
||||||
if (( bash_version < 5 )); then
|
if (( bash_version < 5 )); then
|
||||||
error "Your bash version ($bash_version) is too old. Install a newer version of bash to continue." \
|
error "Your bash version ($bash_version) is too old. Install a newer version of bash to continue." \
|
||||||
@ -280,7 +284,7 @@ install_depends() {
|
|||||||
sudo ln -sf /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-certificates.crt
|
sudo ln -sf /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-certificates.crt
|
||||||
|
|
||||||
elif [[ $ID == "opensuse-tumbleweed" ]]; then
|
elif [[ $ID == "opensuse-tumbleweed" ]]; then
|
||||||
sudo zypper -n in bsdiff curl jq libimobiledevice-1_0-6 openssl python3 usbmuxd unzip vim xmlstarlet zenity zip
|
sudo zypper -n in bsdiff curl jq libimobiledevice-1_0-6 openssl-3 python3 usbmuxd unzip vim xmlstarlet zenity zip
|
||||||
|
|
||||||
elif [[ $platform == "macos" ]]; then
|
elif [[ $platform == "macos" ]]; then
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
@ -1134,6 +1138,8 @@ patch_ibec() {
|
|||||||
$bspatch $name.raw $name.patched "../resources/patch/$download_targetfile.patch"
|
$bspatch $name.raw $name.patched "../resources/patch/$download_targetfile.patch"
|
||||||
"$dir/xpwntool" $name.patched pwnediBEC -t $name.dec
|
"$dir/xpwntool" $name.patched pwnediBEC -t $name.dec
|
||||||
rm $name.dec $name.orig $name.raw $name.patched
|
rm $name.dec $name.orig $name.raw $name.patched
|
||||||
|
cp pwnediBEC ../resources/saved
|
||||||
|
log "Pwned iBEC saved at: saved/$device_type/pwnediBEC"
|
||||||
}
|
}
|
||||||
|
|
||||||
ipsw_path_set() {
|
ipsw_path_set() {
|
||||||
@ -1443,10 +1449,7 @@ ipsw_download() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ipsw_prepare_1033() {
|
ipsw_prepare_1033() {
|
||||||
# set iBSS, iBEC, iBSSb, iBECb variables, not needed on mac fr
|
# patch iBSS, iBEC, iBSSb, iBECb and set variables
|
||||||
if [[ $platform == "macos" ]]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
iBSS="ipad4"
|
iBSS="ipad4"
|
||||||
if [[ $device_type == "iPhone6"* ]]; then
|
if [[ $device_type == "iPhone6"* ]]; then
|
||||||
iBSS="iphone6"
|
iBSS="iphone6"
|
||||||
@ -1477,6 +1480,20 @@ ipsw_prepare_1033() {
|
|||||||
cp $iBSS.im4p $iBEC.im4p ../saved/$device_type
|
cp $iBSS.im4p $iBEC.im4p ../saved/$device_type
|
||||||
fi
|
fi
|
||||||
log "Pwned iBSS and iBEC saved at: saved/$device_type"
|
log "Pwned iBSS and iBEC saved at: saved/$device_type"
|
||||||
|
|
||||||
|
if [[ $platform == "macos" && ! -e "$ipsw_custom.ipsw" ]]; then
|
||||||
|
log "Preparing custom IPSW..."
|
||||||
|
mkdir -p Firmware/dfu
|
||||||
|
cp "$ipsw_path.ipsw" "$ipsw_custom.ipsw"
|
||||||
|
zip -d "$ipsw_custom.ipsw" Firmware/dfu/$iBEC.im4p
|
||||||
|
cp $iBEC.im4p Firmware/dfu
|
||||||
|
zip -r0 "$ipsw_custom.ipsw" Firmware/dfu/$iBEC.im4p
|
||||||
|
if [[ $device_type == "iPad4"* ]]; then
|
||||||
|
zip -d "$ipsw_custom.ipsw" Firmware/dfu/$iBECb.im4p
|
||||||
|
cp $iBECb.im4p Firmware/dfu
|
||||||
|
zip -r0 "$ipsw_custom.ipsw" Firmware/dfu/$iBECb.im4p
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
ipsw_prepare_jailbreak() {
|
ipsw_prepare_jailbreak() {
|
||||||
@ -1935,7 +1952,6 @@ restore_futurerestore() {
|
|||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
ipsw_extract
|
|
||||||
restore_download_bbsep
|
restore_download_bbsep
|
||||||
# baseband args
|
# baseband args
|
||||||
if [[ $restore_baseband == 0 ]]; then
|
if [[ $restore_baseband == 0 ]]; then
|
||||||
@ -1958,14 +1974,18 @@ restore_futurerestore() {
|
|||||||
if [[ $debug_mode == 1 ]]; then
|
if [[ $debug_mode == 1 ]]; then
|
||||||
ExtraArgs+=("-d")
|
ExtraArgs+=("-d")
|
||||||
fi
|
fi
|
||||||
ExtraArgs+=("-t" "$shsh_path" "$ipsw_path.ipsw")
|
|
||||||
if [[ $platform != "macos" ]]; then
|
if [[ $platform != "macos" ]]; then
|
||||||
if (( device_proc < 7 )); then
|
if (( device_proc < 7 )); then
|
||||||
futurerestore+="_old"
|
futurerestore+="_old"
|
||||||
else
|
else
|
||||||
futurerestore+="_new"
|
futurerestore+="_new"
|
||||||
fi
|
fi
|
||||||
|
elif [[ $device_target_other != 1 && $device_target_vers == "10.3.3" ]]; then
|
||||||
|
futurerestore="$dir/futurerestore_194"
|
||||||
|
ipsw_path="$ipsw_custom"
|
||||||
fi
|
fi
|
||||||
|
ExtraArgs+=("-t" "$shsh_path" "$ipsw_path.ipsw")
|
||||||
|
ipsw_extract
|
||||||
|
|
||||||
log "Running futurerestore with command: $futurerestore ${ExtraArgs[*]}"
|
log "Running futurerestore with command: $futurerestore ${ExtraArgs[*]}"
|
||||||
$futurerestore "${ExtraArgs[@]}"
|
$futurerestore "${ExtraArgs[@]}"
|
||||||
@ -1989,9 +2009,6 @@ restore_prepare_1033() {
|
|||||||
local attempt=1
|
local attempt=1
|
||||||
|
|
||||||
shsh_save
|
shsh_save
|
||||||
if [[ $platform == "macos" ]]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
if [[ $device_type == "iPad4,4" || $device_type == "iPad4,5" ]]; then
|
if [[ $device_type == "iPad4,4" || $device_type == "iPad4,5" ]]; then
|
||||||
iBSS=$iBSSb
|
iBSS=$iBSSb
|
||||||
iBEC=$iBECb
|
iBEC=$iBECb
|
||||||
@ -2067,9 +2084,7 @@ restore_prepare() {
|
|||||||
local opt="--skip-blob"
|
local opt="--skip-blob"
|
||||||
restore_prepare_1033
|
restore_prepare_1033
|
||||||
if [[ $platform == "macos" ]]; then
|
if [[ $platform == "macos" ]]; then
|
||||||
opt="--use-pwndfu"
|
opt=
|
||||||
log "USB reset"
|
|
||||||
"$dir/gaster" reset
|
|
||||||
fi
|
fi
|
||||||
restore_futurerestore $opt
|
restore_futurerestore $opt
|
||||||
elif [[ $device_target_vers == "$device_latest_vers" ]]; then
|
elif [[ $device_target_vers == "$device_latest_vers" ]]; then
|
||||||
@ -2372,7 +2387,7 @@ done
|
|||||||
trap "clean_and_exit" EXIT
|
trap "clean_and_exit" EXIT
|
||||||
trap "clean_and_exit 1" INT TERM
|
trap "clean_and_exit 1" INT TERM
|
||||||
|
|
||||||
rm -rf "$(dirname "$0")/tmp"
|
clean
|
||||||
mkdir "$(dirname "$0")/tmp"
|
mkdir "$(dirname "$0")/tmp"
|
||||||
pushd "$(dirname "$0")/tmp" >/dev/null
|
pushd "$(dirname "$0")/tmp" >/dev/null
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user