mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 10:24:16 +01:00
More updates on blob saving and others
most of these are more of edge cases but it's still nice to get them updated anyway
This commit is contained in:
parent
9933d6e0f5
commit
5e30eaf1b9
@ -6,9 +6,9 @@ SaveOTABlobs() {
|
||||
local SHSHChk=${UniqueChipID}_${ProductType}_${HWModel}ap_${OSVer}-${BuildVer}*.shsh*
|
||||
BuildManifest="resources/manifests/BuildManifest_${ProductType}_${OSVer}.plist"
|
||||
|
||||
if [[ $(ls saved/shsh/$SHSHChk 2>/dev/null) ]]; then
|
||||
Log "Found existing saved $OSVer blobs."
|
||||
if [[ $(ls saved/shsh/$SHSHChk 2>/dev/null) && -z $APNonce ]]; then
|
||||
SHSH=$(ls saved/shsh/$SHSHChk)
|
||||
Log "Found existing saved $OSVer blobs: $SHSH"
|
||||
return
|
||||
fi
|
||||
|
||||
@ -19,8 +19,14 @@ SaveOTABlobs() {
|
||||
SHSH=$(ls $SHSHChk)
|
||||
if [[ -n $SHSH ]]; then
|
||||
mkdir -p saved/shsh 2>/dev/null
|
||||
[[ -z $APNonce ]] && cp "$SHSH" saved/shsh
|
||||
Log "Successfully saved $OSVer blobs."
|
||||
if [[ -n $APNonce ]]; then
|
||||
mv "$SHSH" tmp/
|
||||
SHSH=$(ls tmp/$SHSHChk)
|
||||
else
|
||||
mv "$SHSH" saved/shsh/
|
||||
SHSH=$(ls saved/shsh/$SHSHChk)
|
||||
fi
|
||||
Log "Successfully saved $OSVer blobs: $SHSH"
|
||||
else
|
||||
Error "Saving $OSVer blobs failed. Please run the script again" \
|
||||
"It is also possible that $OSVer for $ProductType is no longer signed"
|
||||
@ -33,18 +39,18 @@ Save712Blobs() {
|
||||
SHSH="saved/shsh/${UniqueChipID}-${ProductType}-7.1.2.shsh"
|
||||
|
||||
if [[ -e $SHSH ]]; then
|
||||
Log "Found existing saved 7.1.2 blobs."
|
||||
Log "Found existing saved 7.1.2 blobs: $SHSH"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -e $BuildManifest && -e $IPSW7.ipsw ]]; then
|
||||
Log "Extracting BuildManifest from 7.1.2 IPSW..."
|
||||
unzip -o -j $IPSW7.ipsw BuildManifest.plist -d .
|
||||
mkdir -p saved/$ProductType 2>/dev/null
|
||||
mv BuildManifest.plist $BuildManifest
|
||||
elif [[ ! -e $BuildManifest ]]; then
|
||||
Log "Downloading BuildManifest for 7.1.2..."
|
||||
$partialzip $BasebandURL BuildManifest.plist BuildManifest.plist
|
||||
if [[ ! -e $BuildManifest ]]; then
|
||||
if [[ -e $IPSW7.ipsw ]]; then
|
||||
Log "Extracting BuildManifest from 7.1.2 IPSW..."
|
||||
unzip -o -j $IPSW7.ipsw BuildManifest.plist -d .
|
||||
else
|
||||
Log "Downloading BuildManifest for 7.1.2..."
|
||||
$partialzip $BasebandURL BuildManifest.plist BuildManifest.plist
|
||||
fi
|
||||
mkdir -p saved/$ProductType 2>/dev/null
|
||||
mv BuildManifest.plist $BuildManifest
|
||||
fi
|
||||
@ -53,7 +59,7 @@ Save712Blobs() {
|
||||
$tsschecker -d $ProductType -i 7.1.2 -e $UniqueChipID -m $BuildManifest -s -b
|
||||
SHSHChk=$(ls ${UniqueChipID}_${ProductType}_7.1.2-11D257_*.shsh2)
|
||||
[[ -z $SHSHChk ]] && Error "Saving $OSVer blobs failed. Please run the script again"
|
||||
mkdir saved/shsh 2>/dev/null
|
||||
mkdir -p saved/shsh 2>/dev/null
|
||||
mv $SHSHChk $SHSH
|
||||
Log "Successfully saved 7.1.2 blobs."
|
||||
Log "Successfully saved 7.1.2 blobs: $SHSH"
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ iDeviceRestore() {
|
||||
cp $SHSH shsh/${UniqueChipID}-${ProductType}-${OSVer}.shsh
|
||||
Log "Proceeding to idevicerestore..."
|
||||
[[ $1 == "latest" ]] && ExtraArgs="-e" || ExtraArgs="-e -w"
|
||||
[[ $platform == "win" ]] && ExtraArgs="-ewy"
|
||||
[[ $platform == "win" ]] && ExtraArgs+=" -y"
|
||||
$idevicerestore $ExtraArgs "$IPSWRestore.ipsw"
|
||||
echo
|
||||
Log "Restoring done! Read the message below if any error has occurred:"
|
||||
@ -243,7 +243,9 @@ Downgrade() {
|
||||
}
|
||||
|
||||
Downgrade4() {
|
||||
JailbreakOption
|
||||
if [[ $OSVer == "7.1.2" ]]; then
|
||||
[[ $platform != "win" ]] && JailbreakOption
|
||||
fi
|
||||
IPSWFindVerify
|
||||
Save712Blobs
|
||||
if [[ $OSVer == "7.1.2" && $Jailbreak != 1 ]]; then
|
||||
|
@ -19,8 +19,7 @@ if [[ $1 != "NoColor" && $2 != "NoColor" ]]; then
|
||||
fi
|
||||
|
||||
Clean() {
|
||||
rm -rf iP*/ shsh/ tmp/ *.im4p *.bbfw ${UniqueChipID}_${ProductType}_*.shsh2 \
|
||||
${UniqueChipID}_${ProductType}_${HWModel}ap_*.shsh BuildManifest.plist version.xml
|
||||
rm -rf iP*/ shsh/ tmp/ *.im4p *.bbfw BuildManifest.plist version.xml
|
||||
kill $iproxyPID $ServerPID 2>/dev/null
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user