標籤:android blog http 使用 檔案 2014
前言一直在刷機、失敗、刷機、失敗中,還好今天有個任務可以使用fastboot刷機,好開心,終於不用切換系統了。(話說好久沒有寫代碼了,身為一個互連網程式員,不寫代碼我容易緊張)。
開發環境Ubuntu13.10,配置好Android的開發環境即可。具體配置可參考:http://blog.csdn.net/wzy_1988/article/details/37737255
Fastboot模式刷機使用fastboot刷機主要是刷boot.img、system.img和userdata.img檔案,下面分別介紹一下對應的刷機命令。以下所有命令均需要使用sudo命令提權。
進入Fastboot模式首先,確保你的手機能夠adb串連,然後通過adb執行如下指令進入Fastboot模式,命令如下:
sudo adb reboot-bootloader
稍等片刻,手機會重啟進入Fastboot模式,查看通過如下命令進行確認:
sudo fastboot devices
刷img檔案1. 刷boot.img指令
sudo fastboot flash boot boot.img
執行結果:
sending 'boot' (8628 KB)...OKAY [ 0.483s]writing 'boot'...OKAY [ 0.734s]finished. total time: 1.225s
2. 刷system.img指令
sudo fastboot flash system system.img
執行結果:
erasing 'system'...OKAY [ 0.829s]sending 'system' (648865 KB)...OKAY [ 20.588s]writing 'system'...OKAY [ 44.143s]finished. total time: 65.585s
3. 刷userdata.img指令
sudo fastboot flash userdata userdata.img
執行結果:
erasing 'userdata'...OKAY [ 7.427s]sending 'userdata' (179803 KB)...OKAY [ 5.881s]writing 'userdata'...OKAY [ 11.874s]finished. total time: 25.182s
4. 重啟手機即可
sudo fastboot reboot
後記img檔案沒問題的話,刷完重啟後就可以看到新的系統了,enjoy!