From f4df104b8ac35769f13c81721f165a6f2b8ecda5 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Sun, 18 Sep 2022 16:16:36 +0800 Subject: [PATCH] An update --- resources/device.sh | 22 +++++++++++++--------- resources/ipsw.sh | 7 ++++++- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/resources/device.sh b/resources/device.sh index ee73882..4043466 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -83,7 +83,14 @@ GetDeviceValues() { UniqueChipID= fi - if [[ ! $DeviceState ]]; then + if [[ -n $DeviceState ]]; then + if [[ ! $ProductType ]]; then + read -p "$(Input 'Enter ProductType (eg. iPad2,1):')" ProductType + fi + if [[ ! $UniqueChipID || $UniqueChipID == 0 ]]; then + read -p "$(Input 'Enter UniqueChipID (ECID, must be decimal):')" UniqueChipID + fi + else echo -e "\n${Color_R}[Error] No device detected. Please put the device in normal mode before proceeding. ${Color_N}" echo "${Color_Y}* Make sure to also trust this computer by selecting \"Trust\" at the pop-up. ${Color_N}" echo "${Color_Y}* For Windows/macOS users, double-check if the device is being detected by iTunes/Finder. ${Color_N}" @@ -91,13 +98,6 @@ GetDeviceValues() { echo "${Color_Y}* To perform operations without an iOS device connected, add NoDevice as an argument. ${Color_N}" echo "${Color_Y}* For more details, read the \"Troubleshooting\" wiki page in GitHub ${Color_N}" ExitWin 1 - elif [[ -n $DeviceState ]]; then - if [[ ! $ProductType ]]; then - read -p "$(Input 'Enter ProductType (eg. iPad2,1):')" ProductType - fi - if [[ ! $UniqueChipID || $UniqueChipID == 0 ]]; then - read -p "$(Input 'Enter UniqueChipID (ECID, must be decimal):')" UniqueChipID - fi fi Firmware=resources/firmware/$ProductType @@ -542,9 +542,13 @@ Ramdisk4() { Echo "* Then SSH to 127.0.0.1:2022" Echo " ssh -p 2022 -oHostKeyAlgorithms=+ssh-rsa root@127.0.0.1" Echo "* Enter root password: alpine" - Echo "* Mount filesystems with these commands:" + Echo "* Mount filesystems with these commands (iOS 5+):" Echo " mount_hfs /dev/disk0s1s1 /mnt1" Echo " mount_hfs /dev/disk0s1s2 /mnt1/private/var" + Echo "* If your device is on iOS 4, use these commands instead:" + Echo " fsck_hfs /dev/disk0s1" + Echo " mount_hfs /dev/disk0s1 /mnt1" + Echo " mount_hfs /dev/disk0s2s1 /mnt/private/var" Echo "* To reboot, use this command:" Echo " reboot_bak" } diff --git a/resources/ipsw.sh b/resources/ipsw.sh index 70dad76..97c95b0 100755 --- a/resources/ipsw.sh +++ b/resources/ipsw.sh @@ -192,6 +192,7 @@ IPSW32() { echo "mount_hfs /dev/disk0s1s1 /mnt1; mount_hfs /dev/disk0s1s2 /mnt2" >> tmp/reboot.sh echo "nvram -d boot-partition; nvram -d boot-ramdisk" >> tmp/reboot.sh echo "/usr/bin/haxx_overwrite -$HWModel" >> tmp/reboot.sh + # uncomment the 2 lines below to add openssh to daibutsu cfw #JBFiles=("../resources/jailbreak/sshdeb.tar") # uncomment to add openssh to custom ipsw #JailbreakFiles $JBURL/sshdeb.tar sshdeb.tar 0bffece0f8fd939c479159b57e923dd8c06191d3 # uncomment to add openssh to custom ipsw JBFiles2=("bin.tar" "cydia.tar" "untether.tar") @@ -199,7 +200,8 @@ IPSW32() { mkdir -p tmp/jailbreak for i in {0..2}; do JBURL="https://github.com/LukeZGD/daibutsuCFW/raw/main/build/src/" - (( i > 0 )) && JBURL+="daibutsu/${JBFiles2[$i]}" || JBURL+="${JBFiles2[$i]}" + (( i > 0 )) && JBURL+="daibutsu/" + JBURL+="${JBFiles2[$i]}" JailbreakFiles $JBURL ${JBFiles2[$i]} ${JBSHA1[$i]} cp resources/jailbreak/${JBFiles2[$i]} tmp/jailbreak/ done @@ -217,6 +219,9 @@ IPSW32() { for i in {0..2}; do JBFiles[$i]=../resources/jailbreak/${JBFiles[$i]} done + # adding sshdeb works for 6.1.3 only from what i've tested, doesn't seem to work on etasonjb ipsws + #JBFiles+=("../resources/jailbreak/sshdeb.tar") # uncomment to add openssh to custom ipsw + #JailbreakFiles $JBURL/sshdeb.tar sshdeb.tar 0bffece0f8fd939c479159b57e923dd8c06191d3 # uncomment to add openssh to custom ipsw fi [[ $ProductType == "$DisableBBUpdate" ]] && BBUpdate= [[ $platform == "win" ]] && WinBundles="windows/"