From f68978e324c4dcfdb707835722d72af09a95b56c Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:31:18 +0800 Subject: [PATCH] Disable stash on 9.x IPSWs (for #332) --- resources/jailbreak/untetherhomedepot.tar | Bin 327680 -> 327680 bytes resources/jailbreak/untetherhomedepot921.tar | Bin 327680 -> 327680 bytes restore.sh | 44 +++++++++++-------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/resources/jailbreak/untetherhomedepot.tar b/resources/jailbreak/untetherhomedepot.tar index 4300b4b9498f2e7cdb339c2526d9b5476fab39c6..fc237d8d28ee018c381185a71c3b3acc00033e19 100644 GIT binary patch delta 1285 zcmd5+O>0v@6wM?Tk!+gSFKDR^p_XDxoOv_vP106PsF-SPW3*M&*7Ev3tcY5uMO_F% z5f#6pUEGzR2(F7R2J|Pm>JP|TH`1=OJDryoqEgq=#d}=NoO|ZXoZ(g~ZIwz}^+{4v z#wn!{%BW$;NXlGg#Jxwz15*E@ijdgjZ%IpXOBj}>G1;UkvJtym>=N8CB21Xnl9C!C zAPL4-6GEs<3h?WzZDk!;B5n9A3;rS2V+MeFWO^SrJ+WrR$0GP@3N2 z%r;$GFPUq5PQ7w-vVjRI@bzIB$eO+#vbZmW2zwnVybu(WJ3Iulp+uHa=GhLz$|!WS z*q&P#uA>VSPZpqmyHm#hcKWHbW1Sj*I_=x>*IAy{!B?jsv0pBP`EY~!w2`|fSvJhw z%lYB5pf-Na!+>lh8(RV?vAEABU|#z6X~|(5ZHx)+!FwE-(c;E5e2>NN#6P^5%#e5I;bk&& zAmiM2FWd9iuFo&uu$LEKB+ugFW~{4Q4>Uc}f|2xlycw2hHb&AaiT!-LHW~i~kiAZ2 delta 393 zcmXX>yGz1h6!rc*P!v?A6c~a9Ej@pa&m@Qv6U{xuue)RPt<)gb;l~Sbc_2Bw<*(!>`*~l7eU>_C?Vs z?}m}lWG;q0aXEwr_C@f_y-}Dvol$Tvh6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restore.sh @@ -1059,8 +1059,10 @@ device_enter_mode() { print "* If the script is stuck here, reboot and re-jailbreak the device, and try again." print "* Follow the steps in the GitHub wiki under \"A6(X) devices, jailbroken on iOS 10\"" fi + log "Sending files to device: ${sendfiles[*]}" $scp -P 2222 ${sendfiles[@]} root@127.0.0.1:/tmp if [[ $? == 0 ]]; then + log "Running kloader" $ssh -p 2222 root@127.0.0.1 "bash /tmp/kloaders" & else warn "Failed to connect to device via USB SSH." @@ -1087,10 +1089,12 @@ device_enter_mode() { until [[ -n $IPAddress ]]; do read -p "$(input 'Enter the IP Address of your device: ')" IPAddress done + log "Sending files to device: ${sendfiles[*]}" $scp ${sendfiles[@]} root@$IPAddress:/tmp if [[ $? != 0 ]]; then error "Failed to connect to device via SSH, cannot continue." fi + log "Running kloader" $ssh root@$IPAddress "bash /tmp/kloaders" & fi @@ -1806,6 +1810,14 @@ ipsw_prepare_1033() { fi } +ipsw_daibutsu_rebootsh() { + log "Generating reboot.sh" + echo '#!/bin/bash' | tee reboot.sh + echo "mount_hfs /dev/disk0s1s1 /mnt1; mount_hfs /dev/disk0s1s2 /mnt2" | tee -a reboot.sh + echo "nvram -d boot-partition; nvram -d boot-ramdisk" | tee -a reboot.sh + echo "/usr/bin/haxx_overwrite --${device_type}_${device_target_build}" | tee -a reboot.sh +} + ipsw_prepare_jailbreak() { if [[ -e "$ipsw_custom.ipsw" ]]; then log "Found existing Custom IPSW. Skipping IPSW creation." @@ -1817,14 +1829,7 @@ ipsw_prepare_jailbreak() { if [[ $ipsw_jailbreak == 1 ]]; then if [[ $device_target_vers == "8.4.1" ]]; then - log "Generating reboot.sh" - echo '#!/bin/bash' | tee reboot.sh - echo "mount_hfs /dev/disk0s1s1 /mnt1; mount_hfs /dev/disk0s1s2 /mnt2" | tee -a reboot.sh - echo "nvram -d boot-partition; nvram -d boot-ramdisk" | tee -a reboot.sh - echo "/usr/bin/haxx_overwrite --${device_type}_${device_target_build}" | tee -a reboot.sh - if [[ $ipsw_openssh == 1 ]]; then - JBFiles=("$jelbrek/sshdeb.tar") - fi + ipsw_daibutsu_rebootsh JBFiles2=("daibutsu/bin.tar" "daibutsu/untether.tar" "freeze.tar") for i in {0..2}; do cp $jelbrek/${JBFiles2[$i]} . @@ -1851,12 +1856,12 @@ ipsw_prepare_jailbreak() { if [[ $device_target_vers == "5"* ]]; then JBFiles+=("$jelbrek/g1lbertJB.tar") fi - if [[ $ipsw_openssh == 1 ]]; then - JBFiles+=("$jelbrek/sshdeb.tar") - fi cp -R ../resources/firmware/FirmwareBundles . ExtraArgs+="-S 30" # system partition add fi + if [[ $ipsw_openssh == 1 ]]; then + JBFiles+=("$jelbrek/sshdeb.tar") + fi else cp -R ../resources/firmware/FirmwareBundles . fi @@ -2013,7 +2018,11 @@ ipsw_prepare_bundle() { local hw="$device_model" local base_build="11D257" local RootSize + local daibutsu FirmwareBundle="FirmwareBundles/" + if [[ $1 == "daibutsu" ]]; then + daibutsu=1 + fi mkdir FirmwareBundles 2>/dev/null if [[ $1 == "base" ]]; then @@ -2138,7 +2147,8 @@ ipsw_prepare_bundle() { ipsw_prepare_32bit_paths NewiBoot $1 ipsw_prepare_32bit_paths manifest $1 echo -e "" >> $NewPlist - elif [[ $1 == "daibutsu" ]]; then + fi + if [[ $daibutsu == 1 ]]; then echo -e "RamdiskPackage2./bin.tarRamdiskReboot./reboot.shUntetherPath./untether.tar" >> $NewPlist local hwmodel="$(tr '[:lower:]' '[:upper:]' <<< ${device_model:0:1})${device_model:1}" echo -e "hwmodel$hwmodel" >> $NewPlist @@ -2170,11 +2180,7 @@ ipsw_prepare_32bit() { daibutsu="daibutsu" ExtraArgs+=" -daibutsu" cp $jelbrek/daibutsu/bin.tar $jelbrek/daibutsu/untether.tar . - log "Generating reboot.sh" - echo '#!/bin/bash' | tee reboot.sh - echo "mount_hfs /dev/disk0s1s1 /mnt1; mount_hfs /dev/disk0s1s2 /mnt2" | tee -a reboot.sh - echo "nvram -d boot-partition; nvram -d boot-ramdisk" | tee -a reboot.sh - echo "/usr/bin/haxx_overwrite --${device_type}_${device_target_build}" | tee -a reboot.sh + ipsw_daibutsu_rebootsh fi ipsw_prepare_bundle $daibutsu @@ -4334,8 +4340,8 @@ device_dump() { log "Found existing dumped $arg: $dump" print "* Select Y to overwrite, or N to use existing dump" print "* Make sure to keep a backup of the dump if needed" - read -p "$(input 'Overwrite this existing dump? (Y/n) ')" opt - if [[ $opt == 'N' || $opt == 'n' ]]; then + read -p "$(input 'Overwrite this existing dump? (y/N) ')" opt + if [[ $opt != 'Y' && $opt != 'y' ]]; then return fi log "Deleting existing dumped $arg"