mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-23 16:39:17 +01:00
Use idevicererestore for Windows OTA
Properly flash latest baseband, hopefully fixes activation issues
This commit is contained in:
parent
ba2af83749
commit
8cd5ce1d35
@ -56,6 +56,7 @@ SetToolPaths() {
|
|||||||
ideviceenterrecovery="$MPath/ideviceenterrecovery"
|
ideviceenterrecovery="$MPath/ideviceenterrecovery"
|
||||||
ideviceinfo="$MPath/ideviceinfo"
|
ideviceinfo="$MPath/ideviceinfo"
|
||||||
idevicerestore="./resources/tools/idevicerestore_$platform"
|
idevicerestore="./resources/tools/idevicerestore_$platform"
|
||||||
|
idevicererestore="./resources/tools/idevicererestore_$platform"
|
||||||
iproxy="$MPath/iproxy"
|
iproxy="$MPath/iproxy"
|
||||||
ipsw="../resources/tools/ipsw_$platform"
|
ipsw="../resources/tools/ipsw_$platform"
|
||||||
ipwndfu="$python ipwndfu"
|
ipwndfu="$python ipwndfu"
|
||||||
@ -94,7 +95,7 @@ SetToolPaths() {
|
|||||||
ping="ping -n 1"
|
ping="ping -n 1"
|
||||||
Log "WARNING - Using iOS-OTA-Downgrader on Windows is highly discouraged."
|
Log "WARNING - Using iOS-OTA-Downgrader on Windows is highly discouraged."
|
||||||
Echo "* Please use it on Linux or macOS instead."
|
Echo "* Please use it on Linux or macOS instead."
|
||||||
Echo "* You may still continue, but you may encounter problems with restoring and activation."
|
Echo "* You may still continue, but you might encounter problems with restoring and activation."
|
||||||
Echo "* You have been warned."
|
Echo "* You have been warned."
|
||||||
sleep 5
|
sleep 5
|
||||||
Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)"
|
Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)"
|
||||||
@ -195,7 +196,7 @@ InstallDepends() {
|
|||||||
pacman -Sy --noconfirm --needed ca-certificates curl openssh unzip zip
|
pacman -Sy --noconfirm --needed ca-certificates curl openssh unzip zip
|
||||||
libimobiledevice=("https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_win.zip" "75ae3af3347b89107f0f6b7e41fde42e6ccdd404")
|
libimobiledevice=("https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_win.zip" "75ae3af3347b89107f0f6b7e41fde42e6ccdd404")
|
||||||
if [[ ! $(ls ../resources/tools/*win*) ]]; then
|
if [[ ! $(ls ../resources/tools/*win*) ]]; then
|
||||||
SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/tools_win.zip tools_win.zip 30597bc091b1a2fa80350febdfd97a24b28fbdd5
|
SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/tools_win.zip tools_win.zip b8b727b74d3bbba2093bef5a156e30cb29d6eac7
|
||||||
Log "Extracting Windows tools..."
|
Log "Extracting Windows tools..."
|
||||||
unzip -oq tools_win.zip -d ../resources
|
unzip -oq tools_win.zip -d ../resources
|
||||||
fi
|
fi
|
||||||
|
@ -23,7 +23,7 @@ FRBaseband() {
|
|||||||
BasebandSHA1L=$($sha1sum saved/baseband/$Baseband | awk '{print $1}')
|
BasebandSHA1L=$($sha1sum saved/baseband/$Baseband | awk '{print $1}')
|
||||||
if [[ ! -e $(ls saved/baseband/$Baseband) || $BasebandSHA1L != $BasebandSHA1 ]]; then
|
if [[ ! -e $(ls saved/baseband/$Baseband) || $BasebandSHA1L != $BasebandSHA1 ]]; then
|
||||||
rm -f saved/baseband/$Baseband saved/$ProductType/BuildManifest.plist
|
rm -f saved/baseband/$Baseband saved/$ProductType/BuildManifest.plist
|
||||||
if [[ $DeviceProc == 7 ]]; then
|
if [[ $DeviceProc == 7 || $platform == "win" ]]; then
|
||||||
Error "Downloading/verifying baseband failed. Please run the script again"
|
Error "Downloading/verifying baseband failed. Please run the script again"
|
||||||
else
|
else
|
||||||
Log "Downloading/verifying baseband failed, will proceed with --latest-baseband flag"
|
Log "Downloading/verifying baseband failed, will proceed with --latest-baseband flag"
|
||||||
@ -138,7 +138,20 @@ iDeviceRestore() {
|
|||||||
mkdir shsh
|
mkdir shsh
|
||||||
cp $SHSH shsh/${UniqueChipID}-${ProductType}-${OSVer}.shsh
|
cp $SHSH shsh/${UniqueChipID}-${ProductType}-${OSVer}.shsh
|
||||||
Log "Proceeding to idevicerestore..."
|
Log "Proceeding to idevicerestore..."
|
||||||
[[ $1 == "latest" ]] && ExtraArgs="-e" || ExtraArgs="-e -w"
|
ExtraArgs="-e -w"
|
||||||
|
if [[ $1 == "latest" ]]; then
|
||||||
|
ExtraArgs="-e"
|
||||||
|
elif [[ $platform == "win" && $ProductType != "iPhone3"* ]]; then
|
||||||
|
ExtraArgs="-r"
|
||||||
|
idevicerestore="$idevicererestore"
|
||||||
|
if [[ $Baseband == 0 ]]; then
|
||||||
|
Log "Device $ProductType has no baseband"
|
||||||
|
else
|
||||||
|
FRBaseband
|
||||||
|
cp saved/baseband/$Baseband tmp/bbfw.tmp
|
||||||
|
cp $BuildManifest tmp/BuildManifest.plist
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Log "Running idevicerestore with command: $idevicerestore $ExtraArgs \"$IPSWRestore.ipsw\""
|
Log "Running idevicerestore with command: $idevicerestore $ExtraArgs \"$IPSWRestore.ipsw\""
|
||||||
$idevicerestore $ExtraArgs "$IPSWRestore.ipsw"
|
$idevicerestore $ExtraArgs "$IPSWRestore.ipsw"
|
||||||
echo
|
echo
|
||||||
@ -200,7 +213,7 @@ DowngradeOTA() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DowngradeOTAWin() {
|
DowngradeOTAWin() {
|
||||||
IPSWCustom="${IPSWType}_${OSVer}_${BuildVer}_CustomWin"
|
IPSWCustom="${IPSWType}_${OSVer}_${BuildVer}_CustomW"
|
||||||
if [[ $DeviceProc != 7 ]]; then
|
if [[ $DeviceProc != 7 ]]; then
|
||||||
JailbreakOption
|
JailbreakOption
|
||||||
SaveOTABlobs
|
SaveOTABlobs
|
||||||
|
@ -220,10 +220,7 @@ IPSW32() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
[[ $ProductType == "$DisableBBUpdate" ]] && BBUpdate=
|
[[ $ProductType == "$DisableBBUpdate" ]] && BBUpdate=
|
||||||
if [[ $platform == "win" ]]; then
|
[[ $platform == "win" ]] && WinBundles="windows/"
|
||||||
BBUpdate=
|
|
||||||
WinBundles="windows/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -e $IPSWCustom.ipsw ]]; then
|
if [[ ! -e $IPSWCustom.ipsw ]]; then
|
||||||
Log "Preparing custom IPSW..."
|
Log "Preparing custom IPSW..."
|
||||||
|
@ -171,7 +171,7 @@ Main() {
|
|||||||
|
|
||||||
if [[ $Mode == "IPSW32" ]]; then
|
if [[ $Mode == "IPSW32" ]]; then
|
||||||
echo
|
echo
|
||||||
[[ $platform == "win" ]] && IPSWCustom="${IPSWType}_${OSVer}_${BuildVer}_CustomWin"
|
[[ $platform == "win" ]] && IPSWCustom="${IPSWType}_${OSVer}_${BuildVer}_CustomW"
|
||||||
JailbreakOption
|
JailbreakOption
|
||||||
if [[ -e "$IPSWCustom.ipsw" ]]; then
|
if [[ -e "$IPSWCustom.ipsw" ]]; then
|
||||||
Log "Found existing Custom IPSW, stopping here."
|
Log "Found existing Custom IPSW, stopping here."
|
||||||
|
Loading…
Reference in New Issue
Block a user