Error when device is not supported

and some other changes
This commit is contained in:
LukeeGD 2020-07-23 20:08:16 +08:00
parent cb022154d3
commit 7879f23756
2 changed files with 14 additions and 19 deletions

View File

@ -6,8 +6,8 @@
## Supported devices: ## Supported devices:
- **iOS 10.3.3**: All A7 devices are supported **except iPad4,6 iPad4,7 iPad4,8 iPad4,9** - **iOS 10.3.3**: All A7 devices are supported **except iPad4,6 iPad4,7 iPad4,8 iPad4,9**
- **iOS 8.4.1**: All A5, A5X, A6, and A6X devices are supported **except iPad2,2 (iPad 2 GSM) iPhone5,3 and 5,4 (iPhone 5C)** - **iOS 8.4.1**: All A5, A5X, A6, and A6X devices are supported **except iPhone5,3 and 5,4 (iPhone 5C)**
- **iOS 6.1.3**: Only iPhone 4S and iPad 2 devices are supported **except iPad2,2 (iPad 2 GSM) and iPad2,4 (iPad 2 Rev A)** - **iOS 6.1.3**: Only iPhone 4S and iPad 2 devices are supported **except iPad2,4 (iPad 2 Rev A)**
## Prerequisites: ## Prerequisites:
- A supported device: - A supported device:

View File

