From 094a798de5d7f2f3e5a62415ec8ef49e578dd754 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Sat, 20 Aug 2022 12:45:07 +0800 Subject: [PATCH] Fix #205 and other stuff - add note for #204 - fix versioning for git on macOS - display full idevicerestore command before running --- resources/device.sh | 7 ++----- resources/downgrade.sh | 1 + resources/ipsw.sh | 3 +++ restore.sh | 6 +++++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/resources/device.sh b/resources/device.sh index df06b84..e770d62 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -265,12 +265,9 @@ EnterPwnDFU() { fi if [[ $ProductType == "iPhone3,1" ]]; then - if [[ $pwnDFUDevice != 0 ]]; then - Error "Failed to enter pwnDFU mode. Please run the script again" \ + if [[ $pwnD != 1 ]]; then + Error "Failed to enter pwnDFU mode. Please run the script again. Note that kDFU mode will NOT work!" \ "Exit DFU mode first by holding the TOP and HOME buttons for about 15 seconds." - elif [[ $pwnD != 1 ]]; then - Error "Your device is not in pwnDFU mode, cannot proceed. Note that kDFU mode will NOT work!" \ - "Exit DFU mode by holding the TOP and HOME buttons for about 15 seconds." else Log "Device in pwnDFU mode detected." fi diff --git a/resources/downgrade.sh b/resources/downgrade.sh index ee10675..0b6a462 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -139,6 +139,7 @@ iDeviceRestore() { cp $SHSH shsh/${UniqueChipID}-${ProductType}-${OSVer}.shsh Log "Proceeding to idevicerestore..." [[ $1 == "latest" ]] && ExtraArgs="-e" || ExtraArgs="-e -w" + Log "Running idevicerestore with command: $idevicerestore $ExtraArgs \"$IPSWRestore.ipsw\"" $idevicerestore $ExtraArgs "$IPSWRestore.ipsw" echo Log "Restoring done! Read the message below if any error has occurred:" diff --git a/resources/ipsw.sh b/resources/ipsw.sh index 2499fd0..eee5bb5 100755 --- a/resources/ipsw.sh +++ b/resources/ipsw.sh @@ -50,6 +50,9 @@ JailbreakOption() { elif [[ $OSVer == "8.4.1" ]]; then Echo "* Based on some reported issues, Jailbreak Option might not work properly for iOS 8.4.1." Echo "* I recommend to disable the option for these devices and sideload EtasonJB, HomeDepot, or daibutsu manually." + elif [[ $OSVer == "5.1" ]]; then + Echo "* Based on some reported issues, Jailbreak Option might not work properly for iOS 5.1." + Echo "* I recommend to use other versions instead, such as 5.1.1." fi Echo "* This option is enabled by default (Y)." read -p "$(Input 'Enable this option? (Y/n):')" Jailbreak diff --git a/restore.sh b/restore.sh index b888794..ceabee7 100755 --- a/restore.sh +++ b/restore.sh @@ -81,7 +81,11 @@ Main() { fi if [[ -d .git ]]; then - Echo "Version: $(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)-$(git rev-parse HEAD | cut -c -7)" + if [[ $platform == "macos" ]]; then + Echo "Version: $(date -r $(git log -1 --format="%at") +%Y-%m-%d)-$(git rev-parse HEAD | cut -c -7)" + else + Echo "Version: $(date -d @$(git log -1 --format="%at") --rfc-3339=date)-$(git rev-parse HEAD | cut -c -7)" + fi elif [[ -e resources/git_hash ]]; then Echo "Version: $(cat resources/git_hash)" else