Thebooting process ofAndroid devices starts at the power-on of the SoC (system on a chip) and ends at the visibility of thehome screen, or special modes likerecovery,fastboot, orOdin mode for Samsung devices.[a] The boot process of devices that run Android is influenced by the firmware design of the SoC manufacturers.
As of 2018, 90% of the SoCs of the Android market are supplied by eitherQualcomm,Samsung orMediaTek.[1] Other vendors includeUNISOC,Rockchip,Marvell,Nvidia and previouslyTexas Instruments.
Verified boot, abooting security measure, was introduced withAndroid KitKat.[2]
The Primary Bootloader (PBL), which is stored in theBoot ROM[3] is the first stage of the boot process. This code is written by the chipset manufacturer.[4]
The PBL verifies the authenticity of the next stage.
On Samsung smartphones, the Samsung Secure Boot Key (SSBK) is used by the boot ROM to verify the next stages.[5]
On SoCs from Qualcomm, it is possible to enter theQualcomm Emergency Download Mode from the primary bootloader.
If the verification of the secondary bootloader fails, it will enter EDL.[6][7]
Because the space in the boot ROM is limited, a secondary bootloader on theeMMC oreUFS is used.[8] The secondary bootloader initializesTrustZone.[8][9]
On the Qualcomm MSM8960 for example, the Secondary Bootloader 1 loads the Secondary Bootloader 2. The Secondary Bootloader 2 loads TrustZone and the Secondary Bootloader 3.[10]
The SBL is now called XBL by Qualcomm which is anUEFI implementation.
Qualcomm uses LK (Little Kernel) plus Aboot, or XBL (eXtensible Bootloader) plus ABL; Samsung Exynos uses S-Boot; MediaTek usesDas U-Boot.[1] Little Kernel is amicrokernel forembedded devices, which has been modified by Qualcomm to use it as a bootloader.[11] The Android Bootloader (Aboot or ABL) implements thefastboot interface. It verifies the authenticity of the boot and recovery partitions.[4] By pressing a specific key combination, devices can also boot inrecovery mode. Android Bootloader then transfers control to the Linux kernel.
Theinitramfs is agzippedcpio archive that contains a small root file system. It containsinit, which is executed. The Android kernel is a modified version of the Linux kernel. Init then mounts the partitions.dm-verity verifies the integrity of the partitions that are specified in thefstab file. dm-verity is a Linux kernel module that was introduced by Google in Android since version 4.4. The stock implementation only supports block based verification, but Samsung has added support for files.[9]
Zygote is spawned by the init process, which is responsible for starting Android applications and service processes. It loads and initializes classes that are supposed to be used very often into the heap. For example, dex data structures of libraries. After Zygote has started, it listens for commands on a socket. When a new application is to be started, a command is sent to Zygote, which executes afork() system call.[citation needed]
The Android system is divided across differentpartitions.[12]
The Qualcomm platform makes use of theGUID partition table. This specification is part of theUEFI specification, but does not depend on UEFI firmware.[13]
{{cite book}}: CS1 maint: multiple names: authors list (link){{cite book}}: CS1 maint: location missing publisher (link)