Chapter 1: A Recap About The Four Components
- 1.1: The Four Components Overview
- 1.2: Applications as Clients, Not Owners
- 1.3: Android Framework as the Control Plane
- 1.4: Native System Layer as Execution Engine
- 1.5: Linux Kernel as Resource Authority
- 1.6: Communication Between Components
- 1.7: Why This Model Matters
- 1.8: Connecting Back to Previous Books
- 1.9: What Comes Next
Next Chapter Preview
Chapter 2: Looper, Handler, and MessageQueue
- 2.1: The Message Loop as a Runtime Primitive
- 2.2: Handler as a Scheduling Interface
- 2.3: MessageQueue – The Scheduling Core
- 2.4: Main Thread Looper and System Stability
- 2.5: HandlerThread and Background Loopers
- 2.6: Relation to Book 2 Concurrency Model in Android
- 2.7: Mental Model Summary
- Next Chapter Preview
Chapter 3: Context, Resources, and APK Loading
- 3.1: Context Hierarchy
- 3.2: Resources and AssetManager
- 3.3: APK Structure
- 3.4: Class Loaders in Android
- 3.5: Resource IDs and Theme Resolution
- Putting It All Together
- Mental Model
- Summary
- Next Chapter Preview
Chapter 4: JNI Fundamentals
- 4.1: Why JNI (Java Native Interface) Exists
- 4.2: Declaring Native Methods
- 4.3: The JNIEnv Pointer
- 4.4: JNI Types
- 4.5: Local vs Global References
- Closing Perspective
- Chapter Preview: Calling Java from Native Code
Chapter 5: Calling Java from Native Code
- 5.1: Finding Classes, Methods, and Fields
- 5.2: Making Callbacks into Java
- 5.3: Exception Handling in JNI
- 5.4: Caching Method IDs and Performance
- Threading Considerations
- Putting It All Together
- Mental Model
- Closing Thoughts
- Next Chapter Preview
Chapter 6: Calling Native from Java Under the Hood
- 6.1: ART’s Native Method Resolution
- 6.2: The JNI_OnLoad Entry Point
- 6.3: Explicit Registration with RegisterNatives
- 6.4: Efficient Buffer Passing and Zero-Copy
- 6.5: Native Crash Debugging
- Closing Perspective
- Next Chapter Preview
Chapter 7: The Full Graphics Stack
- 7.1: Skia Rendering Engine
- 7.2: BufferQueue Deep Dive
- 7.3: SurfaceFlinger Composition Model
- 7.4: Damage Region and Partial Updates
- 7.5: Hardware Composer (HWC2)
- Putting It All Together
- Why This Matters
- Looking Ahead
Chapter 8: GPU Pipeline and Frame Delivery
- 8.1: OpenGL ES and Vulkan Contexts in Android
- 8.2: Command Buffer Submission Flow
- 8.3: Triple Buffering vs Double Buffering
- 8.4: Why draw() Does Not Render Immediately
- 8.5: Frame Tracing with Perfetto
- Putting It All Together
- Common Failure Modes
- Closing Thoughts
- Next Chapter Preview
Chapter 9: Input System Deep Architecture
- 9.1: Linux Input Subsystem
- 9.2: EventHub
- 9.3: InputReader → InputDispatcher Pipeline
- 9.4: Focus System in WindowManagerService
- 9.5: Touch Targeting and Hit Testing
- 9.6: Why Input Latency Is Structural
- Closing Thoughts
- What Comes Next
Chapter 10: WindowManager and Surface Control
- 10.1: Window Tokens and Hierarchy
- 10.2: ViewRootImpl and WindowManagerService Contract
- 10.3: Surface Lifecycle
- 10.4: Z-ordering and Layering Model
- 10.5: How Multiple Apps Share the Display
- Mental Model: Window as a Contract
- Closing Thoughts
- Next Chapter Preview
Chapter 11: Location as a Complete System Service
- 11.1: Hardware Layer
- 11.2: Linux Kernel Drivers
- 11.3: Hardware Abstraction Layer (HAL)
- 11.4: Native System Services
- 11.5: System Server and LocationManagerService
- 11.6: Fusion Algorithms
- 11.7: Binder IPC Path
- 11.8: App-Level API
- 11.9: Sensor Interaction
- 11.10: Power and Scheduling
- 11.11: Security and Permissions
- Putting It All Together
- Mental Model
- Chapter Summary
- Next Chapter Preview
Chapter 12: System Stability Engineering
- 12.1: Watchdogs and Detecting System Stalls
- 12.2: ANR Deep Cause Chain Analysis
- 12.3: Tombstones : Understanding Native Crashes
- 12.4: Recovery Mode : Automatic Repair Mechanisms
- 12.5: Graceful Degradation : Surviving Partial Failure
- Closing Perspective
- Looking Ahead
Chapter 13: Cross-Layer Debugging
- 13.1: Why Cross-Layer Debugging Exists
- 13.2: The Unified Observability Stack
- 13.3: Logcat as a Multi-Layer Timeline
- 13.4: Perfetto as a Cross-Layer Truth Source
- 13.5: Binder Transaction Tracing Across Layers
- 13.6: GPU and Frame Pipeline Correlation
- 13.7: Memory and CPU Coupling
- 13.8: Cross-Layer Failure Patterns
- 13.9: Structured Debugging Workflow
- 13.10: Example Case Study: Location Causing System Lag
- 13.11: Mental Model Summary
- Chapter 14 Preview: Capstone System Diagnosis
Chapter 14: Capstone System Diagnosis
- 14.1: The System View of a Failure
- 14.2: Case Study 1 – Location Battery Drain
- 14.3: Case Study 2 – Location Causing UI Jank
- 14.4: Unified Debugging Method
- 14.5: Mental Model Consolidation