> ## 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.

# Update the device firmware

Capsule update mechanism is used to update the device firmware. This process uses a capsule update file, prepares the device, installs the update package, and restarts it.

The capsule file contains the update payload and the system firmware processes it during reboot.

This process is efficient and maintains the integrity of the device firmware.

## **Capsule update procedure**

To update the device firmware through a capsule, do the following:

1. **Preparation**: Create a capsule containing the firmware update.
2. **Staging**: The system copies the capsule to the `/EFI/UpdateCapsule/\<capsule\>.cap` file in EFI system partition (ESP), before OS triggers capsule update. Create a directory "UpdateCapsule" under `/EFI` directory if not available already.
3. **Reboot**: The OS triggers the capsule update and restarts the system to enter the UEFI environment.
4. **Update initiation**: The UEFI firmware detects the capsule and starts the update process.
5. **Verification**: The firmware checks the capsule integrity and authenticity.
6. **Installation**: The system updates the firmware using the capsule data.
7. **Completion**: The system reboots again to complete the update.

The capsule update is not triggered for advanced variants until the system sets `OsIndications`. If the `OsTrialBootStatus` variable is present, see [Capsule update for base and advanced variants](./update-capsule-and-trial-boot-rollback-for-base-and-variants).

## **Next steps**

* [Process the capsule](./set-up-the-capsule)
* [Capsule update and trial boot rollback for base and advanced variants](./update-capsule-and-trial-boot-rollback-for-base-and-variants)
