> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 Fastboot 烧录软件

Fastboot 允许您烧录软件镜像（例如引导加载程序），并有助于系统恢复。

Linux 和 Windows 主机均支持 Fastboot。要进入 Fastboot 模式，可以使用 Fastboot 热键。

## **使用热键进入 Fastboot**

设备上电后，按下 VOL-。

下图显示了设备进入 Fastboot 模式时的 Fastboot 日志。

<div style={{ textAlign: 'center', width: '100%' }}>
  <img src="https://mintcdn.com/qualcomm-prod/eYaEBFH0xlFq53OY/System/Boot/media/k2c-qli-boot/fastboot-dectection.PNG?fit=max&auto=format&n=eYaEBFH0xlFq53OY&q=85&s=a0476acf1ba308d3ecb2aee19c405837" alt="Fastboot 检测" style={{ display: 'block', margin: '0 auto' }} width="646" height="417" data-path="System/Boot/media/k2c-qli-boot/fastboot-dectection.PNG" />
</div>

## **Fastboot 命令**

当系统检测到 Fastboot 模式后，您可以运行相应的 Fastboot 命令。

<Frame caption="**表：Fastboot 命令**" />

| **命令**                                                        | **用法**                                                                                                                                                                                                                               | **示例或使用场景**                                                                                                                                                                         |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fastboot reboot`                                             | 允许您重启设备。                                                                                                                                                                                                                             | 示例命令：<br /><br />`fastboot reboot`<br /><br />在以下情况后可能需要重启系统：<br /><ul><li>烧录软件镜像后</li><li>完成软件更新后</li></ul>                                                                        |
| `fastboot devices`                                            | 如果识别并连接到设备，Fastboot 会显示设备信息。                                                                                                                                                                                                         | 示例命令：<br /><br />`fastboot devices`                                                                                                                                                 |
| `fastboot getvar <variable>`                                  | 从各个分区检索数据。<br /><br />以下是支持的 `getvar` 命令。<br /><ul><li>`fastboot getvar partition-size:system`</li><li>`fastboot getvar partition-size:xbl_a`</li><li>`fastboot getvar kernel`</li><li>`fastboot getvar max-download-size`</li></ul> | Fastboot 支持多个变量。可通过此命令检索这些变量的数据。<br /><br />示例命令：<br /><br />`fastboot getvar version`                                                                                              |
| `fastboot flash <partition name> <full path to the SW image>` | 烧录软件镜像。                                                                                                                                                                                                                              | 要烧录 `xbl_config.elf` 镜像，请运行：<br /><br />`fastboot flash xbl_config_a xbl_config.elf`<br /><br />其中：<br /><ul><li>`xbl_config_a` 表示分区标签</li><li>`xbl_config.elf` 是要烧录的软件镜像</li></ul> |
| `fastboot erase`                                              | 擦除分区。                                                                                                                                                                                                                                | 示例命令：<br /><br />`fastboot erase xbl_config_a`<br /><br />擦除 `xbl_config_a` 分区。                                                                                                     |
| `fastboot continue`                                           | 继续启动过程。                                                                                                                                                                                                                              | 示例命令：<br /><br />`fastboot continue`<br /><br />启动操作系统。                                                                                                                             |

## **使用 Fastboot 进行恢复**

当 systemd-boot 镜像和 ESP 损坏时，Fastboot 可作为恢复解决方案。

systemd-boot 镜像从 EFI 系统分区（ESP）启动。在这种情况下，Fastboot 会自动作为恢复选项启动，允许您重新烧录 ESP。