@ -42,19 +42,20 @@ function Main {
[ ! $(which lsusb) ] || [ ! $(which ssh) ] || [ ! $(which python3) ]; then [ ! $(which lsusb) ] || [ ! $(which ssh) ] || [ ! $(which python3) ]; then
InstallDependencies InstallDependencies
elif [ $DFUDevice == 1 ] || [ $RecoveryDevice == 1 ]; then elif [ $DFUDevice == 1 ] || [ $RecoveryDevice == 1 ]; then
GetProductType ProductType=$(sudo LD_LIBRARY_PATH=/usr/local/lib resources/tools/igetnonce_$platform)
[ ! $ProductType ] && read -p "[Input] Enter ProductType (eg. iPad2,1): " ProductType
UniqueChipID=$(sudo LD_LIBRARY_PATH=/usr/local/lib irecovery -q | grep 'ECID' | cut -c 7-) UniqueChipID=$(sudo LD_LIBRARY_PATH=/usr/local/lib irecovery -q | grep 'ECID' | cut -c 7-)
ProductVer='Unknown' ProductVer='Unknown'
else else
HWModel=$(ideviceinfo -s | grep 'HardwareModel' | cut -c 16- | tr '[:upper:]' '[:lower:]' | sed 's/.\{2\}$//') HWModel=$(ideviceinfo -s | grep 'HardwareModel' | cut -c 16- | tr '[:upper:]' '[:lower:]' | sed 's/.\{2\}$//')
ProductType=$(ideviceinfo -s | grep 'ProductType' | cut -c 14-) ProductType=$(ideviceinfo -s | grep 'ProductType' | cut -c 14-)
[ ! $ProductType ] && ProductType=$(ideviceinfo | grep 'ProductType' | cut -c 14-) [ ! $ProductType ] && ProductType=$(ideviceinfo | grep 'ProductType' | cut -c 14-)
[ ! $ProductType ] && ProductType='NA'
ProductVer=$(ideviceinfo -s | grep 'ProductVer' | cut -c 17-) ProductVer=$(ideviceinfo -s | grep 'ProductVer' | cut -c 17-)
VersionDetect=$(echo $ProductVer | cut -c 1) VersionDetect=$(echo $ProductVer | cut -c 1)
UniqueChipID=$(ideviceinfo -s | grep 'UniqueChipID' | cut -c 15-) UniqueChipID=$(ideviceinfo -s | grep 'UniqueChipID' | cut -c 15-)
UniqueDeviceID=$(ideviceinfo -s | grep 'UniqueDeviceID' | cut -c 17-) UniqueDeviceID=$(ideviceinfo -s | grep 'UniqueDeviceID' | cut -c 17-)
fi fi
[ ! $ProductType ] && ProductType='NA'
BasebandDetect BasebandDetect
chmod +x resources/tools/* chmod +x resources/tools/*
@ -75,8 +76,6 @@ function Main {
fi fi
elif [ $RecoveryDevice == 1 ] && [[ $A7Device != 1 ]]; then elif [ $RecoveryDevice == 1 ] && [[ $A7Device != 1 ]]; then
Error "Non-A7 device detected in recovery mode. Please put the device in normal mode and jailbroken before proceeding" Error "Non-A7 device detected in recovery mode. Please put the device in normal mode and jailbroken before proceeding"
elif [ $ProductType == 'NA' ]; then
Error "Please put the device in normal mode (and jailbroken for 32-bit) before proceeding." "Recovery or DFU mode is also applicable for A7 devices"
fi fi
echo "* HardwareModel: ${HWModel}ap" echo "* HardwareModel: ${HWModel}ap"
@ -182,8 +181,6 @@ function SaveOTABlobs {
if [ $A7Device == 1 ]; then if [ $A7Device == 1 ]; then
APNonce=$(sudo LD_LIBRARY_PATH=/usr/local/lib irecovery -q | grep 'NONC' | cut -c 7-) APNonce=$(sudo LD_LIBRARY_PATH=/usr/local/lib irecovery -q | grep 'NONC' | cut -c 7-)
echo "* APNonce: $APNonce" echo "* APNonce: $APNonce"
fi
if [ $A7Device == 1 ]; then
LD_LIBRARY_PATH=/usr/local/lib resources/tools/tsschecker_$platform -d $ProductType -B ${HWModel}ap -i $OSVer -e $UniqueChipID -m $BuildManifest --apnonce $APNonce -o -s LD_LIBRARY_PATH=/usr/local/lib resources/tools/tsschecker_$platform -d $ProductType -B ${HWModel}ap -i $OSVer -e $UniqueChipID -m $BuildManifest --apnonce $APNonce -o -s
else else
LD_LIBRARY_PATH=/usr/local/lib resources/tools/tsschecker_$platform -d $ProductType -i $OSVer -e $UniqueChipID -m $BuildManifest -o -s LD_LIBRARY_PATH=/usr/local/lib resources/tools/tsschecker_$platform -d $ProductType -i $OSVer -e $UniqueChipID -m $BuildManifest -o -s
@ -456,7 +453,7 @@ function InstallDependencies {
elif [[ $VERSION_ID == "20.04" ]]; then elif [[ $VERSION_ID == "20.04" ]]; then
# Ubuntu Focal # Ubuntu Focal
sudo apt update sudo apt update
sudo apt -y install autoconf automake binutils bsdiff build-essential checkinstall curl git ifuse libimobiledevice-utils libplist3 libreadline-dev libtool-bin libusb-1.0-0-dev libusbmuxd6 libzip5 python2 usbmuxd sudo apt -y install autoconf automake binutils bsdiff build-essential checkinstall curl git ifuse libimobiledevice-utils libplist3 libreadline-dev libtool-bin libusb-1.0-0-dev libusbmuxd6 libzip5 openssh-client python2 python3 usbmuxd usbutils
curl -L http://archive.ubuntu.com/ubuntu/pool/universe/c/curl3/libcurl3_7.58.0-2ubuntu2_amd64.deb -o libcurl3.deb curl -L http://archive.ubuntu.com/ubuntu/pool/universe/c/curl3/libcurl3_7.58.0-2ubuntu2_amd64.deb -o libcurl3.deb
ar x libcurl3.deb data.tar.xz ar x libcurl3.deb data.tar.xz
tar xf data.tar.xz tar xf data.tar.xz
@ -531,14 +528,10 @@ function SaveExternal {
fi fi
} }
function GetProductType {
ProductType=$(sudo LD_LIBRARY_PATH=/usr/local/lib resources/tools/igetnonce_$platform)
[ ! $ProductType ] && read -p "[Input] Enter ProductType (eg. iPad2,1): " ProductType
}
function BasebandDetect { function BasebandDetect {
Firmware=resources/firmware/$ProductType Firmware=resources/firmware/$ProductType
BasebandURL=$(cat $Firmware/13G37/url 2>/dev/null) # iOS 9.3.6 BasebandURL=$(cat $Firmware/13G37/url 2>/dev/null) # iOS 9.3.6
Baseband=0
if [ $ProductType == iPad2,2 ]; then if [ $ProductType == iPad2,2 ]; then
BasebandURL=$(cat $Firmware/13G36/url) # iOS 9.3.5 BasebandURL=$(cat $Firmware/13G36/url) # iOS 9.3.5
Baseband=ICE3_04.12.09_BOOT_02.13.Release.bbfw Baseband=ICE3_04.12.09_BOOT_02.13.Release.bbfw
@ -566,11 +559,13 @@ function BasebandDetect {
Baseband=Mav7Mav8-7.60.00.Release.bbfw Baseband=Mav7Mav8-7.60.00.Release.bbfw
BasebandSHA1=f397724367f6bed459cf8f3d523553c13e8ae12c BasebandSHA1=f397724367f6bed459cf8f3d523553c13e8ae12c
A7Device=1 A7Device=1
else # For Wi-Fi only devices elif [ $ProductType == iPad4,1 ] || [ $ProductType == iPad4,4 ]; then
Baseband=0 A7Device=1
if [ $ProductType == iPad4,1 ] || [ $ProductType == iPad4,4 ]; then elif [ $ProductType == 'NA' ]; then
A7Device=1 Error "Please put the device in normal mode (and jailbroken for 32-bit) before proceeding." "Recovery or DFU mode is also applicable for A7 devices"
fi elif [ $ProductType != iPad2,1 ] && [ $ProductType != iPad2,4 ] && [ $ProductType != iPad2,5 ] &&
[ $ProductType != iPad3,1 ] && [ $ProductType != iPad3,4 ] && [ $ProductType != iPod5,1 ]; then
Error "Your device $ProductType is not supported."
fi fi
[ $ProductType == iPhone6,1 ] && HWModel=n51 [ $ProductType == iPhone6,1 ] && HWModel=n51
[ $ProductType == iPhone6,2 ] && HWModel=n53 [ $ProductType == iPhone6,2 ] && HWModel=n53