刷機工具-fastboot

1、見到網上一篇刷樂phone的帖子很好所以記錄下來:        

adb devices查看已連接設備

adb reboot-bootloader 讓手機進入fastboot模式

fastboot devices可以看到設備列表

用下面的命令燒寫boot、systerm、和userdata

       fastboot flash boot path\boot.img

       fastboot flash system path\system.img

       fastboot flash  userdata path\userdata.img

然後用fastboot reboot重啓設備

2、fastboot相關使用

Android手機分區(每個分區都有相應的img文件對應):開機啓動畫面區(splash1),數據恢復區(recovery),內核區(boot),
系統區(system),數據緩存區(cache),用戶數據區(userdata)。
1. 查看fastboot命令的幫助:
fastboot

顯示如下信息:
usage: fastboot [ <option> ] <command>  
commands:  
update <filename>   reflash device from update.zip  
flashall    "flash boot" + "flash system"
flash <partition> [ <filename> ] write a file to a flash partition  
erase <partition>   erase a flash partition  
getvar <variable>   display a bootloader variable  
boot <kernel> [ <ramdisk> ]  download and boot kernel  
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it  
devices     list all connected devices  
reboot     reboot device normally  
reboot-bootloader   reboot device into bootloader  
options:  
-w     erase userdata and cache  
-s <serial number>   specify device serial number  
-p <product>    specify product name  
-c <cmdline>    override kernel commandline  
-i <vendor id>    specify a custom USB vendor id  

2. 擦除分區:

fastboot erase {partition}   例:fastboot erase boot或fastboot erase system等。

fastboot oem format  進行格式化

fastboot erase cache 清除cache

3. 燒寫指定分區:
fastboot flash {partition} {*.img}   例:fastboot flash boot boot.img或fastboot flash system system.img等。
4. 燒寫所有分區:
fastboot flashall   注意:此命令會在當前目錄中查找所有img文件,將這些img文件燒寫到所有對應的分區中,並重新啓動手機。
5. 一次燒寫boot,system,recovery分區:
(1)創建包含boot.img,system.img,recovery.img文件的zip包。
(2)執行:fastboot update {*.zip}
6. 燒寫開機畫面:
fastboot flash splash1 開機畫面
7. 重啓手機:
fastboot reboot
發佈了25 篇原創文章 · 獲贊 111 · 訪問量 50萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章