你好,歡迎來到IOS教程網

 Ios教程網 >> IOS教程 >> 關於IOS教程 >> 用Bash腳本阻止iTunes升級已越獄iPhone的固件(Mac)

用Bash腳本阻止iTunes升級已越獄iPhone的固件(Mac)

編輯:關於IOS教程

  聲明:Bash腳本非小編發明,請Mac用戶看好再行使用,如出現意外,請理解。如果有能力改善,歡迎聯系我們。

  眾所周知iTunes的升級固件功能有時候非常討厭,稍不注意就會點到升級,而越獄的iPhone在升級後會丟失越獄,有鎖版用戶更會丟失解鎖而變成磚頭或者Touch。下面這個腳本通過修改iTunes默認下載路徑權限等辦法避免以上情況的發生,下面就進入正式的內容(使用腳本,按文章最後的辦法將下面文字復制到TextEdit內保存成相應格式即可):

 #!/bin/bash
clear
echo "This script will chmod the download locations for Firmware Files, So iTunes can not download firmware."
echo "AKA it will prevent iTunes from auto updating your device."
echo ""
echo ""
echo "To restore firmware just hold down option and manually select the firmware file."
echo ""
clear
echo "Made By: Wesley K"
echo "
[email protected]"
echo "
http://wesleyk.me"
echo "
http://wesleyk.me/twitter"
sleep 2
read -sn 1 -p "Press any key to continue..."
clear
echo "Now I need your password to continue"
echo "Killing iTunes now"
sudo -v
sudo killall -9 iTunes
sleep 2
clear

echo "Im going to make all the folder needed to future proof a few things"
echo "If errors occur here, No big deals."
sudo mkdir ~/Library/iTunes/iPad\ Software\ Updates/
sudo mkdir ~/Library/iTunes/iPod\ Software\ Updates/
sudo mkdir ~/Library/iTunes/iPhone\ Software\ Updates/
sleep 2
clear

echo "I am going to dump all the current files in your update folders."
echo "This will prevent any updates from downloaded firmware."
sudo rm -rf ~/Library/iTunes/iPad\ Software\ Updates/*
sudo rm -rf ~/Library/iTunes/iPhone\ Software\ Updates/*
sudo rm -rf ~/Library/iTunes/iPod\ Software\ Updates/*\
sleep 2
clear

echo "Now preventing iTunes from downloading new firmwares."
sudo chmod 444 ~/Library/iTunes/iPad\ Software\ Updates
sudo chmod 444 ~/Library/iTunes/iPod\ Software\ Updates
sudo chmod 444 ~/Library/iTunes/iPhone\ Software\ Updates
sleep 2
clear

echo "Made By Wesley K"
echo "Give me credit if you use it"
echo "For safe measures I would run this script after iTunes updates, It shouldn't affect it but I don't know yet."

  在TextEdit內容,找到Format > Make Plain Text。之後將文件保存在任意不會被刪除或者更改的地址即可。 文件名保存為blockitunesupdates.sh或者阻止iTunes升級iPhone固件.sh也可以,隨便,只要格式是.sh。

  然後打開終端,使用chmod +x 文件名的命令給予腳本執行權限,執行時只要將此.sh文件拖入終端(Terminal)窗口後點擊回車或者Return並注意按提示操作即可。

  當然,在升級iTunes、OS X或者使用Disk Utility修復文件權限後,可能要重新運行此腳本一次。若想取消此腳本,將腳本中的444都改為755後再執行一次就可以。相信對於很多使用Mac系統的朋友來說,都很容易。

  1. 上一頁:
  2. 下一頁:
蘋果刷機越獄教程| IOS教程問題解答| IOS技巧綜合| IOS7技巧| IOS8教程
Copyright © Ios教程網 All Rights Reserved