What Is This Book About?
Chapter 0: Android as a Distributed System on a Phone
- A different way to see Android
- Nodes and messages
- Process boundaries are failure boundaries
- Binder is not just IPC (Inter-Process Communication)
- ANR “App Not Responding” is not what you think
- Why this mental model matters
- A concrete analogy
- What you should take away
- A quick preview of what comes next
Chapter 1: Linux Foundations for Android Engineers
- 1.1 Scheduling: Who Gets the CPU, and When
- 1.2 Memory Pressure: The System Under Stress
- 1.3 Control Groups: Resource Isolation in Practice
- 1.4 I/O and the Hidden Cost of Waiting
- Chapter 2 Preview: App Lifecycle as a Resource Contract
Chapter 2: App Lifecycle Is a Resource Contract System
- 2.1 Lifecycle as Resource Arbitration
- 2.2 Process Killability and the OOM Model
- 2.3 Foreground Services and User Visibility
- 2.4 State Restoration as a Consistency Problem
- 2.5 The Bigger Picture
- Preview of the Next Chapter
Chapter 3: Prerequisites and First Contact with AOSP
- What Comes Next
Chapter 4: Binder Is the Real Android Architecture
- 4.1 Seeing Binder Clearly
- 4.2 The Lifecycle of a Binder Transaction
- 4.3 Thread Pools and Starvation
- 4.4 Death as a First-Class Concept
- 4.5 From HIDL to AIDL
- 4.6 Thinking in Binder
- 4.7 A Real Scenario
- 4.8 What to Take Away
- A Small Preview of What Comes Next
Chapter 5: System Server Is Android’s Control Plane
Chapter 6: The Rendering Pipeline
- 6.1 From Touch to Pixels: The Full Journey
- 6.2 Choreographer: Frame Scheduling in the UI Thread
- 6.3 The UI Thread: Where Most Mistakes Happen
- 6.4 The Render Thread: Decoupling Work
- 6.5 SurfaceFlinger: The System Compositor
- 6.6 Frame Budgeting: The Reality of Time
- 6.7 Understanding Jank Properly
- 6.8 Where Composition Actually Happens
- 6.9 A More Useful Mental Model
- What Comes Next
Chapter 7: Making Your First AOSP Change and Flashing
- 7.1 The First Change: Touching the System
- 7.2 Build Pipeline Mental Model
- 7.3 Rebuilding the System
- 7.4 Flashing to Emulator
- 7.5 Flashing to a Real Device
- 7.6 What Are Vendor Blobs
- 7.7 Build Variants and Why They Matter
- 7.8 Common Failure Modes
- 7.9 What You Just Achieved
- Next Chapter Preview
Chapter 8: Storage is a Consistency System
- 8.1 Internal vs External Storage
- 8.2 Scoped Storage and Access Models
- 8.3 Write Amplification in Mobile Storage
- 8.4 SQLite WAL Internals
- 8.5 Storage as a Consistency Contract
- Next Chapter Preview
Chapter 9: Android Security Model as a Layered Sandbox
- 9.1 The First Boundary: UID Sandboxing
- 9.2 SELinux: The Mandatory Policy Layer
- 9.3 IPC as an Attack Surface: Intents and Components
- 9.4 APK Signing and Verified Boot
- Chapter Summary
- Next Chapter Preview
Chapter 10: Boot Flow as a Dependency Injection System
- 10.1 Bootloader to Kernel to Init to Zygote
- 10.2 init.rc Scripts as Declarative Dependency Graphs
- 10.3 Service Dependency Graph
- 10.4 Zygote as a Preloaded Dependency Container
- 10.5 system_server as Late-Stage Injection Hub
- 10.6 Early Boot Race Conditions
- 10.7 Debugging Boot with logcat and Early Logs
- 10.8 Putting It Together
Chapter 11: Basic Debugging & Profiling (Foundation)
- 11.1: ADB as the Primary Observation Interface
- 11.2: logcat as a Multi-Channel Event Stream
- 11.3: dumpsys as Structured System Introspection
- 11.4: Memory Inspection and System Pressure Tools
- 11.5: First Performance Tracing with Perfetto and Systrace
- 11.6: First Integrated Debugging Workflow
- Chapter Summary
- About the next book