mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-24 00:49:17 +01:00
c15e3c7984
- iOS-OTA-Downgrader will now be able to flash the latest baseband even if the jailbreak option is enabled - idevicerestore is now removed, futurerestore will now always be used - windows support is now removed (now in the "windows" branch and will no longer be updated or supported) - custom ipsw option is now removed - existing custom ipsw's created from previous commits will need to be deleted and re-created to use starting from this commit - custom ipsw's created in the windows version will NOT be compatible with the latest linux/macos versions of ota downgrader
44 lines
1.4 KiB
Bash
Executable File
44 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
SaveOTABlobs() {
|
|
local ExtraArgs
|
|
local SHSHChk
|
|
local SHSHContinue
|
|
local SHSHExisting
|
|
|
|
Log "Saving $OSVer blobs with tsschecker..."
|
|
BuildManifest="resources/manifests/BuildManifest_${ProductType}_${OSVer}.plist"
|
|
ExtraArgs="-d $ProductType -i $OSVer -e $UniqueChipID -m $BuildManifest -o -s -B ${HWModel}ap"
|
|
SHSHChk=${UniqueChipID}_${ProductType}_${HWModel}ap_${OSVer}-${BuildVer}*.shsh*
|
|
if [[ $DeviceProc == 7 ]]; then
|
|
ExtraArgs+=" --generator 0x1111111111111111"
|
|
fi
|
|
$tsschecker $ExtraArgs
|
|
|
|
SHSH=$(ls $SHSHChk)
|
|
SHSHExisting=$(ls saved/shsh/$SHSHChk 2>/dev/null)
|
|
if [[ ! $SHSH && ! $SHSHExisting ]]; then
|
|
Log "Saving $OSVer blobs failed. Trying again with fallback..."
|
|
ExtraArgs+=" --no-baseband"
|
|
$tsschecker $ExtraArgs
|
|
|
|
SHSH=$(ls $SHSHChk)
|
|
if [[ ! $SHSH ]]; then
|
|
Error "Saving $OSVer blobs failed. Please run the script again" \
|
|
"It is also possible that $OSVer for $ProductType is no longer signed"
|
|
fi
|
|
|
|
elif [[ ! $SHSH ]]; then
|
|
Log "Saving $OSVer blobs failed, but found existing saved SHSH blobs. Continuing..."
|
|
cp $SHSHExisting .
|
|
SHSH=$(ls $SHSHChk)
|
|
SHSHContinue=1
|
|
fi
|
|
|
|
if [[ ! -z $SHSH && $SHSHContinue != 1 ]]; then
|
|
mkdir -p saved/shsh 2>/dev/null
|
|
[[ ! $SHSHExisting ]] && cp "$SHSH" saved/shsh
|
|
Log "Successfully saved $OSVer blobs."
|
|
fi
|
|
}
|