手机刷机调试命令:fastboot详细说明,版本:29.0.4-5871666

开机引导模式下使用。此文说明主要适用android 6.0及以上版本

下载以下几个文件,CMD命令窗口切换到此目录就可使用了,当然还要安装USB驱动、打开USB调试(可选):

手机刷机调试命令:fastboot详细说明,版本:29.0.4-5871666

adb工具

怎么进入此模式

  • 手机端:电源键+音量减/加
  • 电脑端:用ADB工具,命令:adb reboot bootloader

格式: fastboot [OPTION…] COMMAND…

版本:与1.0.41版的adb适应

flashing: 写入命令

update ZIP : Flash all partitions from an update.zip package. 如fastboot update xxx.zip , xxx.zip中包含boot.img, recovery.img, system.img等镜像文件

flashall : Flash all partitions from $ANDROID_PRODUCT_OUT. On A/B devices, flashed slot is set as active. Secondary images may be flashed to inactive slot. 会自动搜索当前目录下的所有img文件,将它们都刷入系统对应分区。

flash PARTITION [FILENAME] : Flash given partition, using the image from $ANDROID_PRODUCT_OUT if no filename is given. 这里的PARTITION有boot/recovery/system/userdata/cache等

fastboot flash boot boot.img 将当前目录下的boot.img文件刷进系统的boot分区fastboot flash recovery recovery.img 将当前目录下的recovery.img文件刷进系统的recovery分区例子:c:tmpfastboot>fastboot flash boot C:tmpF103_BAKboot20220118.imgSending 'boot' (16384 KB) OKAY [ 1.583s]Writing 'boot' OKAY [ 0.355s]Finished. Total time: 2.011sc:tmpfastboot>fastboot flash recovery C:tmpF103_BAKrecovery20220118.imgSending 'recovery' (16384 KB) OKAY [ 1.584s]Writing 'recovery' OKAY [ 0.354s]Finished. Total time: 2.001s

basics:

devices [-l] : List devices in bootloader (-l: with device paths).

c:tmpfastboot>fastboot devices000007CF00632D90 fastboot 显示以fastboot结尾的设备号c:adbadb32>adb devices* daemon not running. starting it now on port 5037 ** daemon started successfully *List of devices attached8T8HBIZSBU9PCM4S device adb时显示以device结尾

getvar NAME : Display given bootloader variable.

reboot [bootloader] : Reboot device.

fastboot reboot 重新启动到正常模式fastboot reboot bootloader 重新启动到引导模式fastboot reboot recovery 重新启动到恢复模式例子:c:tmpfastboot>fastboot reboot bootloader android 5.0及以上可用此命令Rebooting into bootloader OKAY [ 0.003s]Finished. Total time: 0.007sc:tmpfastboot>fastboot rebootRebooting OKAY [ 0.002s]Finished. Total time: 0.006s

locking/unlocking:上锁/解锁命令,将会删除个人数据

flashing lock|unlock : Lock/unlock partitions for flashing

fastboot flashing lock 给BL上锁fastboot flashing unlock 解BL锁

flashing lock_critical|unlock_critical : Lock/unlock 'critical' bootloader partitions.

flashing get_unlock_ability : Check whether unlocking is allowed (1) or not(0).

advanced:

erase PARTITION : Erase a flash partition.

format[:FS_TYPE[:SIZE]] PARTITION : Format a flash partition.

set_active SLOT : Set the active slot.

oem [COMMAND…] : Execute OEM-specific command. 这里的command主要是自定义的命令(慎用)。高版本的系统可用fastboot oem help 查询有效的命令。

android 6.0以前:fastboot oem lock 上BL锁fastboot oem unlock 解BL锁c:tmpfastboot>fastboot oem unlock OKAY [ 30.582s]Finished. Total time: 30.591s另一个手机的解锁:c:tmpfastboot>fastboot oem unlock (bootloader) Start unlock flowOKAY [ 29.972s]Finished. Total time: 29.983sc:tmpfastboot>fastboot oem lock (bootloader) Start lock flowOKAY [ 43.440s]Finished. Total time: 43.449sC:tmpfastboot-1>fastboot oem reboot-recovery 重启到recovery模式 OKAY [ 0.003s]Finished. Total time: 0.050s还有:fastboot oem reboot-bootloader
查询设备BL上锁情况:fastboot oem get_bootinfo 此处的get_bootinfo是用户自定义命令C:tmpfastboot>fastboot oem device-info (bootloader) Verity mode: true(bootloader) Device unlocked: false(bootloader) Device critical unlocked: false(bootloader) Charger screen enabled: trueOKAY [ 0.013s]Finished. Total time: 0.018s

gsi wipe|disable : Wipe or disable a GSI installation (fastbootd only).

wipe-super [SUPER_EMPTY] : Wipe the super partition. This will reset it to contain an empty set of default dynamic partitions.

boot image: 用指定镜像文件临时启动系统,不会更改原系统的启动文件,如利用magisk加入root权限的boot文件启动

boot KERNEL [RAMDISK [SECOND]] : Download and boot kernel from RAM.

用magisk_patched-23000_EJX2G.img(加了面具的boot.img)启动手机例子:C:tmpfastboot>fastboot boot C:tmpfastbootmagisk_patched-23000_EJX2G.imgSending 'boot.img' (16384 KB) OKAY [ 1.573s]Booting OKAY [ 0.060s]Finished. Total time: 1.678s

