Linux下使用Fastboot給手機刷機

來源:互聯網
上載者:User

標籤: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!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.