Booting process of Android devices

Short description: Boot for Android devices

The booting process of Android devices starts at the power-on of the SoC (system on a chip) and ends at the visibility of the home screen, or special modes like recovery and fastboot.[lower-alpha 1] The boot process of devices that run Android is influenced by the firmware design of the SoC manufacturers.

## Contents

* 1 Background
* 2 History
* 3 Stages
* 3.1 Primary Bootloader
* 3.2 Secondary Bootloader
* 3.3 Aboot
* 3.4 Kernel and initramfs
* 3.5 Zygote
* 4 Partition layout
* 5 See also
* 6 Explanatory notes
* 7 References
* 8 External links

## Background

As of 2018, 90% of the SoCs of the Android market are supplied by either Qualcomm, Samsung or MediaTek.[1] Other vendors include Rockchip, Marvell, Nvidia and previously Texas Instruments.

## History

Verified boot was introduced with Android KitKat.[2]

## Stages

### Primary Bootloader

The Primary Bootloader (PBL), which is stored in the Boot ROM[3] is the first stage of the boot process. This code is written by the chipset manufacturer.[4]

The PBL verifies the authenticly 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 the Qualcomm Emergency Download Mode from the primary bootloader.

If the verification of the secondary bootloader fails, it will enter EDL.[6][better source needed]

### Secondary Bootloader

Because the space in the boot ROM is limited, a secondary bootloader on the eMMC or eUFS is used.[7] The secondary bootloader initializes TrustZone.[7][8]

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.[9]

The SBL is now called XBL by Qualcomm and uses UEFI to be cross compatible for booting operating systems other than Android in the second stage.

### Aboot

Qualcomm uses Little Kernel, MediaTek uses Das U-Boot.[1] Little Kernel is a microkernel for embedded devices, which has been modified by Qualcomm to use it as an Android bootloader.[10] The Android Bootloader (Aboot), which implements the fastboot interface (which is absent in Samsung devices). Aboot verifies the authenticity of the boot and recovery partitions.[4] By pressing a specific key combination, devices can also boot in recovery mode. Aboot then transfers control to the Linux kernel.

### Kernel and initramfs

The initramfs is a gzip'ed cpio 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.[8]

### 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 applications starts, a command is sent to Zygote which executes a fork() system call.[citation needed]

## Partition layout

The Android system is divided across different partitions.[11]

The Qualcomm platform makes use of the GUID partition table. Although this specification is part of the UEFI specification, it does not depend on UEFI.[12]

## See also

* coreboot
* Booting process of Windows

## Explanatory notes

1. ↑ These modes tend to support a feature to resume regular booting

## References

1. ↑ 1.0 1.1 Garri, Khireddine; Kenaza, Tayeb; Aissani, Mohamed (October 2018). "A Novel approach for bootkit detection in Android Platform". 2018 International Conference on Smart Communications in Network Technologies (SaCoNeT) (IEEE): 277–282. doi:10.1109/saconet.2018.8585583. ISBN 978-1-5386-9493-0. http://dx.doi.org/10.1109/saconet.2018.8585583.
2. ↑ "Android Verified Boot [LWN.net"]. https://lwn.net/Articles/638627/.
3. ↑ Yuan, Pengfei; Guo, Yao; Chen, Xiangqun; Mei, Hong (March 2018). "Device-Specific Linux Kernel Optimization for Android Smartphones". 2018 6th IEEE International Conference on Mobile Cloud Computing, Services, and Engineering (MobileCloud): 65–72. doi:10.1109/MobileCloud.2018.00018. ISBN 978-1-5386-4879-7. https://ieeexplore.ieee.org/document/8350440.
4. ↑ 4.0 4.1 Hay, Roee (2017-08-14). "fastboot oem vuln: android bootloader vulnerabilities in vendor customizations". Proceedings of the 11th USENIX Conference on Offensive Technologies. WOOT'17 (Vancouver, BC, Canada: USENIX Association): 22. https://dl.acm.org/doi/10.5555/3154768.3154790.
5. ↑ Alendal, Gunnar; Dyrkolbotn, Geir Olav; Axelsson, Stefan (2018-03-01). "Forensics acquisition — Analysis and circumvention of samsung secure boot enforced common criteria mode" (in en). Digital Investigation 24: S60–S67. doi:10.1016/j.diin.2018.01.008. ISSN 1742-2876. https://www.sciencedirect.com/science/article/pii/S1742287618300409.
6. ↑ "Exploiting Qualcomm EDL Programmers (1): Gaining Access & PBL Internals" (in en). 2018-01-22. https://alephsecurity.com/2018/01/22/qualcomm-edl-1/.
7. ↑ 7.0 7.1 Yuan, Pengfei; Guo, Yao; Chen, Xiangqun; Mei, Hong (March 2018). "Device-Specific Linux Kernel Optimization for Android Smartphones". 2018 6th IEEE International Conference on Mobile Cloud Computing, Services, and Engineering (MobileCloud) (IEEE): 65–72. doi:10.1109/mobilecloud.2018.00018. ISBN 978-1-5386-4879-7. http://dx.doi.org/10.1109/mobilecloud.2018.00018.
8. ↑ 8.0 8.1 Kanonov, Uri; Wool, Avishai (2016-10-24). "Secure Containers in Android". Proceedings of the 6th Workshop on Security and Privacy in Smartphones and Mobile Devices. SPSM '16 (New York, NY, USA: ACM): 3–12. doi:10.1145/2994459.2994470. ISBN 9781450345644. http://dx.doi.org/10.1145/2994459.2994470.
9. ↑ Tao, Chen, Yue Zhang, Yulong Wang, Zhi Wei (2017-07-17). Downgrade Attack on TrustZone. OCLC 1106269801. http://worldcat.org/oclc/1106269801.
10. ↑ Tang, Qinghao (2021). Internet of things security: principles and practice. Fan Du. Singapore. pp. 166. ISBN 978-981-15-9942-2. OCLC 1236261208. https://www.worldcat.org/oclc/1236261208.
11. ↑ Alendal, Gunnar; Dyrkolbotn, Geir Olav; Axelsson, Stefan (March 2018). "Forensics acquisition — Analysis and circumvention of samsung secure boot enforced common criteria mode". Digital Investigation 24: S60–S67. doi:10.1016/j.diin.2018.01.008. ISSN 1742-2876. http://dx.doi.org/10.1016/j.diin.2018.01.008.
12. ↑ Zhao, Longze; Xi, Bin; Wu, Shunxiang; Aizezi, Yasen; Ming, Daodong; Wang, Fulin; Yi, Chao (2018). "Physical Mirror Extraction on Qualcomm-based Android Mobile Devices". Proceedings of the 2nd International Conference on Computer Science and Application Engineering - CSAE '18. Csae '18 (New York, New York, USA: ACM Press): 1–5. doi:10.1145/3207677.3278046. ISBN 9781450365123. http://dx.doi.org/10.1145/3207677.3278046.

