← wiki index03 / 10 · Foundations

🧩 Foundations

How Android was built on Linux

Same kernel, almost nothing else the same — Bionic instead of glibc, Binder instead of pipes, ART instead of a JVM.

5 min read5 key concepts

Google didn't write a new kernel for Android — it patched Linux. But almost everything Linux normally ships with above the kernel was replaced, because a phone in 2008 had a fraction of a desktop's memory and battery, and because Android needed the mutual-distrust security model described in the first article.

What Android replaced or added on top of stock Linux

  • Bionic instead of glibc — a smaller, faster C library, because glibc was too large and (at the time) too GPL-licensed for Google's needs
  • Binder IPC — a kernel driver Google wrote specifically for Android, giving processes a fast, security-checked way to call into each other. Almost every cross-app and cross-process call on Android — startActivity, a ContentProvider query, a system service call — is Binder underneath.
  • The Low Memory Killer (and later, in-kernel memory-pressure signals) — a phone can't swap to disk the way a server does, so the kernel needed a way to kill background processes under memory pressure before the system stalls
  • Wakelocks — a mechanism for a process to tell the kernel "don't let the CPU sleep right now" and, just as importantly, a mechanism for the system to yank a wakelock back if an app misbehaves and drains the battery
  • No traditional init/systemd — Android's init is a much smaller Android-specific process that parses .rc files and starts the small number of native daemons Android actually needs (zygote, servicemanager, surfaceflinger) before Java code ever runs

Why this is worth knowing as an app engineer

Every one of these isn't trivia — it's the reason for a real, everyday Android behavior. Binder's per-call security check is why permissions can be enforced even across process boundaries. The Low Memory Killer is why a Service you didn't mark as foreground can vanish without warning. Wakelocks are why an app that forgets to release one gets flagged in battery stats — the OS is designed to assume apps will misbehave and to contain the damage when they do.

In this note

BionicBinderLow Memory Killerwakelocksinit

References & resources