mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-06-03 04:34:57 +02:00
Add fallback tsschecker (for #81)
This commit is contained in:
parent
adcb0a19ef
commit
d3d27a0c4f
@ -1,30 +1,44 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SaveOTABlobs() {
|
SaveOTABlobs() {
|
||||||
|
local ExtraArgs
|
||||||
local SHSHChk
|
local SHSHChk
|
||||||
|
local SHSHContinue
|
||||||
local SHSHExisting
|
local SHSHExisting
|
||||||
|
|
||||||
Log "Saving $OSVer blobs with tsschecker..."
|
Log "Saving $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"
|
||||||
if [[ $DeviceProc == 7 ]]; then
|
if [[ $DeviceProc == 7 ]]; then
|
||||||
local APNonce=$($irecovery -q | grep "NONC" | cut -c 7-)
|
local APNonce=$($irecovery -q | grep "NONC" | cut -c 7-)
|
||||||
Log "APNonce: $APNonce"
|
Log "APNonce: $APNonce"
|
||||||
$tsschecker -d $ProductType -B ${HWModel}ap -i $OSVer -e $UniqueChipID -m $BuildManifest --apnonce $APNonce -o -s
|
ExtraArgs+=" -B ${HWModel}ap --apnonce $APNonce"
|
||||||
SHSHChk=${UniqueChipID}_${ProductType}_${HWModel}ap_${OSVer}-${BuildVer}_${APNonce}.shsh*
|
SHSHChk=${UniqueChipID}_${ProductType}_${HWModel}ap_${OSVer}-${BuildVer}_${APNonce}.shsh*
|
||||||
else
|
else
|
||||||
$tsschecker -d $ProductType -i $OSVer -e $UniqueChipID -m $BuildManifest -o -s
|
|
||||||
SHSHChk=${UniqueChipID}_${ProductType}_${OSVer}-${BuildVer}*.shsh*
|
SHSHChk=${UniqueChipID}_${ProductType}_${OSVer}-${BuildVer}*.shsh*
|
||||||
fi
|
fi
|
||||||
|
$tsschecker $ExtraArgs
|
||||||
|
|
||||||
SHSH=$(ls $SHSHChk)
|
SHSH=$(ls $SHSHChk)
|
||||||
SHSHExisting=$(ls saved/shsh/$SHSHChk 2>/dev/null)
|
SHSHExisting=$(ls saved/shsh/$SHSHChk 2>/dev/null)
|
||||||
if [[ ! $SHSH && ! $SHSHExisting ]]; then
|
if [[ ! $SHSH && ! $SHSHExisting ]]; then
|
||||||
Error "Saving $OSVer blobs failed. Please run the script again" \
|
Log "Saving $OSVer blobs failed. Trying again with fallback tsschecker..."
|
||||||
"It is also possible that $OSVer for $ProductType is no longer signed"
|
$tsschecker2 $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
|
elif [[ ! $SHSH ]]; then
|
||||||
Log "Saving $OSVer blobs failed, but found existing saved SHSH blobs. Continuing..."
|
Log "Saving $OSVer blobs failed, but found existing saved SHSH blobs. Continuing..."
|
||||||
cp $SHSHExisting .
|
cp $SHSHExisting .
|
||||||
SHSH=$(ls $SHSHChk)
|
SHSH=$(ls $SHSHChk)
|
||||||
else
|
SHSHContinue=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -z $SHSH && $SHSHContinue != 1 ]]; then
|
||||||
mkdir -p saved/shsh 2>/dev/null
|
mkdir -p saved/shsh 2>/dev/null
|
||||||
[[ ! $SHSHExisting ]] && cp "$SHSH" saved/shsh
|
[[ ! $SHSHExisting ]] && cp "$SHSH" saved/shsh
|
||||||
Log "Successfully saved $OSVer blobs."
|
Log "Successfully saved $OSVer blobs."
|
||||||
|
@ -14,6 +14,7 @@ SetToolPaths() {
|
|||||||
ipwndfu="sudo $python ipwndfu"
|
ipwndfu="sudo $python ipwndfu"
|
||||||
rmsigchks="sudo $python rmsigchks.py"
|
rmsigchks="sudo $python rmsigchks.py"
|
||||||
SimpleHTTPServer="sudo -b $python -m SimpleHTTPServer 80"
|
SimpleHTTPServer="sudo -b $python -m SimpleHTTPServer 80"
|
||||||
|
tsschecker2="env LD_PRELOAD=./resources/lib/libcurl.so.3 LD_LIBRARY_PATH=./resources/lib ./resources/tools/tsschecker2_linux"
|
||||||
|
|
||||||
elif [[ $OSTYPE == "darwin"* ]]; then
|
elif [[ $OSTYPE == "darwin"* ]]; then
|
||||||
platform="macos"
|
platform="macos"
|
||||||
@ -28,6 +29,7 @@ SetToolPaths() {
|
|||||||
ipwndfu="$python ipwndfu"
|
ipwndfu="$python ipwndfu"
|
||||||
rmsigchks="$python rmsigchks.py"
|
rmsigchks="$python rmsigchks.py"
|
||||||
SimpleHTTPServer="$python -m SimpleHTTPServer 80"
|
SimpleHTTPServer="$python -m SimpleHTTPServer 80"
|
||||||
|
tsschecker2="./resources/tools/tsschecker2_macos"
|
||||||
fi
|
fi
|
||||||
git="$(which git)"
|
git="$(which git)"
|
||||||
ideviceenterrecovery="./resources/libimobiledevice_$platform/ideviceenterrecovery"
|
ideviceenterrecovery="./resources/libimobiledevice_$platform/ideviceenterrecovery"
|
||||||
|
BIN
resources/tools/tsschecker2_linux
Executable file
BIN
resources/tools/tsschecker2_linux
Executable file
Binary file not shown.
BIN
resources/tools/tsschecker2_macos
Executable file
BIN
resources/tools/tsschecker2_macos
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user