Android Boot Process


Introduction

Android Boot Process is a process of starting a computer for using it. A computer system can be started by switching on the power supply. When the computer is started it is able to read only the part of storage called Read only memory. A small program is started on launching the computer which is stored and called as firmware. It allows accessing other types of memory such as main memory and hard disk. The firmware is use to load big programs and run it into the computer's main memory. Boot Manager is run in all devices whether it may be a mobile device, computer system or others.

Boot Process in Android is of 6 steps which are as follows −

  • Boot ROM.

  • BootLoader.

  • Kernel.

  • Init.

  • Zygote and Dalvik VM.

  • System Servers.

Boot ROM

Boot ROM is a step which is called when the computer is powered ON on system startup. When the system is powered on the Boot ROM code starts executing a set of instructions from a predefined location which is hardwired in the ROM. Boot ROM loads BootLoader into RAM and starts executing.

BootLoader

BootLoader is a small program which runs before Android OS starts up. Mobile manufacturers put their locks and restrictions in boot loader. Boot Loader contains a code which is executed before starting any operating system. Boot Loader executes two steps which are as follows −

  • In the first stage the boot loader detects the external RAM of the device and loads a program in it for the second stage.

  • In the second stage, the boot loader sets up the memory and network which is required to run the Kernel.

Kernel

The Android OS consists of an operating system consisting of Linux Kernel and a collection of user-space applications and libraries. The kernel is the lowest level of an operating system which interacts directly with the hardware and provides basic services to user space components. When the kernel finishes system setup it looks for init in system files and launches the root process or very first process of the system.

Init

Init is the first user space process which runs on Android devices. It is responsible for starting other user-space processes and services, and setting up the device environment. This process reads the configuration files in /init.rc directory and starts necessary services and daemons. Init is the first process that runs with root privileges, and it is responsible for setting up the device's security policies, mounting the file systems, and setting up the network. It also starts the Android runtime, which is responsible for running the Android framework and applications.

Zygote and Dalvik VM

Zygote is a virtual machine process which starts as the system boots. When the app process launches the Zygote it then creates Dalvik VM and then calls Zygotes main method to receive a request to launch an app through dev/zygote. Once the app is launched the fork() method is triggered which will create a clone of itself to replicate it in another memory space.

System Servers

When the zygote has loaded all the Java classes and resources, it will start the System Server. This server is a core of android system. The android_servers native library is loaded by this system servers to provide interface to native functionalities. The native init method will then setup native services called. After the services have been created the server thread will be created. The remaining services will be started by the thread according to the specific order. Once the system services has started running in memory the boot process of android is completed and at this time “ACTION_BOTT_COMPLETED” action will be fired.

Conclusion

In this article we have taken a look on What is Boot Process in Android and what are the different process which are included in the boot process.

Updated on: 20-Feb-2023

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements