With the main system RAM fully online, the device transitions to the Secondary Bootloader stage. Because main memory is now available, the bootloaders in this stage can be significantly larger and more complex.
In modern Android devices (especially those using Qualcomm processors), the "Secondary Bootloader" is actually a sequence of several different programs, specifically the XBL and the ABL.
The Extensible Bootloader (XBL)
The XBL (Extensible Bootloader) is the first major software component to run securely in main RAM. It is typically based on the UEFI (Unified Extensible Firmware Interface) standard, conceptually similar to modern PC BIOS systems.
XBL Responsibilities
- Complex Hardware Init: It initializes the USB controllers, the display panel, and the physical buttons (Volume/Power).
- TrustZone Setup: It sets up the highly secure ARM TrustZone environment, which is an isolated hardware enclave used for storing biometric data (fingerprints) and encryption keys securely away from the main OS.
- Partition Table Parsing: It reads the GUID Partition Table (GPT) from the flash storage to figure out where exactly all the Android partitions (like
boot,system, andvendor) are physically located.
The Android Bootloader (ABL)
Once the XBL has mapped out the storage and initialized the hardware, it loads the ABL (Android Bootloader).
The ABL is the first bootloader stage that is actually aware of the Android operating system. While the XBL just sees raw flash storage blocks, the ABL understands Android-specific concepts like partitions and boot modes.
ABL Responsibilities
- A/B Slot Selection: On devices supporting Seamless Updates, the ABL strictly checks the boot control flags to determine whether it should boot from Slot A or Slot B.
- Verified Boot (AVB): The ABL begins the Android Verified Boot chain. It reads the
vbmetapartition to verify the cryptographic signatures of thebootandsystempartitions. - Fastboot Protocol: If the user holds the Volume Down key while powering on, the ABL intercepts the boot process and starts the Fastboot server. This allows a developer to connect a USB cable and flash new partition images.
- Loading the Kernel: If the user is booting normally, the ABL extracts the Linux kernel from the
bootpartition, places it into RAM, passes it the kernel command line parameters, and executes it.
# You interact directly with the ABL when using the fastboot tool
fastboot getvar all
At this point, the hardware bootloader stages are completely finished, and the Linux kernel takes total control of the device.