After some research, my current understanding of Android's boot sequence (at least on a Qualcomm device) is as follows:
PBL --> XBL (replaces SBL) --> Aboot --> Kernel
- Primary Boot Loader (sometimes called bootROM).
- First piece of code executed after device is powered on (therefore PBL is the Root of Trust)
- Built and distributed on the SoC by Qualcomm themselves
- Truly is ROM (Cannot be updated)
- Contains a public key that is used to verify the integrity of XBL. The corresponding private key is in Qualcomm's possession.
- Has access to a device-unique 256-bit auth-key that is required to write to the RPMB partition (link)
- Extended Boot Loader
- XBL supersedes the older SBL (link)
- Proprietary Qualcomm solution (i.e. provided by, and signed by Qualcomm)
- In some cases, it can be customized by OEM for a price (link)
- Lives on the eMMC (in the boot0 hardware partitions?)
- Contains a public key that is used to verify the integrity of Aboot
- Can be updated
Since it lives on the eMMC, a user with root privileges can modify it and potentially brick the device:
Note that the BOOT partitions by default are read-only as they are typically used for sensitive boot firmware. To write to them you can disable force_ro in sysfs
- Android Boot Loader
- Provided by the OEM
- Depending on the OEM, can be partially open source, or closed source (e.g. Samsung) (link)
- Must be signed (I'm assuming by the OEM and not by Qualcomm, which means that the public key in XBL must be the OEM's public key?)
- Lives on the eMMC (in the boot0 or boot1 hardware partition? Or perhaps in the User Data hardware partition)
- Contains a public key that is used to verify the integrity of the kernel/OS (aka ROM) before loading it. However if Aboot is "unlocked" any ROM can be loaded)
- Can be updated
- Since it lives on the eMMC, a user with root privileges can modify it and potentially brick the device.
In addition to the questions I sprinkled above.
Is it safe to assume that millions of Qualcomm devices all have the exact same public key programmed in PBL?
The public key in PBL cannot be changed. Correct?
If Qualcomm's private key was somehow compromised, verified boot could no longer be trusted on all affected devices permanently?