← Back to Blogs

Binder IPC in AOSP

How Android processes talk to each other

1 min read

Android is a multi-process operating system. Each app runs in its own sandboxed process, and system services run in separate processes too. But apps constantly need to talk to system services - to open the camera, send a notification, or check location. Binder is the IPC mechanism that makes all of this possible.

Why Not Use Standard Linux IPC?

Linux provides sockets, pipes, shared memory, and signals for IPC. Android avoided these for app-to-service communication because they lack identity verification (you can't confirm who is on the other end), they're hard to manage at scale, and they don't integrate well with object-oriented APIs. Binder solves all three problems.

How Binder Works

Binder IPC Architecture

  Process A (Client)         Process B (Server)
  ┌─────────────────┐        ┌─────────────────┐
  │   App / caller  │        │  System Service │
  │                 │        │ (e.g. Camera    │
  │  [Proxy object] │        │  Service)       │
  └────────┬────────┘        └────────▲────────┘
           │  write to /dev/binder    │
           ▼                          │
  ┌───────────────────────────────────┴─────────┐
  │              Binder Driver                  │
  │           (/dev/binder in kernel)           │
  │  copies data, identifies caller UID/PID     │
  │  dispatches to correct server thread        │
  └─────────────────────────────────────────────┘

Key Binder Concepts

Binder Domains

Debugging tip: Use 'adb shell dumpsys' to inspect any Binder service. 'adb shell service list' shows all registered Binder services. For deep Binder tracing, use systrace with the 'binder_driver' category.