Android Boot
   HOME

TheInfoList



OR:

The
booting In computing, booting is the process of starting a computer as initiated via Computer hardware, hardware such as a physical button on the computer or by a software command. After it is switched on, a computer's central processing unit (CPU) h ...
process of Android devices starts at the power-on of the SoC (
system on a chip A system on a chip (SoC) is an integrated circuit that combines most or all key components of a computer or Electronics, electronic system onto a single microchip. Typically, an SoC includes a central processing unit (CPU) with computer memory, ...
) and ends at the visibility of the home screen, or special modes like recovery and fastboot. The boot process of devices that run Android is influenced by the firmware design of the SoC manufacturers.


Background

As of 2018, 90% of the SoCs of the Android market are supplied by either
Qualcomm Qualcomm Incorporated () is an American multinational corporation headquartered in San Diego, California, and Delaware General Corporation Law, incorporated in Delaware. It creates semiconductors, software and services related to wireless techn ...
,
Samsung Samsung Group (; stylised as SΛMSUNG) is a South Korean Multinational corporation, multinational manufacturing Conglomerate (company), conglomerate headquartered in the Samsung Town office complex in Seoul. The group consists of numerous a ...
or
MediaTek MediaTek Inc. (), sometimes informally abbreviated as MTK, is a Taiwanese fabless semiconductor company that designs and manufactures a range of semiconductor products, providing chips for wireless communications, high-definition television, h ...
. Other vendors include
Rockchip Rockchip (Fuzhou Rockchip Electronics Co., Ltd.) is a Chinese fabless semiconductor company based in Fuzhou, Fujian province. It has offices in Shanghai, Beijing, Shenzhen, Hangzhou and Hong Kong. It designs system on a chip (SoC) products, usi ...
, Marvell,
Nvidia Nvidia Corporation ( ) is an American multinational corporation and technology company headquartered in Santa Clara, California, and incorporated in Delaware. Founded in 1993 by Jensen Huang (president and CEO), Chris Malachowsky, and Curti ...
and previously
Texas Instruments Texas Instruments Incorporated (TI) is an American multinational semiconductor company headquartered in Dallas, Texas. It is one of the top 10 semiconductor companies worldwide based on sales volume. The company's focus is on developing analog ...
.


History

Verified boot, a booting security measure, was introduced with Android KitKat.


Stages


Primary Bootloader

The Primary Bootloader (PBL), which is stored in the
Boot ROM Boot ROM is a piece of read-only memory (ROM) that is used for booting a computer system. It contains instructions that are run after the CPU is reset to the reset vector, and it typically loads a bootloader. There are two types of boot ROM: ...
is the first stage of the boot process. This code is written by the chipset manufacturer. 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. On SoCs from Qualcomm, it is possible to enter the Qualcomm Emergency Download Mode from the primary bootloader. If the verification of the secondary bootloader fails, it will enter EDL.


Secondary Bootloader

Because the space in the boot ROM is limited, a secondary bootloader on the
eMMC MultiMediaCard, officially abbreviated as MMC, is a memory card standard used for solid-state storage. Unveiled in 1997 by SanDisk and Siemens, MMC is based on a surface-contact low-pin-count serial interface using a single memory stack subst ...
or eUFS is used. The secondary bootloader initializes TrustZone. 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. The SBL is now called XBL by Qualcomm which is an
UEFI Unified Extensible Firmware Interface (UEFI, as an acronym) is a Specification (technical standard), specification for the firmware Software architecture, architecture of a computing platform. When a computer booting, is powered on, the UEFI ...
implementation. Qualcomm uses LK (Little Kernel) plus Aboot, or XBL (eXtensible Bootloader) plus ABL; Samsung Exynos uses S-Boot; MediaTek uses
Das U-Boot Das U-Boot (subtitled "the Universal Boot Loader" and often shortened to U-Boot; see ''#History, History'' for more about the name) is an open-source software, open-source Bootloader, boot loader used in Embedded system, embedded devices to per ...
. Little Kernel is a
microkernel In computer science, a microkernel (often abbreviated as μ-kernel) is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, ...
for embedded devices, which has been modified by Qualcomm to use it as a bootloader. The Android Bootloader (Aboot or ABL) implements the fastboot interface. It verifies the authenticity of the boot and recovery partitions. By pressing a specific key combination, devices can also boot in recovery mode. Android Bootloader then transfers control to the Linux kernel.


Kernel and initramfs

The initramfs is a
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and ...
ped
cpio cpio is a general file archiver utility and its associated file format. It is primarily installed on Unix-like computer operating systems. The software utility was originally intended as a tape archiving program as part of the Programmer's Work ...
archive that contains a small root file system. It contains init, which is executed. The Android kernel is a modified version of the Linux kernel. Init does mount the partitions. dm-verity verifies the integrity of the partitions that are specified in the fstab 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.


Zygote

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 a fork() system call.


Partition layout

The Android system is divided across different partitions. The Qualcomm platform makes use of the
GUID partition table The GUID Partition Table (GPT) is a standard for the layout of partition tables of a physical computer storage device, such as a hard disk drive or solid-state drive. It is part of the Unified Extensible Firmware Interface (UEFI) standard. It ha ...
. This specification is part of the
UEFI Unified Extensible Firmware Interface (UEFI, as an acronym) is a Specification (technical standard), specification for the firmware Software architecture, architecture of a computing platform. When a computer booting, is powered on, the UEFI ...
specification, but does not depend on UEFI firmware.


See also

*
coreboot coreboot, formerly known as LinuxBIOS, is a software project aimed at replacing proprietary firmware (BIOS or UEFI) found in most computers with a lightweight firmware designed to perform only the minimum number of tasks necessary to load and r ...
*
Booting process of Windows The booting process of Microsoft Windows varies between different releases. DOS-based Windows Windows 1.x/2.x In Windows versions 1.01 to Windows 2.11, the system was loaded when WIN.COM was executed within MS-DOS. It then loaded WIN100.BI ...


Explanatory notes


References


External links


Android.com - Boot Flow

Managing Boot Time

Qualcomm Bootloaders

Qualcomm's Chain of Trust

Secure Boot and Image Authentication

Secure boot on Snapdragon 410



msm8916-mainline/qhypstub

Android system init process startup and init.rc full analysisAndroid Init Language
{{Firmware and booting Android (operating system) Booting processes Boot loaders