mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-12-23 23:01:49 +01:00
Add latest version signing check and fix other stuff
This commit is contained in:
parent
83087e0fdc
commit
4c3b850772
@ -4,31 +4,37 @@ SaveOTABlobs() {
|
||||
local ExtraArgs
|
||||
local SHSHChk
|
||||
local SHSHContinue
|
||||
local SHSHLatest
|
||||
local SHSHExisting
|
||||
|
||||
Log "Saving $OSVer blobs with tsschecker..."
|
||||
if [[ $DeviceProc != 7 && $Baseband != 0 && $Baseband8 != 1 ]]; then
|
||||
Log "Checking signing status of iOS $LatestVer..."
|
||||
SHSHChk=*_${ProductType}_${HWModel}ap_${LatestVer}*.shsh*
|
||||
$tsschecker -d $ProductType -i $LatestVer -e $UniqueChipID -s -B ${HWModel}ap
|
||||
SHSHLatest=$(ls $SHSHChk)
|
||||
if [[ ! -e $SHSHLatest ]]; then
|
||||
Error "For some reason, the latest version for your device (iOS $LatestVer) is not signed. Cannot continue."
|
||||
fi
|
||||
Log "Latest version for $ProductType (iOS $LatestVer) is signed."
|
||||
rm $SHSHLatest
|
||||
fi
|
||||
|
||||
Log "Saving iOS $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"
|
||||
ExtraArgs="-d $ProductType -i $OSVer -e $UniqueChipID -m $BuildManifest -o -s -B ${HWModel}ap --generator 0x1111111111111111"
|
||||
SHSHChk=${UniqueChipID}_${ProductType}_${HWModel}ap_${OSVer}-${BuildVer}_3a88b7c3802f2f0510abc432104a15ebd8bd7154.shsh*
|
||||
if [[ $Baseband8 != 1 ]]; then
|
||||
ExtraArgs+=" --no-baseband"
|
||||
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
|
||||
if [[ ! -e $SHSH && ! -e $SHSHExisting ]]; then
|
||||
Error "Saving $OSVer blobs failed. Please run the script again" \
|
||||
"It is also possible that $OSVer for $ProductType is no longer signed"
|
||||
|
||||
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 [[ ! -e $SHSH ]]; then
|
||||
Log "Saving $OSVer blobs failed, but found existing saved SHSH blobs. Continuing..."
|
||||
cp $SHSHExisting .
|
||||
SHSH=$(ls $SHSHChk)
|
||||
@ -37,7 +43,7 @@ SaveOTABlobs() {
|
||||
|
||||
if [[ -n $SHSH && $SHSHContinue != 1 ]]; then
|
||||
mkdir -p saved/shsh 2>/dev/null
|
||||
[[ ! $SHSHExisting ]] && cp "$SHSH" saved/shsh
|
||||
cp "$SHSH" saved/shsh
|
||||
Log "Successfully saved $OSVer blobs."
|
||||
fi
|
||||
}
|
||||
|
@ -83,11 +83,13 @@ GetDeviceValues() {
|
||||
Firmware=resources/firmware/$ProductType
|
||||
Baseband=0
|
||||
BasebandURL=$(cat $Firmware/13G37/url 2>/dev/null)
|
||||
LatestVer="9.3.6"
|
||||
|
||||
if [[ $ProductType == "iPad2,2" ]]; then
|
||||
BasebandURL=$(cat $Firmware/13G36/url)
|
||||
Baseband="ICE3_04.12.09_BOOT_02.13.Release.bbfw"
|
||||
BasebandSHA1="e6f54acc5d5652d39a0ef9af5589681df39e0aca"
|
||||
LatestVer="9.3.5"
|
||||
|
||||
elif [[ $ProductType == "iPad2,3" ]]; then
|
||||
Baseband="Phoenix-3.6.03.Release.bbfw"
|
||||
@ -110,6 +112,7 @@ GetDeviceValues() {
|
||||
BasebandURL=$(cat $Firmware/14G61/url)
|
||||
Baseband="Mav5-11.80.00.Release.bbfw"
|
||||
BasebandSHA1="8951cf09f16029c5c0533e951eb4c06609d0ba7f"
|
||||
LatestVer="10.3.4"
|
||||
|
||||
elif [[ $ProductType == "iPad4,2" || $ProductType == "iPad4,3" || $ProductType == "iPad4,5" ||
|
||||
$ProductType == "iPhone6,1" || $ProductType == "iPhone6,2" ]]; then
|
||||
@ -165,7 +168,9 @@ GetDeviceValues() {
|
||||
}
|
||||
|
||||
Baseband841() {
|
||||
Baseband8=1
|
||||
BasebandURL=$(cat $Firmware/12H321/url)
|
||||
|
||||
if [[ $ProductType == "iPad2,3" ]]; then
|
||||
Baseband="Phoenix-3.0.04.Release.bbfw"
|
||||
BasebandSHA1="a507ee2fe061dfbf8bee7e512df52ade8777e113"
|
||||
|
@ -3,7 +3,7 @@
|
||||
FRBaseband() {
|
||||
local BasebandSHA1L
|
||||
|
||||
if [[ $DeviceProc == 7 ]] || [[ $Baseband5 != 0 && $OSVer == "8.4.1" ]]; then
|
||||
if [[ $DeviceProc == 7 ]] || [[ $Baseband8 == 1 && $OSVer == "8.4.1" ]]; then
|
||||
mkdir -p saved/baseband 2>/dev/null
|
||||
cp -f $IPSWRestore/Firmware/$Baseband saved/baseband
|
||||
fi
|
||||
@ -16,7 +16,7 @@ FRBaseband() {
|
||||
mv $Baseband saved/baseband
|
||||
mv BuildManifest.plist saved/$ProductType
|
||||
BuildManifest="saved/$ProductType/BuildManifest.plist"
|
||||
elif [[ $Baseband5 == 0 ]]; then
|
||||
elif [[ $Baseband8 != 1 ]]; then
|
||||
BuildManifest="saved/$ProductType/BuildManifest.plist"
|
||||
fi
|
||||
|
||||
@ -89,12 +89,11 @@ Downgrade() {
|
||||
Echo "* I recommend to disable the option for these devices to flash the iOS 8.4.1 baseband."
|
||||
fi
|
||||
Echo "* This option is enabled by default (Y)."
|
||||
read -p "$(Input 'Enable this option? (Y/n):')" Baseband5
|
||||
if [[ $Baseband5 == 'N' || $Baseband5 == 'n' ]]; then
|
||||
read -p "$(Input 'Enable this option? (Y/n):')" Baseband8
|
||||
if [[ $Baseband8 == 'N' || $Baseband8 == 'n' ]]; then
|
||||
Baseband841
|
||||
Log "Latest baseband disabled by user. Using iOS 8.4.1 baseband"
|
||||
else
|
||||
Baseband5=0
|
||||
Log "Latest baseband enabled."
|
||||
fi
|
||||
echo
|
||||
|
@ -140,6 +140,7 @@ Main() {
|
||||
Echo "* This custom IPSW has a jailbreak built in ($JBName)"
|
||||
Echo "* Run the script again and select Downgrade Device to use the custom IPSW."
|
||||
Echo "* You may also use futurerestore manually (make sure to use the latest beta)"
|
||||
exit 0
|
||||
|
||||
elif [[ $Mode != "Downgrade" ]]; then
|
||||
$Mode
|
||||
|
Loading…
Reference in New Issue
Block a user