Fix issues

This commit is contained in:
LukeeGD 2019-12-04 17:07:56 +08:00
parent 645608eda1
commit b035bea1ba

View File

@ -171,9 +171,9 @@ function SaveOTABlobs {
} }
function Downgrade { function Downgrade {
IPSW="${ProductType}_${DowngradeVersion}_${DowngradeBuildVer}_Restore.ipsw" IPSW="${ProductType}_${DowngradeVersion}_${DowngradeBuildVer}_Restore"
if [ ! -e ${IPSW} ] if [ ! -e ${IPSW}.ipsw ]
then then
echo "iOS $DowngradeVersion IPSW is missing! Please put the IPSW on the same directory of this script" echo "iOS $DowngradeVersion IPSW is missing! Please put the IPSW on the same directory of this script"
exit exit
@ -203,7 +203,7 @@ function Downgrade {
fi fi
echo "Extracting $DowngradeVersion IPSW..." echo "Extracting $DowngradeVersion IPSW..."
unzip -q ${IPSW} -d "$IPSW/" unzip -q ${IPSW}.ipsw -d "$IPSW/"
cp $IPSW/Firmware/dfu/$iBSS.dfu tmp/ cp $IPSW/Firmware/dfu/$iBSS.dfu tmp/
echo echo
@ -216,10 +216,10 @@ function Downgrade {
do do
if [[ ! $NoBaseband ]] if [[ ! $NoBaseband ]]
then then
sudo env "LD_PRELOAD=libcurl.so.3" tools/futurerestore_$platform -t $SHSH --latest-baseband --use-pwndfu ${IPSW} sudo env "LD_PRELOAD=libcurl.so.3" tools/futurerestore_$platform -t $SHSH --latest-baseband --use-pwndfu ${IPSW}.ipsw
else else
echo "Detected device has no baseband" echo "Detected device has no baseband"
sudo env "LD_PRELOAD=libcurl.so.3" tools/futurerestore_$platform -t $SHSH --no-baseband --use-pwndfu ${IPSW} sudo env "LD_PRELOAD=libcurl.so.3" tools/futurerestore_$platform -t $SHSH --no-baseband --use-pwndfu ${IPSW}.ipsw
fi fi
echo echo
@ -239,16 +239,16 @@ function Downgrade {
function pwnDFUSelf { function pwnDFUSelf {
DowngradeVersion="8.4.1" DowngradeVersion="8.4.1"
IPSW="${ProductType}_8.4.1_12H321_Restore.ipsw" IPSW="${ProductType}_8.4.1_12H321_Restore"
iBSS="iBSS.$HardwareModelLower.RELEASE" iBSS="iBSS.$HardwareModelLower.RELEASE"
iv=iv_$HardwareModelLower iv=iv_$HardwareModelLower
key=key_$HardwareModelLower key=key_$HardwareModelLower
if [ ! -e ${IPSW} ] if [ ! -e ${IPSW}.ipsw ]
then then
echo "Please provide an iOS 8.4.1 IPSW for your device to get to pwnDFU mode" echo "Please provide an iOS 8.4.1 IPSW for your device to get to pwnDFU mode"
else else
echo "Extracting iBSS from IPSW..." echo "Extracting iBSS from IPSW..."
unzip -j ${IPSW} Firmware/dfu/$iBSS.dfu -d "tmp/" unzip -j ${IPSW}.ipsw Firmware/dfu/$iBSS.dfu -d "tmp/"
pwnDFU pwnDFU
fi fi
} }
@ -390,7 +390,7 @@ function Ubuntu1804 {
rm -rf tmp rm -rf tmp
} }
if [ ! $(which bspatch) ] || [ ! $(which ideviceinfo) ] || [ ! $(which ssh) ] || [ ! $(which scp) ] if [ ! $(which bspatch) ] || [ ! $(which ideviceinfo) ] || [ ! $(which ssh) ] || [ ! $(which scp) ] || [ ! $(which lsusb) ]
then then
echo "Install dependencies" echo "Install dependencies"
@ -419,6 +419,7 @@ then
brew install --HEAD libimobiledevice brew install --HEAD libimobiledevice
brew install libzip brew install libzip
brew install openssl brew install openssl
brew install lsusb
else else
echo "Distro not detected/supported. Please select manually" echo "Distro not detected/supported. Please select manually"
select opt in "Ubuntu 16.04" "Ubuntu 18.04" "Arch Linux" "macOS"; do select opt in "Ubuntu 16.04" "Ubuntu 18.04" "Arch Linux" "macOS"; do