Fundamentals 7 min read

Android System Boot Process: Bootloader, Linux Kernel, Init, Zygote, and ServiceManager

This article explains the Android boot sequence, covering the bootloader's two stages, Linux kernel initialization, the Init process, the Zygote process that spawns application instances, and the role of ServiceManager and SystemServer in bringing the Android system to a ready state.

Baidu Intelligent Testing
Baidu Intelligent Testing
Baidu Intelligent Testing
Android System Boot Process: Bootloader, Linux Kernel, Init, Zygote, and ServiceManager

Android runs on top of the Linux kernel and its startup consists of three core steps: bootloader launch, Linux kernel boot, and Android initialization.

Bootloader

The bootloader is a small program that runs before the operating system, initializing hardware, setting up memory mappings, and preparing the environment for the kernel.

It typically executes from address 0x00000000 in embedded systems.

The bootloader execution is divided into two stages:

Stage 1 (usually assembly): basic hardware initialization, allocating RAM for stage 2, copying stage 2 from flash to RAM, setting the stack pointer, and jumping to stage 2 entry point.

Stage 2 (usually C): initializing hardware needed for this stage and detecting the memory map.

Linux Kernel Startup

The Linux kernel provides system call interfaces, multitasking, memory management, virtual file system, and a hardware abstraction layer that offers a unified API for drivers.

Android Init Process

After the kernel boots, the Android init process runs in user space, creating essential directories such as /dev and /proc and entering an infinite loop to spawn other processes. Most system processes are children of init.

Zygote Process

The Zygote process creates the Java runtime environment, starts the Dalvik virtual machine, and launches SystemServer. When other components request a new process (e.g., via AMS), Zygote forks a new process that already contains a Dalvik VM and necessary system resources.

ServiceManager

ServiceManager registers and provides access to system services. Any service must be registered here before use, e.g., getSystemService(Context.AUDIO_SERVICE) retrieves the AudioManager.

SystemServer

SystemServer registers core services (GPS, audio, video, camera, etc.) with ServiceManager and, after completing its work, broadcasts systemReady . The ActivityManagerService then starts the HomeActivity, displaying the launcher.

Overall Android Boot Flow

Bootloader execution

Linux kernel startup

Filesystem and init process

Zygote and ServiceManager processes

SystemServer initialization

Launcher (HomeActivity) startup

AndroidLinux kernelBootloaderSystem Servicesinit processZygote
Baidu Intelligent Testing
Written by

Baidu Intelligent Testing

Welcome to follow.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.