Introduction
What This Book Covers¶
28 chapters organized bottom-to-top through the emulator stack — from the QEMU machine model up through the host renderer, the streaming UIs, and the crosvm-based Cuttlefish virtual device:
| Part | Ch. | Topics | Reviewed |
|---|---|---|---|
| Front | 0 | Frontmatter | ✗ |
| I | 1 | Introduction (host/guest split, architecture) | ✗ |
| I | 2 | Source Code & Build System (repo manifest, CMake/Bazel) | ✗ |
| I | 3 | Running the Emulator (launcher, AVDs, config) | ✗ |
| II | 4 | The QEMU Fork (ranchu/goldfish, qemu2-glue) | ✗ |
| II | 5 | CPU Acceleration (KVM/HVF/WHPX/AEHD/TCG) | ✗ |
| II | 6 | Virtual Hardware & virtio | ✗ |
| III | 7 | android-emu Architecture & Lifecycle | ✗ |
| III | 8 | Console & gRPC Control Plane | ✗ |
| III | 9 | Snapshots & Quickboot | ✗ |
| III | 10 | Sensors, Battery & Location | ✗ |
| IV | 11 | Graphics Architecture (gfxstream) | ✗ |
| IV | 12 | Guest GPU Drivers | ✗ |
| IV | 13 | Host Rendering (libOpenglRender/ANGLE/mesa) | ✗ |
| IV | 14 | gfxstream Protocol | ✗ |
| V | 15 | Audio | ✗ |
| V | 16 | Camera | ✗ |
| V | 17 | Display & Multi-Display | ✗ |
| VI | 18 | Networking (slirp/netsim) | ✗ |
| VI | 19 | Bluetooth (rootcanal) | ✗ |
| VI | 20 | ADB Integration | ✗ |
| VI | 21 | Modem & Telephony | ✗ |
| VII | 22 | The Qt UI | ✗ |
| VII | 23 | WebRTC & the Embedded Emulator | ✗ |
| VIII | 24 | System Images & the Goldfish HAL | ✗ |
| VIII | 25 | Guest Boot | ✗ |
| IX | 26 | Cuttlefish & crosvm (the crosvm-based virtual device) | ✗ |
| X | 27 | Testing | ✗ |
| X | 28 | Debugging, Tracing & Crash Reporting | ✗ |
| App. | A | Paravirtualization from Xen to Android | ✗ |
| App. | B | Key Files Reference | ✗ |
| App. | C | Glossary | ✗ |
✗ = not yet reviewed by a human; published openly for community review.
License¶
This book is licensed under the Apache License 2.0, matching the license of the Android Emulator and the Android Open Source Project it analyzes. See the LICENSE file for details.
How to Navigate¶
Use the sidebar to browse chapters organized bottom-to-top through the emulator stack — from the virtual machine that runs the guest, up through the host renderer and the user interfaces. Each chapter is self-contained but builds on previous ones.
Architecture Overview¶
The Android Emulator is a host program that runs an unmodified Android system image inside a virtual machine. A forked QEMU provides the CPU and device model; the android-emu layer adds the Android-specific machine, sensors, snapshots, and a control plane; graphics commands are streamed from the guest to a host renderer; and a Qt window or a WebRTC stream presents the result.
graph TB
subgraph HOST["Host process (emulator binary)"]
UI["Qt UI / WebRTC stream"]
GRPC["gRPC + console<br/>control plane"]
ANDROIDEMU["android-emu core<br/>(sensors, snapshots, pipes)"]
RENDER["Host renderer<br/>(gfxstream + ANGLE/mesa)"]
QEMU["Forked QEMU<br/>(ranchu machine, virtio)"]
ACCEL["CPU accelerator<br/>(KVM / HVF / WHPX / AEHD / TCG)"]
end
subgraph GUEST["Guest (Android system image)"]
GKERNEL["Goldfish/Ranchu kernel"]
GHAL["Goldfish HAL + gfxstream guest"]
GFRAME["Android framework"]
end
UI --> GRPC
GRPC --> ANDROIDEMU
ANDROIDEMU --> QEMU
QEMU --> ACCEL
ACCEL --> GKERNEL
GKERNEL --> GHAL
GHAL --> GFRAME
GHAL -->|"rendering commands"| RENDER
RENDER --> UI
Support This Project¶
If this book has helped you understand the Android Emulator, please consider showing your support:
- Star the repository on GitHub so other developers can find it.
- Report errors or suggest improvements via the issue tracker.
- Share the book with colleagues and communities working on Android virtualization and tooling.
Stars and feedback are the main signal that the work is useful, and they motivate continued writing and review.