Skip to content

Commit d5a518a

Browse files
committed
everuntether and other changes
1 parent 1195a28 commit d5a518a

File tree

6 files changed

+52
-40
lines changed

6 files changed

+52
-40
lines changed
260 KB
Binary file not shown.
200 KB
Binary file not shown.

resources/jailbreak/launchctl.tar

340 KB
Binary file not shown.
-590 KB
Binary file not shown.
-590 KB
Binary file not shown.

restore.sh

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ install_depends() {
446446
sudo add-apt-repository -y universe
447447
fi
448448
sudo apt update
449-
sudo apt install -m -y build-essential ca-certificates curl git ifuse libimobiledevice6 libssl3 libssl-dev libxml2 libzstd1 openssh-client patch python3 unzip usbmuxd usbutils xxd zenity zip zlib1g-dev
449+
sudo apt install -m -y build-essential ca-certificates curl git ifuse libssl3 libssl-dev libxml2 libzstd1 openssh-client patch python3 unzip usbmuxd usbutils xxd zenity zip zlib1g-dev
450450
if [[ $(command -v systemctl 2>/dev/null) ]]; then
451451
sudo systemctl enable --now udev systemd-udevd usbmuxd 2>/dev/null
452452
fi
@@ -1075,6 +1075,9 @@ device_get_info() {
10751075
n112 ) device_type="iPod9,1";;
10761076
esac
10771077
fi
1078+
case $device_type in
1079+
iPhone3,[13] | iPhone[45]* | iPad1,1 | iPad2,4 | iPod[35],1 ) device_canpowder=1;;
1080+
esac
10781081

