Operating Systems Deep Dive · 5 of 6

Android — Linux With a Mobile Brain Transplant

Android runs on more devices than any other operating system on Earth. The kernel is Linux, but almost everything above it — the runtime, the app model, the IPC layer, the security sandbox — is Google's own. Understanding Android is understanding how a Linux kernel was bent into a battery-aware, sandboxed, app-store-driven mobile platform.

AOSPLinux KernelARTKotlinSandbox
← Back to Foundations
Quick Facts

What Android Is

Basic Concepts

  • AOSP: Android Open Source Project. The base, free for any vendor to ship. Samsung, Xiaomi, Amazon (Fire OS) all start here.
  • Google services layer: Play Store, Maps, Gmail, Push (FCM) are not in AOSP — they're proprietary Google add-ons licensed to phone makers.
  • Linux kernel: Real Linux, but with Android-specific patches (Binder IPC, low-memory killer, wakelocks, anonymous shared memory).
  • App language: Kotlin (preferred) or Java; native code via NDK in C/C++. Apps ship as .apk / .aab.
  • Runtime: ART (Android Runtime). Bytecode compiled ahead-of-time and just-in-time.
Architecture

The Stack From the Bottom Up

LayerWhat It Contains
Linux kernelProcess scheduling, memory, drivers — plus Android extras (Binder, ashmem, wakelocks).
HAL (Hardware Abstraction Layer)Vendor-implemented interfaces for camera, audio, sensors, radio.
Native librariesBionic libc (smaller than glibc), OpenGL/Vulkan, SQLite, WebKit/Chromium.
ART runtimeExecutes app bytecode. AOT compiles on install, JIT for hot paths.
System servicesActivityManager, PackageManager, WindowManager — all reachable via Binder.
Framework APIsThe Java/Kotlin SDK apps call (android.*, Jetpack libraries).
AppsSandboxed, signed APKs running in their own process.
App Model

How an Android App Actually Runs

One App, One Linux User

Every installed app gets its own Linux UID. The kernel's standard file permissions enforce isolation — your app literally cannot read another app's files, because it doesn't own them. This is the entire foundation of Android's sandbox.

Activities, Services, Broadcasts
  • Activity: A screen the user interacts with.
  • Service: Background work without UI (music playback, sync).
  • BroadcastReceiver: Listens for system events (boot complete, network change).
  • ContentProvider: Structured data shared between apps (Contacts, Media).
Binder IPC

The secret sauce. Binder is a kernel driver that lets apps and system services pass typed objects across process boundaries cheaply and securely. Every Intent, every system API call, ultimately goes through Binder.

Permissions

Manifest declares what the app needs (CAMERA, ACCESS_FINE_LOCATION). Dangerous permissions require a runtime prompt (Android 6.0+). Background location, photo access, and others tightened progressively across versions.

Why It's Different

How Android Diverges From Desktop Linux

  • No GNU userland. Bionic libc, toybox shell. Most familiar Linux tools aren't there.
  • No traditional package manager. Apps come from the Play Store (or sideloaded APKs), not apt.
  • No fork()-friendly process tree. All app processes are spawned from zygote, a pre-warmed VM that copy-on-writes its heap.
  • Aggressive lifecycle management. The OS kills your app whenever it wants. State must be saved or it's gone.
  • Battery first. Doze mode, App Standby, JobScheduler — all designed to keep the radio and CPU idle.
Build Tools

The Developer Toolchain

ToolRole
Android StudioThe official IDE — IntelliJ-based with Android-specific tooling.
Gradle + Android Gradle PluginBuild system. Kotlin/Java → DEX → APK/AAB.
Jetpack ComposeDeclarative Kotlin UI toolkit (replaces XML layouts).
adbAndroid Debug Bridge — install, shell into, log from a device.
EmulatorQEMU-based, runs full system images of various Android versions.
Play ConsoleSubmission, staged rollouts, crash analytics.
Reality Check

Where Android Struggles

  • Fragmentation. Hundreds of OEMs, many Android versions in the wild, vendor skins on top. Testing surface is enormous.
  • Update lag. Even in 2026, many devices are years behind on the OS. Project Mainline and Treble help, but the ecosystem trails iOS.
  • Vendor blobs. Drivers and HAL implementations are usually proprietary, complicating long-term kernel updates.
  • Background work is hard. Reliable scheduling fights an OS designed to kill you to save battery.
Continue

More Operating Systems