mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-23 16:39:17 +01:00
parent
450d4348ea
commit
80dd9f5b9d
35
restore.sh
35
restore.sh
@ -3116,6 +3116,7 @@ device_ramdisk() {
|
|||||||
local decrypt
|
local decrypt
|
||||||
local ramdisk_path
|
local ramdisk_path
|
||||||
local build_id
|
local build_id
|
||||||
|
local reboot_bak="reboot_bak"
|
||||||
|
|
||||||
if [[ $1 != "justboot" ]]; then
|
if [[ $1 != "justboot" ]]; then
|
||||||
comps+=("RestoreRamdisk")
|
comps+=("RestoreRamdisk")
|
||||||
@ -3132,6 +3133,9 @@ device_ramdisk() {
|
|||||||
device_target_build=$device_ramdisk_build
|
device_target_build=$device_ramdisk_build
|
||||||
fi
|
fi
|
||||||
build_id=$device_target_build
|
build_id=$device_target_build
|
||||||
|
if [[ $build_id == "11"* ]]; then
|
||||||
|
reboot_bak="reboot"
|
||||||
|
fi
|
||||||
ramdisk_path="../saved/$device_type/ramdisk_$build_id"
|
ramdisk_path="../saved/$device_type/ramdisk_$build_id"
|
||||||
device_fw_key_check
|
device_fw_key_check
|
||||||
url=$(cat "$device_fw_dir/$build_id/url" 2>/dev/null)
|
url=$(cat "$device_fw_dir/$build_id/url" 2>/dev/null)
|
||||||
@ -3226,6 +3230,9 @@ device_ramdisk() {
|
|||||||
else
|
else
|
||||||
if [[ $1 != "justboot" ]]; then
|
if [[ $1 != "justboot" ]]; then
|
||||||
"$dir/hfsplus" Ramdisk.raw untar ../resources/ssh.tar
|
"$dir/hfsplus" Ramdisk.raw untar ../resources/ssh.tar
|
||||||
|
if [[ $1 == "jailbreak" && $device_vers == "8"* ]]; then
|
||||||
|
"$dir/hfsplus" Ramdisk.raw untar ../resources/jailbreak/daibutsu/bin.tar
|
||||||
|
fi
|
||||||
"$dir/xpwntool" Ramdisk.raw Ramdisk.dmg -t RestoreRamdisk.dec
|
"$dir/xpwntool" Ramdisk.raw Ramdisk.dmg -t RestoreRamdisk.dec
|
||||||
fi
|
fi
|
||||||
log "Patch iBSS"
|
log "Patch iBSS"
|
||||||
@ -3347,7 +3354,7 @@ device_ramdisk() {
|
|||||||
cp activation.tar $dump
|
cp activation.tar $dump
|
||||||
fi
|
fi
|
||||||
'
|
'
|
||||||
$ssh -p 2222 root@127.0.0.1 "rm -f /mnt1/baseband.tar /mnt1/activation.tar; nvram auto-boot=0; reboot_bak"
|
$ssh -p 2222 root@127.0.0.1 "rm -f /mnt1/baseband.tar /mnt1/activation.tar; nvram auto-boot=0; $reboot_bak"
|
||||||
log "Done, device should boot to recovery mode now"
|
log "Done, device should boot to recovery mode now"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
@ -3373,11 +3380,11 @@ device_ramdisk() {
|
|||||||
fi
|
fi
|
||||||
if [[ $1 == "getversion" && -n $vers ]]; then
|
if [[ $1 == "getversion" && -n $vers ]]; then
|
||||||
log "The current iOS version of this device is: $vers ($build)"
|
log "The current iOS version of this device is: $vers ($build)"
|
||||||
$ssh -p 2222 root@127.0.0.1 "reboot_bak"
|
$ssh -p 2222 root@127.0.0.1 "$reboot_bak"
|
||||||
return
|
return
|
||||||
elif [[ $device_type == "iPad2"* && $vers == "4"* ]]; then
|
elif [[ $device_type == "iPad2"* && $vers == "4"* ]]; then
|
||||||
warn "iOS $vers on $device_type is not supported for jailbreaking with SSHRD."
|
warn "iOS $vers on $device_type is not supported for jailbreaking with SSHRD."
|
||||||
$ssh -p 2222 root@127.0.0.1 "reboot_bak"
|
$ssh -p 2222 root@127.0.0.1 "$reboot_bak"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
case $vers in
|
case $vers in
|
||||||
@ -3394,12 +3401,12 @@ device_ramdisk() {
|
|||||||
'' )
|
'' )
|
||||||
warn "Something wrong happened. Failed to get iOS version."
|
warn "Something wrong happened. Failed to get iOS version."
|
||||||
print "* Please reboot the device into normal operating mode, then perform a clean \"slide to power off\", then try again."
|
print "* Please reboot the device into normal operating mode, then perform a clean \"slide to power off\", then try again."
|
||||||
$ssh -p 2222 root@127.0.0.1 "reboot_bak"
|
$ssh -p 2222 root@127.0.0.1 "$reboot_bak"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
warn "iOS $vers is not supported for jailbreaking with SSHRD."
|
warn "iOS $vers is not supported for jailbreaking with SSHRD."
|
||||||
$ssh -p 2222 root@127.0.0.1 "reboot_bak"
|
$ssh -p 2222 root@127.0.0.1 "$reboot_bak"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -3455,21 +3462,17 @@ device_ramdisk() {
|
|||||||
sleep 3
|
sleep 3
|
||||||
if [[ $vers == "8"* ]]; then
|
if [[ $vers == "8"* ]]; then
|
||||||
log "Sending daibutsu/move.sh"
|
log "Sending daibutsu/move.sh"
|
||||||
$scp -P 2222 $jelbrek/daibutsu/move.sh root@127.0.0.1:/
|
$scp -P 2222 $jelbrek/daibutsu/move.sh root@127.0.0.1:/mnt1
|
||||||
log "Moving files"
|
log "Moving files"
|
||||||
$ssh -p 2222 root@127.0.0.1 "bash /move.sh"
|
$ssh -p 2222 root@127.0.0.1 "bash /mnt1/move.sh; rm /mnt1/move.sh"
|
||||||
untether="untether.tar"
|
untether="untether.tar"
|
||||||
log "Extracting $untether"
|
log "Extracting $untether"
|
||||||
$ssh -p 2222 root@127.0.0.1 "tar -xvf /mnt1/$untether -C /mnt1; rm /mnt1/$untether"
|
$ssh -p 2222 root@127.0.0.1 "tar -xvf /mnt1/$untether -C /mnt1; rm /mnt1/$untether"
|
||||||
log "Sending daibutsu/bin.tar"
|
log "Running haxx_overwrite --${device_type}_${build}"
|
||||||
$scp -P 2222 $jelbrek/daibutsu/bin.tar root@127.0.0.1:/mnt1
|
$ssh -p 2222 root@127.0.0.1 "/usr/bin/haxx_overwrite --${device_type}_${build}"
|
||||||
log "Extracting bin.tar"
|
|
||||||
$ssh -p 2222 root@127.0.0.1 "tar -xvf /mnt1/bin.tar -C /; rm /mnt1/bin.tar"
|
|
||||||
log "Running haxx_overwrite"
|
|
||||||
$ssh -p 2222 root@127.0.0.1 "/usr/bin/haxx_overwrite --${device_type}_${device_target_build}"
|
|
||||||
else
|
else
|
||||||
log "Rebooting"
|
log "Rebooting"
|
||||||
$ssh -p 2222 root@127.0.0.1 "reboot_bak"
|
$ssh -p 2222 root@127.0.0.1 "$reboot_bak"
|
||||||
fi
|
fi
|
||||||
log "Cool, done and jailbroken (hopefully)"
|
log "Cool, done and jailbroken (hopefully)"
|
||||||
case $vers in
|
case $vers in
|
||||||
@ -3480,7 +3483,7 @@ device_ramdisk() {
|
|||||||
|
|
||||||
"nvram" )
|
"nvram" )
|
||||||
log "Sending commands for clearing NVRAM..."
|
log "Sending commands for clearing NVRAM..."
|
||||||
$ssh -p 2222 root@127.0.0.1 "nvram -c; reboot_bak"
|
$ssh -p 2222 root@127.0.0.1 "nvram -c; $reboot_bak"
|
||||||
log "Done! Your device should reboot now."
|
log "Done! Your device should reboot now."
|
||||||
print "* If the device did not connect, SSH to the device manually."
|
print "* If the device did not connect, SSH to the device manually."
|
||||||
;;
|
;;
|
||||||
@ -3501,7 +3504,7 @@ device_ramdisk() {
|
|||||||
print "* Erase All Content and Settings with this command (iOS 9+ only):"
|
print "* Erase All Content and Settings with this command (iOS 9+ only):"
|
||||||
print " nvram oblit-inprogress=5"
|
print " nvram oblit-inprogress=5"
|
||||||
print "* To reboot, use this command:"
|
print "* To reboot, use this command:"
|
||||||
print " reboot_bak"
|
print " $reboot_bak"
|
||||||
}
|
}
|
||||||
|
|
||||||
shsh_save_onboard() {
|
shsh_save_onboard() {
|
||||||
|
Loading…
Reference in New Issue
Block a user