flash:raw PARTITION KERNEL [RAMDISK [SECOND]] : Create boot image and flash it.

–dtb DTB : Specify path to DTB for boot image header version 2.

–cmdline CMDLINE : Override kernel command line.

–base ADDRESS : Set kernel base address (default: 0x10000000).

–kernel-offset : Set kernel offset (default: 0x00008000).

–ramdisk-offset : Set ramdisk offset (default: 0x01000000).

–tags-offset : Set tags offset (default: 0x00000100).

–dtb-offset : Set dtb offset (default: 0x01100000).

–page-size BYTES : Set flash page size (default: 2048).

–header-version VERSION : Set boot image header version.

–os-version MAJOR[.MINOR[.PATCH]] : Set boot image OS version (default: 0.0.0).

–os-patch-level YYYY-MM-DD : Set boot image OS security patch level.

Android Things:

stage IN_FILE : Sends given file to stage for the next command.

get_staged OUT_FILE : Writes data staged by the last command to a file.

options: 选项参数

-w : Wipe userdata.

-s SERIAL : Specify a USB device.

-s tcp|udp:HOST[:PORT] : Specify a network device.

-S SIZE[K|M|G] : Break into sparse files no larger than SIZE.

–force : Force a flash operation that may be unsafe.

–slot SLOT : Use SLOT; 'all' for both slots, 'other' for non-current slot (default: current active slot).

–set-active[=SLOT] : Sets the active slot before rebooting.

–skip-secondary : Don't flash secondary slots in flashall/update.

–skip-reboot : Don't reboot device after flashing.

–disable-verity : Sets disable-verity when flashing vbmeta.

–disable-verification : Sets disable-verification when flashing vbmeta.

–unbuffered : Don't buffer input or output.

–verbose, -v : Verbose output.

–version : Display version.

–help, -h : Show this message.

本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:dandanxi6@qq.com

(0)
上一篇 2022-11-27 13:27
下一篇 2022-11-27 13:37

相关推荐

  • 猛虎突击队全集(最新台儿庄战役电影)

    铁血柔情 书写小人物的抗战传奇 《猛虎突击队》 广西影视频道 5月19日起 每天18:00精彩呈现 徐佳、杨舒主演 本剧由徐佳、杨舒领衔主演,讲述了1938年台儿庄大捷前夕,国民党…

    2023-05-17
  • 火影忍者里鬼鲛隐藏了多少实力

    鬼鲛,前忍刀七人众之一,后成为晓组织的一员,跟宇智波鼬组成一队。拥有神兵鲛肌,也因此鬼鲛拥有庞大的查克拉,被称为:“无尾尾兽”,论火影第一猛男,恐怕鲛哥当之无愧的第一人,可惜反派注…

    2023-09-25
  • 硬拉会发力姿势是不是比较简单

    硬拉加强::一又二分之一硬拉 硬拉是一个黄金动作,它能锻炼我们全身肌群,帮助我们构建强悍的身躯! 不管你的运动目标是增加肌肉,力量,燃烧脂肪,还是提升运动表现,硬拉都是一个你不容错…

    2023-07-07
  • 试想一个女生的世界里有一个李大仁是什么感受

    曾听过这样的话:十年修得柯景腾,百年修得王小贱,千年修得李大仁,万年修得陆励成,亿年修得何以琛 如果作为一个女生你的身边有一个李大仁, 他不高不帅不矮不胖很平凡 。你开心的时候你基…

    2022-12-13
  • 耳顺之年是指什么年龄

    “耳顺”之年是指什么年龄?这是蚂蚁庄园11月11号今日庄园小课堂的问题,很多用户还不知道答案,本文小编会为大家详细介绍11月11日今天蚂蚁庄园课堂小鸡饲料答案。 蚂蚁庄园回答知识送…

    2022-12-10
  • 飞线充电是风险还是隐患

    电动自行车的违规充电现象令人担忧。 曝光台 广州日报讯 (全媒体记者全杰 摄影报道)电动自行车充电安全问题,受到社会广泛关注和深思。近日,记者跟随有关部门走访多区看到,市民对于电动…

    2023-07-08
  • 2021高考落榜生的八种出路

    高考结束已过去了一段时间,高中或是落榜早已尘埃落定,俗话说过去的就让它过去,放眼未来才最重要!高考决定不了人生,一时的失利不能说明太多事情。今天左老师就给大家说说高考落榜生的8大出…

    2022-12-06
  • 哪些工作需要经常出差(哪种工作是需要经常出差的)

    1、销售或者商务拓展BD 出差强度:高 这个职业不用说了,肯定适合那些想要经常跑动领略各地风情的筒子们,销售以完成既定的销售目标为己任。 职业要求:沟通能力强、服务意识好、形象气质…

    用户投稿 2023-01-27
  • 你知道书籍的开本应用了哪些学问吗英语

    我们几乎天天和书本打交道,但你注意过书本扉页上的开本标识字样吗?这其中蕴藏着不少学问。 书本扉页常见的“787×1092,1/32”标识字样中,“787×1092”表示的是全张纸的…

    2022-12-16
  • 17张图,17个成语,能猜对一半的人就很了不起

    “齐人之福”是什么福? “上下其手”是什么手? “不贪为宝”是什么宝? 这些成语的意思,你真的知道吗?反正,诗词君有点懵。 18个成语挑战,听说能猜对意思的人不到1%,要不,你也来…

    2022-12-11