AOSP Foundations
3 min read

Launcher Startup

Follow the final steps of the boot sequence as the system server signals completion and displays the Home screen.

The Android operating system is technically fully booted once the System Server finishes starting all 100+ of its core background services. However, from the user's perspective, the phone is still just displaying the animated manufacturer boot logo.

The final step of the lengthy boot process is to start the user interface.

The "System Ready" Signal

When the System Server successfully finishes its three initialization phases, the ActivityManagerService (AMS) fires a crucial internal method called systemReady().

This method tells all the other sleeping services that it is finally safe to start interacting with the real world. For example, the LocationManagerService will now actually turn on the physical GPS chip, and the WifiService will attempt to connect to saved networks.

Starting the Launcher

The most important action AMS takes during systemReady() is to launch the Home screen.

  1. The HOME Intent: AMS creates an implicit Intent with the specific category Intent.CATEGORY_HOME.
  2. Resolving the App: AMS asks the PackageManagerService to find whichever installed app is registered to handle the HOME intent. By default on AOSP, this is the internal Launcher3 app.
  3. Forking the App: AMS sends an IPC command to the Zygote socket: "Fork a new process for the Launcher3 app."
  4. Drawing the UI: The Zygote forks the process, the Launcher3 app starts, reads the local SQLite database to find the icon grid layout, and sends the UI graphics buffers to the WindowManagerService and SurfaceFlinger.

The animated boot logo finally disappears, and the user sees their wallpaper and app icons.

# Developers can simulate pressing the home button via adb by firing the home intent manually
adb shell am start -W -c android.intent.category.HOME -a android.intent.action.MAIN

The BOOT_COMPLETED Broadcast

Just because the home screen is visible does not mean the system is completely idle.

Once the Launcher has successfully drawn its first frame, the ActivityManagerService sends out a massive, system-wide broadcast intent: ACTION_BOOT_COMPLETED.

  • Background Apps: Hundreds of apps installed on your phone register a BroadcastReceiver in their manifest specifically listening for this exact intent.
  • The Boot Storm: When BOOT_COMPLETED fires, the system experiences a massive spike in CPU usage as email apps wake up to sync messages, alarm apps set their timers, and widget apps aggressively update their data.
  • Optimization: Because this "boot storm" can severely lag the device right after turning it on, modern Android versions strictly throttle which apps are allowed to receive this broadcast in the background.