Android Boot Sequence

Power On -> Bootloader -> Linux Kernel -> Init -> Zygote -> System Server -> System UI -> Launcher

Init: aosp/system/core/init

  • Execute init.rc script (this is executed by the init process, which is the very first user-space process). The information from init.rc is used to do all other subsequent steps such as mounting FS, starting zygote etc.
  • Mounts file system
  • Starts Zygote process for ART (it holds common state (e.g., loaded system libraries) for all android apps and reduces the overhead of starting new apps. (similar to fork in Linux)
  • Starts system server, which is responsible for ActivityManager, WindowManager etc.
  • Sets System Properties (you can see using adb shell getprop)
  • Starts services (e.g., MediaServer, SurfaceFlinger, TimeService)
  • Runs any other custom scripts and config. files
  • Handles runtime responses (e.g., setup callbacks)
  • Transition to user-space