10791082
device_fw_dir="../resources/firmware/$device_type"
10801083
if [[ -s $device_fw_dir/hwmodel ]]; then
@@ -1524,7 +1527,7 @@ device_enter_mode() {
15241527
"Recovery" )
15251528
if [[ $device_mode == "Normal" ]]; then
15261529
if [[ $mode != "enterrecovery" ]]; then
1527-
print "* The device needs to be in recovery/DFU mode before proceeding."
1530+
print "* The device needs to be in Recovery/DFU mode before proceeding."
15281531
read -p "$(input 'Send device to recovery mode? (Y/n): ')" opt
15291532
if [[ $opt == 'n' || $opt == 'N' ]]; then
15301533
log "User selected N, cannot continue. Exiting."
@@ -2301,7 +2304,7 @@ ipsw_preference_set() {
23012304
# for some reason though, it does it correctly on 4.x for 3gs and touch 2, so its enabled for those.
23022305
# it also does it correctly on 3.1.3-4.x for s5l8900 devices, so its also enabled there.
23032306
case $device_target_vers in
2304-
9.3.[4321] | 9.3 | 9.[21]* | [8765]* | 4.[32]* ) ipsw_canjailbreak=1;;
2307+
9.3.[4321] | 9.3 | 9.[210]* | [8765]* | 4.[32]* ) ipsw_canjailbreak=1;;
23052308
3.1.3 )
23062309
case $device_proc in
23072310
1 ) ipsw_canjailbreak=1;;
@@ -2310,11 +2313,7 @@ ipsw_preference_set() {
23102313
;;
23112314
esac
23122315

2313-
if [[ $device_proc == 5 ]]; then
2314-
case $device_target_vers in
2315-
8.[210]* ) ipsw_canjailbreak=;;
2316-
esac
2317-
elif [[ $device_type == "iPhone1,2" || $device_type == "iPhone2,1" || $device_type == "iPod2,1" ]]; then
2316+
if [[ $device_type == "iPhone1,2" || $device_type == "iPhone2,1" || $device_type == "iPod2,1" ]]; then
23182317
case $device_target_vers in
23192318
4* ) ipsw_canjailbreak=1;;
23202319
3.1.3 ) :;;
@@ -3496,13 +3495,22 @@ ipsw_prepare_32bit() {
34963495
local ExtraArgs
34973496
local daibutsu
34983497
local JBFiles=()
3498+
# use everuntether instead of daibutsu+dsc haxx for a5(x) 8.0-8.2
3499+
if [[ $device_proc == 5 && $ipsw_jailbreak == 1 ]]; then
3500+
case $device_target_vers in
3501+
8.[012]* )
3502+
ipsw_everuntether=1
3503+
JBFiles+=("everuntether.tar")
3504+
;;
3505+
esac
3506+
fi
34993507
if [[ $device_target_vers == "3"* || $device_target_vers == "4"* ]] && [[ $ipsw_nskip != 1 ]]; then
35003508
ipsw_prepare_jailbreak
35013509
return
35023510
elif [[ -e "$ipsw_custom.ipsw" ]]; then
35033511
log "Found existing Custom IPSW. Skipping IPSW creation."
35043512
return
3505-
elif [[ $ipsw_jailbreak == 1 && $device_target_vers == "8"* ]]; then
3513+
elif [[ $ipsw_jailbreak == 1 && $device_target_vers == "8"* && $ipsw_everuntether != 1 ]]; then
35063514
daibutsu="daibutsu"
35073515
ExtraArgs+=" -daibutsu"
35083516
cp $jelbrek/daibutsu/bin.tar $jelbrek/daibutsu/untether.tar .
@@ -3537,6 +3545,7 @@ ipsw_prepare_32bit() {
35373545
case $device_target_vers in
35383546
9.3.[1234] | 9.3 ) JBFiles+=("untetherhomedepot.tar");;
35393547
9.2* | 9.1 ) JBFiles+=("untetherhomedepot921.tar");;
3548+
9.0* ) JBFiles+=("everuntether.tar");;
35403549
7.1* )
35413550
case $device_type in
35423551
iPod* ) JBFiles+=("panguaxe-ipod.tar");;
@@ -3552,7 +3561,7 @@ ipsw_prepare_32bit() {
35523561
JBFiles[0]=$jelbrek/${JBFiles[0]}
35533562
fi
35543563
case $device_target_vers in
3555-
9* | 8* ) JBFiles+=("$jelbrek/fstab8.tar");;
3564+
[98]* ) JBFiles+=("$jelbrek/fstab8.tar");;
35563565
7* ) JBFiles+=("$jelbrek/fstab7.tar");;
35573566
4* ) JBFiles+=("$jelbrek/fstab_old.tar");;
35583567
* ) JBFiles+=("$jelbrek/fstab_rw.tar");;
@@ -3572,7 +3581,9 @@ ipsw_prepare_32bit() {
35723581
;;
35733582
esac
35743583
JBFiles+=("$jelbrek/freeze.tar")
3575-
if [[ $device_target_vers == "5"* ]]; then
3584+
if [[ $device_target_vers == "9"* || $ipsw_everuntether == 1 ]]; then
3585+
JBFiles+=("$jelbrek/daemonloader.tar" "$jelbrek/launchctl.tar")
3586+
elif [[ $device_target_vers == "5"* ]]; then
35763587
JBFiles+=("$jelbrek/cydiasubstrate.tar" "$jelbrek/g1lbertJB.tar")
35773588
fi
35783589
if [[ $ipsw_openssh == 1 ]]; then
@@ -4173,7 +4184,7 @@ ipsw_prepare_multipatch() {
41734184
"$dir/hfsplus" RestoreRamdisk.dec chmod 755 sbin/reboot
41744185
"$dir/hfsplus" RestoreRamdisk.dec chown 0:0 sbin/reboot
41754186
"$dir/hfsplus" RestoreRamdisk.dec add $exploit exploit
4176-
elif [[ $ipsw_jailbreak == 1 && $device_target_vers == "8"* ]]; then
4187+
elif [[ $ipsw_jailbreak == 1 && $device_target_vers == "8"* && $ipsw_everuntether != 1 ]]; then
41774188
# daibutsu haxx overwrite
41784189
"$dir/hfsplus" RestoreRamdisk.dec untar bin.tar
41794190
"$dir/hfsplus" RestoreRamdisk.dec mv sbin/reboot sbin/reboot_
@@ -5968,6 +5979,7 @@ device_ramdisk() {
59685979
case $vers in
59695980
9.3.[4231] | 9.3 ) untether="untetherhomedepot.tar";;
59705981
9.2* | 9.1 ) untether="untetherhomedepot921.tar";;
5982+
9.0* ) untether="everuntether.tar";;
59715983
8* ) untether="daibutsu/untether.tar";;
59725984
7.1* )
59735985
case $device_type in
@@ -5992,6 +6004,15 @@ device_ramdisk() {
59926004
return
59936005
;;
59946006
esac
6007+
# use everuntether instead of daibutsu+dsc haxx for a5(x) 8.0-8.2
6008+
if [[ $device_proc == 5 ]]; then
6009+
case $vers in
6010+
8.[012]* )
6011+
ipsw_everuntether=1
6012+
untether="everuntether.tar"
6013+
;;
6014+
esac
6015+
fi
59956016
log "Nice, iOS $vers is compatible."
59966017
log "Sending $untether"
59976018
$scp -P $ssh_port $jelbrek/$untether root@127.0.0.1:/mnt1
@@ -6012,7 +6033,7 @@ device_ramdisk() {
60126033
log "Mounting data partition"
60136034
$ssh -p $ssh_port root@127.0.0.1 "mount.sh pv"
60146035
case $vers in
6015-
9* | 8* ) device_send_rdtar fstab8.tar;;
6036+
[98]* ) device_send_rdtar fstab8.tar;;
60166037
7* ) device_send_rdtar fstab7.tar;;
60176038
6* ) device_send_rdtar fstab_rw.tar;;
60186039
4.2.[8761] ) $ssh -p $ssh_port root@127.0.0.1 "[[ ! -e /mnt1/sbin/punchd ]] && mv /mnt1/sbin/launchd /mnt1/sbin/punchd";;
@@ -6053,7 +6074,11 @@ device_ramdisk() {
60536074
if [[ $ipsw_openssh == 1 ]]; then
60546075
device_send_rdtar sshdeb.tar
60556076
fi
6056-
if [[ $vers == "8"* ]]; then
6077+
if [[ $vers == "9"* || $ipsw_everuntether == 1 ]]; then
6078+
device_send_rdtar daemonloader.tar
6079+
device_send_rdtar launchctl.tar
6080+
fi
6081+
if [[ $vers == "8"* && $ipsw_everuntether != 1 ]]; then
60576082
log "Sending daibutsu/move.sh"
60586083
$scp -P $ssh_port $jelbrek/daibutsu/move.sh root@127.0.0.1:/mnt1
60596084
log "Moving files"
@@ -6208,9 +6233,9 @@ menu_ramdisk() {
62086233
if (( device_proc >= 5 )); then
62096234
menu_items+=("Erase All (iOS 9+)")
62106235
fi
6211-
case $device_type in
6212-
iPhone3,[13] | iPhone[45]* | iPad1,1 | iPad2,4 | iPod[35],1 ) menu_items+=("Disable/Enable Exploit");;
6213-
esac
6236+
if [[ $device_canpowder == 1 ]]; then
6237+
menu_items+=("Disable/Enable Exploit")
6238+
fi
62146239
menu_items+=("Clear NVRAM" "Get iOS Version" "Update DateTime" "Reboot Device" "Exit")
62156240

62166241
print "* For accessing data, note the following:"
@@ -8593,33 +8618,12 @@ device_jailbreak_confirm() {
85938618
print "* For more details, go to: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Jailbreaking"
85948619
echo
85958620
case $device_vers in
8596-
8.2 | 8.[10]* )
8597-
if [[ $device_proc == 5 ]]; then
8598-
warn "This version ($device_vers) is broken for daibutsu A5(X)."
8599-
print "* Supported iOS 8 versions for A5(X) are 8.3 to 8.4.1 only."
8600-
print "* For this version, use EverPwnage and sideload it to your device."
8601-
print "* https://github.com/LukeZGD/EverPwnage"
8602-
pause
8603-
return
8604-
else
8605-
print "* For this version, you can also use EverPwnage and sideload it to your device."
8606-
print "* https://github.com/LukeZGD/EverPwnage"
8607-
print "* You may still continue if you really want to do the ramdisk method instead."
8608-
pause
8609-
fi
8610-
;;
8611-
8* )
8621+
8* | 9.0* )
86128622
print "* For this version, you can also use EverPwnage and sideload it to your device."
86138623
print "* https://github.com/LukeZGD/EverPwnage"
86148624
print "* You may still continue if you really want to do the ramdisk method instead."
86158625
pause
86168626
;;
8617-
9.0* )
8618-
print "* For this version, use EverPwnage and sideload it to your device."
8619-
print "* https://github.com/LukeZGD/EverPwnage"
8620-
pause
8621-
return
8622-
;;
86238627
9.3.[56] )
86248628
print "* For this version, download kok3shi9 and sideload it to your device."
86258629
print "* https://kok3shidoll.web.app/kok3shi9_32.html"
@@ -9597,7 +9601,15 @@ main() {
95979601
"save-onboard-dump" ) shsh_save_onboard dump;;
95989602
"save-cydia-blobs" ) shsh_save_cydia;;
95999603
"enterrecovery" ) device_enter_mode Recovery;;
9600-
"exitrecovery" ) log "Attempting to exit Recovery mode."; $irecovery -n;;
9604+
"exitrecovery" )
9605+
log "Attempting to exit Recovery mode."
9606+
$irecovery -n
9607+
print "* Note: For tether downgrades, you need to boot your device using the Just Boot option. Exiting recovery mode will not work."
9608+
if [[ $device_canpowder == 1 ]]; then
9609+
print "* Note 2: If your device is stuck in recovery mode, it may have been restored with powdersn0w before."
9610+
print " - If so, try to clear the device's NVRAM: go to Other Utilities -> Clear NVRAM"
9611+
fi
9612+
;;
96019613
"enterdfu" ) device_enter_mode DFU;;
96029614
"dfuipsw" ) restore_dfuipsw;;
96039615
"dfuipswipsw" ) restore_dfuipsw ipsw;;

0 commit comments

Comments
 (0)