Update some stuff

- update readme
- remove latest ios version check, just disable bbupdate for ipad2,3
- if jailbreak option is disabled, do not set custom ipsw
- change where iphone3,1 buildmanifest is saved
- remove pwndfu option for iphone4down
- download ipwndfu on linux only
This commit is contained in:
LukeZGD 2022-06-08 23:04:56 +08:00
parent fc105905f7
commit cb049d4a01
6 changed files with 32 additions and 60 deletions

View File

@ -77,29 +77,23 @@
## Tools and other stuff used ## Tools and other stuff used
- cURL - cURL
- bspatch - bspatch
- python2 (ipwndfu, rmsigchks, SimpleHTTPServer), python3 (http.server)
- [ch3rryflower](https://web.archive.org/web/20200708040313/https://github.com/dora2-iOS/ch3rryflower) - dora2ios - [ch3rryflower](https://web.archive.org/web/20200708040313/https://github.com/dora2-iOS/ch3rryflower) - dora2ios
- [ipwndfu](https://github.com/LukeZGD/ipwndfu) - LukeZGD fork - [ipwndfu](https://github.com/LukeZGD/ipwndfu) - LukeZGD fork
- [iPwnder32](https://github.com/dora2-iOS/iPwnder32) - dora2ios - [iPwnder32](https://github.com/dora2-iOS/iPwnder32) - dora2ios
- [ipwnder_lite](https://github.com/dora2-iOS/ipwnder_lite) - dora2ios - [ipwnder_lite](https://github.com/dora2-iOS/ipwnder_lite) - dora2ios
- [daibutsuCFW](https://github.com/dora2-iOS/daibutsuCFW) - dora2ios - [daibutsuCFW](https://github.com/dora2-iOS/daibutsuCFW) - dora2ios ([LukeZGD fork](https://github.com/LukeZGD/daibutsuCFW))
- [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice) - libimobiledevice - [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice), [libirecovery](https://github.com/libimobiledevice/libirecovery) - libimobiledevice ([macOS/Windows builds](https://github.com/libimobiledevice-win32/imobiledevice-net))
- [libirecovery](https://github.com/libimobiledevice/libirecovery) - libimobiledevice - [tsschecker](https://github.com/tihmstar/tsschecker) - tihmstar ([1Conan fork](https://github.com/1Conan/tsschecker))
- [imobiledevice-net](https://github.com/libimobiledevice-win32/imobiledevice-net) - libimobiledevice-win32 (macOS/Windows builds) - [futurerestore](https://github.com/futurerestore/futurerestore) - futurerestore beta (194 used for Windows only)
- ipsw tool from [xpwn](https://github.com/LukeZGD/xpwn) - LukeZGD fork
- Python 2 (for ipwndfu, rmsigchks, SimpleHTTPServer)
- Python 3 (http.server)
- [tsschecker](https://github.com/tihmstar/tsschecker) - tihmstar
- [tsschecker](https://github.com/1Conan/tsschecker) - 1Conan fork
- [futurerestore](https://github.com/futurerestore/futurerestore) - futurerestore 194 and beta
- [idevicerestore](https://github.com/LukeeGD/idevicerestore) - LukeZGD fork - [idevicerestore](https://github.com/LukeeGD/idevicerestore) - LukeZGD fork
- [kloader](https://www.youtube.com/watch?v=fh0tB6fp0Sc) - [kloader](https://www.youtube.com/watch?v=fh0tB6fp0Sc)
- [kloader5 for iOS 5](https://www.pmbonneau.com/cydia/com.pmbonneau.kloader5_1.2_iphoneos-arm.deb) - [kloader5 for iOS 5](https://www.pmbonneau.com/cydia/com.pmbonneau.kloader5_1.2_iphoneos-arm.deb)
- [kloader_hgsp for iOS 10](https://twitter.com/nyan_satan/status/945203180522045440) - [kloader_hgsp for iOS 10](https://twitter.com/nyan_satan/status/945203180522045440)
- [partial-zip](https://github.com/matteyeux/partial-zip) - [partial-zip](https://github.com/matteyeux/partial-zip)
- [zenity](https://github.com/GNOME/zenity) - [zenity](https://github.com/GNOME/zenity) ([macOS/Windows builds](https://github.com/ncruces/zenity))
- [zenity](https://github.com/ncruces/zenity) (macOS/Windows builds) - 32-bit bundles from [OdysseusOTA](https://www.youtube.com/watch?v=Wo7mGdMcjxw), [OdysseusOTA2](https://www.youtube.com/watch?v=fh0tB6fp0Sc), [alitek12](https://www.mediafire.com/folder/b1z64roy512wd/FirmwareBundles), [gjest](https://www.reddit.com/r/jailbreak/comments/6yrzzj/release_firmware_bundles_for_ios_841_ipad21234567/) (modified bundles for daibutsuCFW)
- 32-bit bundles from [OdysseusOTA](https://www.youtube.com/watch?v=Wo7mGdMcjxw), [OdysseusOTA2](https://www.youtube.com/watch?v=fh0tB6fp0Sc), [alitek12](https://www.mediafire.com/folder/b1z64roy512wd/FirmwareBundles), [gjest](https://www.reddit.com/r/jailbreak/comments/6yrzzj/release_firmware_bundles_for_ios_841_ipad21234567/) - A7 patches from [MatthewPierson](https://github.com/MatthewPierson/iPhone-5s-OTA-Downgrade-Patches) (patches used for Windows only)
- A7 patches from [MatthewPierson](https://github.com/MatthewPierson/iPhone-5s-OTA-Downgrade-Patches)
- [EtasonJB](https://www.theiphonewiki.com/wiki/EtasonJB) - [EtasonJB](https://www.theiphonewiki.com/wiki/EtasonJB)
- [evasi0n](https://www.theiphonewiki.com/wiki/Evasi0n) - [evasi0n](https://www.theiphonewiki.com/wiki/Evasi0n)
- [evasi0n7](https://www.theiphonewiki.com/wiki/Evasi0n7) - [evasi0n7](https://www.theiphonewiki.com/wiki/Evasi0n7)

View File

@ -8,32 +8,6 @@ SaveOTABlobs() {
local SHSHLatest local SHSHLatest
local SHSHExisting local SHSHExisting
if [[ $DeviceProc != 7 && $Baseband != 0 && $platform != "win" ]]; then
if [[ ! -e saved/$ProductType/BuildManifest.plist ]]; then
Log "Downloading BuildManifest of iOS $LatestVer..."
$partialzip $BasebandURL BuildManifest.plist BuildManifest.plist
mkdir -p saved/$ProductType 2>/dev/null
mv BuildManifest.plist saved/$ProductType
fi
if [[ ! -e saved/$ProductType/BuildManifest.plist ]]; then
Error "Downloading/verifying BuildManifest failed. Please run the script again"
fi
Log "Checking signing status of iOS $LatestVer..."
SHSHChk=*_${ProductType}_${HWModel}ap_${LatestVer}*.shsh*
$tsschecker -d $ProductType -i $LatestVer -e $UniqueChipID -m saved/$ProductType/BuildManifest.plist -s -B ${HWModel}ap
SHSHLatest=$(ls $SHSHChk 2>/dev/null)
if [[ -e $SHSHLatest ]]; then
Log "Latest version for $ProductType (iOS $LatestVer) is signed."
else
Log "For some reason, the latest version for your device (iOS $LatestVer) is not signed."
Log "Disabling baseband update for the custom IPSW."
BBUpdate=0
[[ $Jailbreak != 1 ]] && IPSWCustom+="N"
IPSWCustom+="B"
fi
rm $SHSHLatest 2>/dev/null
fi
Log "Saving iOS $OSVer blobs with tsschecker..." Log "Saving iOS $OSVer blobs with tsschecker..."
BuildManifest="resources/manifests/BuildManifest_${ProductType}_${OSVer}.plist" BuildManifest="resources/manifests/BuildManifest_${ProductType}_${OSVer}.plist"
ExtraArgs="-d $ProductType -i $OSVer -e $UniqueChipID -m $BuildManifest -o -s -B ${HWModel}ap -b " ExtraArgs="-d $ProductType -i $OSVer -e $UniqueChipID -m $BuildManifest -o -s -B ${HWModel}ap -b "
@ -63,14 +37,14 @@ SaveOTABlobs() {
Save712Blobs() { Save712Blobs() {
local SHSHChk local SHSHChk
SHSH7="${UniqueChipID}-${ProductType}-7.1.2.shsh" BuildManifest="saved/iPhone3,1/BuildManifest.plist"
SHSH="saved/shsh/$SHSH7" SHSH="saved/shsh/${UniqueChipID}-${ProductType}-7.1.2.shsh"
BuildManifest="BuildManifest_${ProductType}_7.1.2.plist"
if [[ ! -e resources/manifests/$BuildManifest ]]; then if [[ ! -e $BuildManifest ]]; then
Log "Extracting BuildManifest from 7.1.2 IPSW..." Log "Extracting BuildManifest from 7.1.2 IPSW..."
unzip -o -j $IPSW7.ipsw BuildManifest.plist -d . unzip -o -j $IPSW7.ipsw BuildManifest.plist -d .
mv BuildManifest.plist resources/manifests/$BuildManifest mkdir -p saved/iPhone3,1 2>/dev/null
mv BuildManifest.plist $BuildManifest
fi fi
if [[ -e $SHSH ]]; then if [[ -e $SHSH ]]; then
@ -78,7 +52,7 @@ Save712Blobs() {
return return
fi fi
Log "Saving 7.1.2 blobs with tsschecker..." Log "Saving 7.1.2 blobs with tsschecker..."
$tsschecker -d $ProductType -i 7.1.2 -e $UniqueChipID -m resources/manifests/BuildManifest_${ProductType}_7.1.2.plist -s -b $tsschecker -d $ProductType -i 7.1.2 -e $UniqueChipID -m $BuildManifest -s -b
SHSHChk=$(ls ${UniqueChipID}_${ProductType}_7.1.2-11D257_*.shsh2) SHSHChk=$(ls ${UniqueChipID}_${ProductType}_7.1.2-11D257_*.shsh2)
[[ ! $SHSHChk ]] && Error "Saving $OSVer blobs failed. Please run the script again" [[ ! $SHSHChk ]] && Error "Saving $OSVer blobs failed. Please run the script again"
mkdir saved/shsh 2>/dev/null mkdir saved/shsh 2>/dev/null

View File

@ -204,9 +204,10 @@ EnterPwnDFU() {
local pwnDFUDevice local pwnDFUDevice
local pwnD=1 local pwnD=1
if [[ $platform == "macos" || $ProductType == "iPhone3,1" ]]; then if [[ $ProductType == "iPhone3,1" ]]; then
pwnDFUTool="$pwnedDFU"
elif [[ $platform == "macos" ]]; then
Selection=("ipwnder_lite" "iPwnder32") Selection=("ipwnder_lite" "iPwnder32")
[[ $ProductType == "iPhone3,1" ]] && Selection=("pwnedDFU" "ipwndfu")
Input "PwnDFU Tool Option" Input "PwnDFU Tool Option"
Echo "* This option selects what tool to use to put your device in pwnDFU mode." Echo "* This option selects what tool to use to put your device in pwnDFU mode."
Echo "* If unsure, select 1. Select 2 if 1 does not work." Echo "* If unsure, select 1. Select 2 if 1 does not work."
@ -216,15 +217,13 @@ EnterPwnDFU() {
case $opt in case $opt in
"ipwnder_lite" ) pwnDFUTool="$ipwnder_lite"; break;; "ipwnder_lite" ) pwnDFUTool="$ipwnder_lite"; break;;
"iPwnder32" ) pwnDFUTool="$ipwnder32"; break;; "iPwnder32" ) pwnDFUTool="$ipwnder32"; break;;
"ipwndfu" ) pwnDFUTool="ipwndfu"; break;;
"pwnedDFU" ) pwnDFUTool="$pwnedDFU"; break;;
esac esac
done done
else else
pwnDFUTool="ipwndfu" pwnDFUTool="ipwndfu"
fi fi
Log "Entering pwnDFU mode with $pwnDFUTool..." Log "Entering pwnDFU mode with: $pwnDFUTool..."
if [[ $pwnDFUTool == "ipwndfu" ]]; then if [[ $pwnDFUTool == "ipwndfu" ]]; then
cd resources/ipwndfu cd resources/ipwndfu
Echo "* Enter your user password when prompted" Echo "* Enter your user password when prompted"
@ -245,7 +244,9 @@ EnterPwnDFU() {
[[ $DeviceProc == 7 ]] && pwnD=$($irecovery -q | grep -c "PWND") [[ $DeviceProc == 7 ]] && pwnD=$($irecovery -q | grep -c "PWND")
[[ $DeviceProc == 4 ]] && SendiBSS=1 [[ $DeviceProc == 4 ]] && SendiBSS=1
if [[ $pwnDFUDevice != 0 && $pwnD != 1 ]]; then if [[ $pwnDFUDevice != 0 && $ProductType == "iPhone3,1" ]]; then
Error "Failed to enter pwnDFU mode. Please run the script again"
elif [[ $pwnDFUDevice != 0 && $pwnD != 1 ]]; then
echo -e "\n${Color_R}[Error] Failed to enter pwnDFU mode. Please run the script again ${Color_N}" echo -e "\n${Color_R}[Error] Failed to enter pwnDFU mode. Please run the script again ${Color_N}"
echo "${Color_Y}* If the screen is black, exit DFU mode first by holding the TOP and HOME buttons for 15 seconds. ${Color_N}" echo "${Color_Y}* If the screen is black, exit DFU mode first by holding the TOP and HOME buttons for 15 seconds. ${Color_N}"
echo "${Color_Y}* This step may fail a lot, especially on Linux, and unfortunately there is nothing I can do about the low success rates. ${Color_N}" echo "${Color_Y}* This step may fail a lot, especially on Linux, and unfortunately there is nothing I can do about the low success rates. ${Color_N}"

View File

@ -114,8 +114,10 @@ DowngradeOTA() {
SaveOTABlobs SaveOTABlobs
IPSWFindVerify IPSWFindVerify
kDFU kDFU
if [[ $Jailbreak == 1 || $BBUpdate == 0 ]]; then if [[ $Jailbreak == 1 ]]; then
IPSW32 IPSW32
else
IPSWCustom=0
fi fi
IPSWSetExtract IPSWSetExtract
FutureRestore FutureRestore

View File

@ -140,11 +140,11 @@ IPSWSetExtract() {
} }
IPSW32() { IPSW32() {
local Bundle="Down_${ProductType}_${OSVer}_${BuildVer}.bundle"
local ExtraArgs local ExtraArgs
local JBFiles local JBFiles
local JBFiles2 local JBFiles2
local JBSHA1 local JBSHA1
BBUpdate="-bbupdate"
if [[ -e $IPSWCustom.ipsw ]]; then if [[ -e $IPSWCustom.ipsw ]]; then
Log "Found existing Custom IPSW. Skipping IPSW creation." Log "Found existing Custom IPSW. Skipping IPSW creation."
@ -197,8 +197,10 @@ IPSW32() {
fi fi
if [[ $platform == "win" ]]; then if [[ $platform == "win" ]]; then
WinBundles="windows/" WinBundles="windows/"
elif [[ $BBUpdate != 0 ]]; then elif [[ $ProductType == "iPad2,3" ]]; then
ExtraArgs+="-bbupdate" BBUpdate=
[[ $Jailbreak != 1 ]] && IPSWCustom+="N"
IPSWCustom+="B"
fi fi
if [[ ! -e $IPSWCustom.ipsw ]]; then if [[ ! -e $IPSWCustom.ipsw ]]; then
@ -209,7 +211,7 @@ IPSW32() {
else else
cp -R ../resources/firmware/${WinBundles}FirmwareBundles FirmwareBundles cp -R ../resources/firmware/${WinBundles}FirmwareBundles FirmwareBundles
fi fi
$ipsw ./../$IPSW.ipsw ./../$IPSWCustom.ipsw $ExtraArgs $JBMemory ${JBFiles[@]} $ipsw ./../$IPSW.ipsw ./../$IPSWCustom.ipsw $ExtraArgs $BBUpdate $JBMemory ${JBFiles[@]}
cd .. cd ..
fi fi

View File

@ -78,7 +78,7 @@ Main() {
Error "Platform unknown/not supported." Error "Platform unknown/not supported."
fi fi
chmod +x ./resources/*.sh ./resources/tools/* chmod +x ./resources/*.sh ./resources/tools/* ./resources/libimobiledevice_$platform/*
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
Error "A problem with file permissions has been detected, cannot proceed." Error "A problem with file permissions has been detected, cannot proceed."
fi fi
@ -107,7 +107,7 @@ Main() {
ExitWin 0 ExitWin 0
fi fi
if [[ $platform != "win" ]]; then if [[ $platform == "linux" ]]; then
SaveExternal LukeZGD ipwndfu SaveExternal LukeZGD ipwndfu
fi fi
GetDeviceValues $1 GetDeviceValues $1
@ -178,7 +178,6 @@ Main() {
fi fi
fi fi
SaveOTABlobs
IPSWFindVerify IPSWFindVerify
if [[ $DeviceProc == 4 ]]; then if [[ $DeviceProc == 4 ]]; then
IPSWFindVerify 712 IPSWFindVerify 712