Fastboot 快速启动
Fastboot 是一种线刷,就是使用 USB 数据线连接手机的一种刷机模式。
是比卡刷(recovery) 更底层、更可靠、更安全的刷机模式。
(Recovery 是一种卡刷,就是将刷机包放在 SD 卡上,然后在 recovery 模式中进行刷机)
如何进入 fastboot 模式
adb reboot bootloader 或 adb reboot-bootloader
Fastboot 命令详解:
使用方式: fastboot [ <选项> ] <命令>
命令:
update <filename> 通过官方的 update.zip 升级系统
flashall flash boot + recovery + system
flash <partition> [ <filename> ] 将文件写入分区。
文件必须是正确的格式;
分区名有但不限于 system,userdata,recovery 等。
erase <partition> 清空一个分区
format <partition> 格式化一个分区
getvar <variable> 显示一个启动参数
boot <kernel> [ <ramdisk> ] 将电脑上的内核下载到手机并用该内核启动系统
flash:raw boot <kernel> [ <ramdisk> ] 创建 boot.img 并下载到手机启动系统
devices 列出所有与电脑连接的设备
continue continue with autoboot
reboot 正常启动系统
reboot-bootloader 启动系统到 bootloader
help 显示帮助信息
选项:
-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
-b <base_addr> specify a custom kernel base address
-n <page size> specify the nand page size. default: 2048
附:
Fast 命令实例:
进入 fastboot 模式:
adb reboot bootloader 或 adb reboot-bootloader
罗列 fastboot 下的所有设备:
fastboot devices (可用于查看设备是否连上)
擦出分区:
fastboot erase xxxx
fastboot erase boot (擦出 boot 分区)
fastboot erase system (擦出 sysem 分区)
fastboot erase userdata (擦出 userdata 分区)
fastboot erase recovery (擦出 recovery 分区)
烧制:
fastboot flash bootloader bootloader.img
fastboot flash boot boot.img (烧制内核)
fastboot flash system system.img (烧制系统)
fastboot flash userdata userdata.img (烧制用户数据)
fastboot flash recovery recovery.img
重启设备:
fastboot reboot