Hands-on
Hands-on labs
Poke at a real device. Nine labs, then five tracing labs.
14 pages83 min2 interactive15400 words
- 01Lab 0 — Set upGet a device or emulator, a working adb, and the habits that keep a lab safe: know what you are connecting to, what state it is in, and how to get back to normal.beginner5 min
- 02Lab 1 — ProcessesRead the process table, find every process's UID and parent, watch Zygote fork an app, and use oom_adj to see which processes the system would kill first.beginner5 min
- 03Lab 2 — ServicesGo inside system_server: list the registered Binder services, read which process hosts each one, and use service call and cmd to talk to a service without writing any code.intermediate5 min
- 04Lab 3 — PackagesInterrogate the package manager: list installed packages, read a manifest through dumpsys, check where an APK physically lives, and use pm to disable and re-enable a package safely.intermediate5 min
- 05Lab 4 — logcatRead the system log without drowning: filter by tag, PID, buffer and priority, capture a crash, and understand why the buffer you are reading may not be the one you think.beginner5 min
- 06Lab 5 — Memory and powerRead a meminfo table without panicking, find the processes holding memory, read battery stats and wakelock history, and understand why 'free RAM' is the wrong question.intermediate6 min
- 07Lab 6 — Permissions and AppOpsTwo systems decide what an app may do: permission grants and per-operation AppOps. Learn to read both, revoke a grant, and see why a permission can be granted while an operation is still denied.intermediate5 min
- 08Lab 7 — Settings and propsTwo configuration systems hold most of the platform's tunables: the settings databases (global, secure, system) and the property store. Learn which is which, read both, and change one safely with an undo.intermediate5 min
- 09Lab 8 — IntentsUse the shell to resolve intents, start components, and see the difference between explicit and implicit intents — including what happens when nothing matches and when several things do.intermediate5 min
- 10Lab 10 — PerfettoRecord a system trace on a device, open it in the Perfetto UI, and learn to read tracks, slices, thread states and CPU scheduling without drowning in the timeline.intermediate10 mininteractive
- 11Lab 11 — App startupMeasure a cold start three ways — logcat, am start -W, and a trace — and learn why the number you get depends on the method. Then break the start into its phases and find the expensive one.intermediate11 mininteractive
- 12Lab 12 — JankA janky frame is one that missed its deadline. Learn to see that in a trace, use FrameTimeline to attribute it, and tell the difference between work on the main thread, work on the RenderThread and time spent not scheduled at all.intermediate5 min
- 13Lab 13 — Binder and lock contentionA thread that is blocked is not a thread that is working. Find synchronous Binder round trips in a trace, see the server side of the call, and identify lock contention from the thread state track.nerd6 min
- 14Lab 14 — SQL on tracesTrace Processor turns a trace into a SQLite-like database. Learn the tables and joins, then answer the questions from the last four labs with queries instead of clicks — and save the good ones.nerd5 min
Test yourself
Test yourself: Hands-on labs
Which of these values are properties, read with `getprop`, rather than settings, read with `settings get`?