Starting a JVM-like process from scratch for every app launch would be too slow for a phone. Android's answer is Zygote: a process that starts at boot, pre-loads the framework classes and resources every app will need, and then just forks a copy of itself per app launch — a fork is fast; a cold interpreter start is not.
The sequence, step by step
- 1. Tap — the Launcher calls startActivity(), which is a Binder call into the system server's ActivityTaskManager, not a local function call
- 2. Process lookup — the system server checks whether the target app's process already exists; if it does, launch skips straight to step 5
- 3. Zygote fork — if the process doesn't exist, the system server asks Zygote to fork a new process. The child inherits Zygote's pre-loaded classes copy-on-write, so it starts with a warm framework instead of a cold one
- 4. ActivityThread.main() — the forked process's entry point. It sets up the app's main Looper/Handler (the thread every UI callback on Android actually runs on) and binds to the system server over Binder
- 5. Application.onCreate() — the app's Application subclass is instantiated and its onCreate() runs once per process, before any Activity exists
- 6. Activity created — the target Activity is instantiated and moved through onCreate -> onStart -> onResume, at which point it's the one visible, interactive screen
- 7. First frame — the Activity's View hierarchy is measured, laid out, and drawn; the frame is handed to SurfaceFlinger for compositing, and only then does the user actually see anything
Why "cold start" and "warm start" mean different things
A cold start runs the full sequence above, including the Zygote fork and a fresh Application.onCreate(). A warm start reuses an existing process (step 2 finds it already running) and skips straight to recreating the Activity. This is exactly what android-perf-lab's Baseline Profile and Macrobenchmark setup measures — and why a cold-start number is only meaningful if it says which of these two paths it measured.
In this note
References & resources