CN

AIW: An Android Systems and Performance Ebook You Can Check Against Source

Word count: 1.5kReading time: 9 min
2026/09/19
loading

AIW is an Android systems and performance ebook you can read online, download as an EPUB, and check against source code. Its five parts and 26 chapters connect application code with Framework, Native and Kernel mechanisms, including how to investigate them with Perfetto and other tools.

Bring a slow startup, janky scroll, ANR or battery problem to the book, or follow the contents to build a broader understanding. Both the web edition and the ebook are free to read:

This introduction reflects the content available in November 2026. The book remains in alpha. Android 17 / API 37 is the highest version covered by its definitive claims; the complete English edition is planned after v1.0. The book itself is currently in Chinese.

What I want to connect

Android documentation is plentiful. The difficulty is that one article explains Android 12 source, another describes one device, and a third tells you how to call an API. Each may make sense on its own. When you investigate your own problem, you still have to work out whether they describe compatible conditions.

I want system mechanisms, performance problems and tools in one structure: why a mechanism exists, where the code goes, what you can observe, and which versions and conditions support the conclusion.

Rendering activity in an app does not establish that its output reached the display. Low CPU utilization does not establish that a runnable thread never waited. Memory pressure can show up as jank or background process recreation before an OOM. Turning a symptom directly into a cause can send you to the wrong code.

AIW stands for Android Internal Wiki. Its Chinese title is 《Android 技术内幕:系统机制、性能优化与工具实战》, or Android Internals: System Architecture, Performance & Tooling in Practice. It is for people with Android app, system-service or performance-testing experience who want to investigate further. You do not need a complete AOSP development background. If you are entirely new to app development, having a working project first will make the book easier to use.

AIW connects mechanisms, source entry points and performance observations; diagram in Chinese

Five parts, 26 chapters: choose a starting point

The book follows five lines of inquiry. The repository’s SUMMARY contains the full section list. You can use it without reading every preceding page.

Part Contents What it helps you do
System mechanisms, chapters 1–6 Architecture, rendering, input, memory, CPU scheduling and energy, storage I/O Understand objects, processes and threads, and locate the layer where a wait occurs
Performance problems, chapters 7–13 Smoothness, responsiveness, ANRs, memory, power, networking, rendering pipelines Turn “slow,” “janky” or “unresponsive” into system behavior you can investigate
Tools and methods, chapters 14–17 Perfetto, other tools, investigation methods and APM Choose evidence to collect, interpret it and write a finding someone can check
System and vendor optimization, chapters 18–19 AOSP optimization and OEM/device differences Separate platform mechanisms from a device’s kernel, HAL, firmware and thermal conditions
App practice, chapters 20–26 Stability, startup, rendering, memory, I/O and networking, power and size, observability Return to code an app team can change and observe the result after release

The current contents also cover Android 17 AVF / pKVM isolation boundaries, BPF observability on ACK 6.18, foldable display transitions, and automated performance testing with CLI agents. These topics have their own entries rather than requiring an older generic explanation to stand in for them.

The appendices cover version changes, commands, Perfetto templates, investigation checklists, terminology, further reading and learning paths. They are useful starting points when you need a command or are preparing a capture.

Bring a problem rather than memorize the contents

For a slow startup, distinguish the stages. Start with app startup in chapter 21, process and service relationships in chapter 1, and Perfetto in chapter 14. Process creation, initialization, the first frame and business readiness are different timestamps. Improving one stage may not shorten the wait the user actually experiences.

For a scroll that does not follow your finger, put input and display together. Cross-reference input in chapter 3, smoothness in chapter 7 and rendering pipelines in chapter 13. View, Compose, Flutter, WebView, Camera and games do not all produce buffers through the same path. Identify the pipeline before deciding whether input arrived late, the app produced a frame late, or composition and presentation were late.

Memory deserves investigation before an OOM. Chapter 4 covers system mechanisms, chapter 10 covers memory performance and chapter 23 covers app practice. Java Heap, Native Heap, Bitmaps, graphics buffers and paging need different evidence. One total-memory figure cannot explain those differences.

When production evidence starts with “a user said it was janky,” improve what you retain. Chapter 17 explains APM collection; chapter 26 explains how app teams use that evidence. Crashes, ANRs, startup, networking and storage each have observation paths. Chapters 14–16 then help connect the records to the actual problem offline.

Mechanism diagrams accompany the explanations. This one comes from the rendering chapter: at a given instant, the main thread, RenderThread, GPU and display side may be working on different frames. Correlate the target frame when reading a trace; a vertical line across the tracks does not establish a shared frame identity.

AIW rendering chapter: stages may process different frames concurrently; track width does not represent duration; diagram in Chinese

This is a mechanism illustration, not a measured device timeline. See the original diagram.

There is no parameter sheet here that optimizes every app. What I want readers to take away is what to collect next, and which conclusions the available evidence cannot yet support.

Check the version and the basis of a claim

Mechanism explanations include AOSP classes, methods or file paths so you can return to the same code. The current platform baseline is android-17.0.0_r1; the kernel research baseline is Android Common Kernel android17-6.18-2026-06_r6.

A fixed baseline establishes which code we are discussing. It does not mean every section has been validated on an Android 17 device, or that every device upgraded to Android 17 runs the same kernel. Vendor scheduling, power, display and background-management changes still require device-specific investigation.

Tool chapters also explain the limits of the data. An explanation cannot recover events absent from a trace, and correlation alone does not establish a cause. Some mechanisms are clear in source but still lack quantified device measurements. Read those sections within their evidence limits; complete prose does not mean complete validation.

The book will continue to change. If a passage disagrees with source, include the version, source path and exact passage in an issue or pull request.

Look something up, read offline, or use it during analysis

The web edition is convenient for looking up a section and navigating between topics, with search and light/dark themes. EPUB works well in an ebook reader at your own pace. Ebook releases currently run weekly; the November 15, 2026 edition is available. The site and downloadable edition have their own build times, so they may not contain exactly the same latest changes.

AIW also provides a public Knowledge Pack used by SmartPerfetto: a searchable, versioned snapshot of the 26 chapters. It helps retrieve mechanisms and methods during an investigation. It does not replace evidence from the current trace, and a model citing the book has not thereby verified its conclusion. Most readers can simply use the website or EPUB.

The surrounding projects can be used together:

You do not need to install every project. Start with the problem and choose the tool you are missing. The full map is in Android Performance Ecosystem.

Free to read: use and contribution

The text and EPUB use CC BY-NC-SA 4.0. Non-commercial redistribution and adaptations require attribution and the same license. Publishing, selling the book, paid training or bundling the text in a paid product requires separate written permission; see the license and commercial licensing terms. Quoted AOSP, Linux and third-party code retains its own licensing.

Corrections are welcome, as are cases with versions, sources and observations someone else can check. Open an issue before adding a chapter or substantially rewriting one; the present focus is refining the existing 26 chapters. See CONTRIBUTING for the full rules.

If GitHub downloads are inconvenient, send “电子书”, “书”, “AIW” or “Android Internals Wiki” to the Android Performance WeChat Official Account for a download link.

If a system mechanism is blocking your investigation, find a section in the contents and start there. If a sentence is wrong, bring the source and correct it. A book people can repeatedly consult at work, and correct when necessary, is more useful to me than one that merely sounds certain about everything.

CATALOG
  1. 1. What I want to connect
  2. 2. Five parts, 26 chapters: choose a starting point
  3. 3. Bring a problem rather than memorize the contents
  4. 4. Check the version and the basis of a claim
  5. 5. Look something up, read offline, or use it during analysis
  6. 6. Free to read: use and contribution