## 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
* Analysis of Qualcomm Secure Boot Chains
* msm8916-mainline/qhypstub
* Android system init process startup and init.rc full analysis
* Android Init Language

* v
* t
* e

Android (operating system)

Software
development
Category|

| Development tools,
official|

* Software development kit (SDK)
* Android Debug Bridge (ADB)
* Fastboot
* Android application package (APK)
* Native Development Kit (NDK)
* Android Open Accessory Development Kit
* Bionic
* RenderScript
* Skia
* Dalvik
* Android Runtime (ART)
* Firebase
* Google Cloud Messaging (GCM)
* Firebase Cloud Messaging (FCM)
* AdMob
* Material Design
* Fonts
* Droid
* Roboto
* Noto
* Google Developers

|

Development tools,
other|

* OpenBinder
* Apache Harmony
* OpenJDK
* Gradle

Integrated development
environments (IDE)|

* Android Studio
* IntelliJ IDEA
* Eclipse
* Android Development Tools (ADT)
* App Inventor

Languages, databases|

* Java
* Kotlin
* XML
* C
* C++
* SQLite

Virtual reality|

* Cardboard
* Daydream

Events, communities|

* Google I/O
* Developer Challenge
* Developer Lab
* Android Open Source Project (AOSP)

Releases|

* 1.0
* 1.1
* Cupcake (1.5)
* Donut (1.6)
* Eclair (2.0–2.1)
* Froyo (2.2)
* Gingerbread (2.3)
* Honeycomb (3.x)
* Ice Cream Sandwich (4.0)
* Jelly Bean (4.1–4.3)
* KitKat (4.4)
* Lollipop (5.x)
* Marshmallow (6.0)
* Nougat (7.x)
* Oreo (8.x)
* Pie (9.0)
* 10

Derivatives|

* Android Automotive
* Android Things
* Android TV
* Wear OS

Smartphones,
tablets|

| Google Pixel|

* Pixel & Pixel XL
* Pixel 2 & Pixel 2 XL
* Pixel 3 & Pixel 3 XL
* 3a & 3a XL
* Pixel C
* Pixel 4 & Pixel 4 XL

|

Google Nexus|

* Nexus One
* Nexus S
* Galaxy Nexus
* Nexus 4
* Nexus 5
* Nexus 5X
* Nexus 6
* Nexus 6P
* Nexus 7
* 2012 version
* 2013 version
* Nexus 10
* Nexus 9
* Nexus Q
* Nexus Player

Google Play edition|

* HTC One (M7)
* HTC One (M8)
* LG G Pad 8.3
* Moto G
* Samsung Galaxy S4
* Sony Xperia Z Ultra

* Android Go
* Android One
* other smartphones

Customized
variants|

* Android-x86
* Remix OS
* AOKP
* Baidu Yi
* Barnes & Noble Nook
* ColorOS
* CopperheadOS
* Fire OS
* Flyme OS
* Funtouch OS
* LeWa OS
* LineageOS
* /e/
* CyanogenMod
* MIUI
* Nokia X software platform
* OmniROM
* OPhone
* OxygenOS
* Replicant
* Ubuntu for Android
* XobotOS
* Yun OS

Applications|

* Android Auto
* Assistant
* Google Now
* Earth
* Sky
* Gmail
* Google Chrome for Android
* Goggles
* Hangouts
* Maps
* Navigation
* Waze
* Pay
* Send
* Play
* Books
* Games
* Movies & TV
* Music
* Newsstand
* Talk
* Trips
* Voice

APIs|

* Google Maps
* Google Play Services
* Google Search

Alternative
user interfaces|

* Asus Zen UI
* Google Pixel UI
* Hive UI
* HTC Sense
* Huawei EMUI
* LG UX (Optimus UI)
* MIUI
* Samsung One UI
* Experience
* TouchWiz

Lists|

* Custom firmware
* Features
* Free and open-source applications
* Games
* Google apps
* Launchers

Related topics|

* Index of articles
* Androidland
* Chromecast
* Google
* Java vs. Android API
* Lawn statues
* Legal issues
* Oracle v. Google
* Smartphone patent wars
* Rooting
* XDA Developers

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Booting_process_of_Android_devices&oldid=332245"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template