fastboot常用命令


以下为基于platform-tools_r31.0.3在mercury6的验证结果可供参考:

命令 示例 介绍 bootloader/fastbootd 是否已经支持
update fastboot update sstar_mercury6-img-eng.yi.huang.zip make dist会生成示例中的压缩包,通过update的命令烧写AB_OTA_PARTITIONS指定的分区 fastbootd 支持
flashall cd out/target/product/mercury6;fastboot flashall 编译完成后,进入到$OUT目录,该命令支持将镜像刷到所有分区 目前无法验证
flash fastboot flash boot boot.img 将镜像刷到指定分区 bootloader/fastbootd 支持
devices fastoot devices 列出当前可用的fastboot设备 bootloader/fastbootd 支持
getvar fastboot getvar all 获取fastboot var bootloader/fastbootd 支持
reboot fast boot reboot bootloader/recovery/fastboot 重启到指定状态 bootloader/fastbootd 支持
lock/unlock fastboot flashing lock/unlock 解锁获取刷机的权限 未实作
lock_critical/unlock_critical fastboot flashing lock_critical/unlock_critical 解锁获取刷bootloader分区的权限 未实作
get_unlock_ability fastboot flashing get_unlock_ability 获取当前设备是否允许解锁 未实作
erase fastboot erase misc bootloader/fastbootd 支持
format fastboot format:ext2 userdata 将分区格式化成指定文件系统 不支持
set_active fastboot set_active a 指定当前启动插槽 bootloader/fastbootd 支持
oem fastboot oem run_cmd:printenv 执行oem命令 bootloader/fastbootd 支持
gsi wipe|disable Wipe or disable a GSI installation (fastbootd only). fastbootd
wipe-super fastboot wipe-super super-empty.img 擦除super分区 fastbootd 支持
create-logical-partition fastboot create-logical-partition test_part 1024 在super分区中创建一个逻辑分区 fastbootd 支持
delete-logical-partition fastboot delete-logical-partition test_part 从super分区中删除一个逻辑分区 fastbootd 支持
resize-logical-partition fastboot delete-logical-partition test_part 2048 重新设定super分区中某个逻辑分区的大小 fastbootd 支持
snapshot-update 未支持
fetch fastboot fetch vendor_boot_a vendor_boot.img 从分区中获取镜像 fastbootd 只支持获取vendor_boot/vendor_boot_a/vendor_boot_b
boot 未支持
flash:raw 未支持
update-super <partition> host端不支持该命令
flash vendor_boot:default fastboot flash vendor_boot:default <vendor-ramdisk.img> 单刷vendor_boot中的ramdisk fastbootd 支持
flash vendor_boot:<fragment> fastboot flash vendor_boot:<foo> <vendor-ramdisk.img> 单刷vendor_boot中名为foo的fragment ramdisk fastbootd boot image header V4 特性,未支持