A dumpsys tour
dumpsys is the most useful command on Android because almost every service implements one method: dump. This is how it works, and what to read in the six dumps that answer most questions.
adb shell dumpsys is a single command that can tell you the state of nearly every service on the
device. It is not a debugger, it does not attach to anything, and it does not require a debuggable
build. It works because of one convention: every system service implements dump().1
TL;DR#
dumpsys <name>looks up the Binder service, calls itsdump()method, and prints what it writes.dumpsys -llists every service that can be dumped. That list is the sameservice listyou saw in the previous page, filtered to services that implement the interface.- The output format is whatever the service decided — there is no schema. Reading it is a skill, not a syntax.
- The most valuable flags are the ones that select a subsection:
dumpsys activity activities,dumpsys window windows,dumpsys package <pkg>. cmd <service> <command>is the sibling command for changing state;dumpsysonly reports.
Mental model#
Think of a building where every office is required, by law, to answer one question: "describe yourself, in writing, right now."
dumpsys is the inspector who walks in and asks it. Some offices hand over a two-page summary; some
hand over four hundred pages of internal ledgers. The inspector does not reformat anything. Your job
is to know which office to visit and which page to read.
Where the analogy breaks#
An inspector can ask follow-up questions. dumpsys cannot: it calls dump() once with whatever
arguments you supplied and prints the result. If the service did not implement a subsection for your
question, the answer is not there, and no amount of retrying will produce it. The remedy is to read
the source of that service's dump method.
The big picture#
Text description of this diagram
A treemap of system_server's services in seven groups. Every leaf in this diagram that implements the dumpsys interface can be addressed by name on the command line: activity, window, package, power, alarm, notification, input, display, appops, jobscheduler, connectivity, wifi and so on. The group tells you which dump to reach for when you have a question about a particular subsystem.
Deep dive#
What dumpsys actually does#
The shell command is a thin Java program, Dumpsys.java, that runs inside app_process. It:
- Takes the service name argument.
- Looks the name up with
ServiceManager.getService(name). - If the service exists, calls
service.dump(fd, args)over Binder, passing a file descriptor for stdout.2
That last part is the interesting one. dump() takes a FileDescriptor, not a return value. The
service writes directly to the pipe. This is why a dump can be hundreds of megabytes without ever
materialising a string in the service's heap, and why dumpsys > file is the normal way to capture
one.
Listing and filtering#
adb shell dumpsys -l
adb shell service list | wc -l
Example output
Currently running services:
activity
activity_task
alarm
android.security.keystore2
appops
…dumpsys -l lists services that can be dumped. service list lists every registered Binder service,
which is a superset: some services are registered but have no useful dump, and some are registered
by native processes rather than the framework.
The full output of dumpsys with no arguments is enormous, because it walks the entire list. Do not run
it on a production device unless you need a bugreport-grade snapshot; run it on a test device, or
redirect it to a file.
The tour: six dumps worth knowing#
dumpsys activity activities — the task and activity stack. This is where you find out why an
app is not resuming, what task it ended up in, and which activity is on top of which. Look for
state=RESUMED, visible=true, and the task's A= (UID) field.
dumpsys window windows — the window hierarchy with z-order. Look for mBaseLayer and the
window's owner. This answers "why is this dialog behind the keyboard" and "which window has focus".
dumpsys package <pkg> — everything PackageManager knows: version, userId, targetSdk,
declared permissions, granted permissions, components, and the app's install path. It is the fastest
way to confirm what is actually installed.
dumpsys meminfo <pkg> — the memory breakdown: PSS by category, the Java heap, the native heap,
and the process's oom_adj. This is the canonical answer to "how much memory is this app using".
dumpsys gfxinfo <pkg> — frame timing. With framestats it gives per-frame timings for a
recent window of frames, which is how you tell a jank problem from a slow-start problem without a
profiler.
dumpsys batterystats — wakelocks, alarms, job scheduling and per-UID power attribution. It is
the source behind the battery screen and the reason dumpsys batterystats --reset exists.
The catalogue, filtered to dumpable services#
| Command | Service | Binder name | Question it answers |
|---|---|---|---|
| dumpsys activity activities | ActivityTaskManager | activity_task | Which activities and tasks exist, and which is resumed? |
| dumpsys activity processes | ActivityManager | activity | Which processes exist, and what is each one's OOM adjustment? |
| dumpsys window windows | WindowManager | window | What windows exist, in what z-order, with which insets? |
| dumpsys package <pkg> | PackageManager | package | What is installed, with which permissions and signature? |
| dumpsys meminfo <pkg> | ActivityManager | activity | How much memory does this process use, by category? |
| dumpsys gfxinfo <pkg> | ActivityManager | activity | How long did the last frames take, and where did the time go? |
| dumpsys batterystats | BatteryStats | batterystats | What is waking the device, and which app owns it? |
| dumpsys jobscheduler | JobScheduler | jobscheduler | What deferred work is registered, and why is it not running? |
| dumpsys alarm | AlarmManager | alarm | Which alarms are pending, and when will they fire? |
| dumpsys power | PowerManager | power | Who holds wake locks, and what is the wakefulness state? |
| dumpsys notification | NotificationManager | notification | Which notifications exist and how were they ranked? |
| dumpsys appops | AppOps | appops | Which fine-grained operations are allowed or denied per app? |
| dumpsys connectivity | ConnectivityService | connectivity | Which networks exist and what is the default? |
| dumpsys input | InputManager | input | Which input devices exist and where are events being dispatched? |
Reading a dump without drowning#
Three habits make the difference between a dump and an answer.
Narrow with a subcommand. dumpsys activity prints activities, processes, services, providers
and broadcasts. dumpsys activity activities prints one of those. The subcommand is matched by the
service's own dump implementation, so the list of valid subcommands is in the source, not in the
help text.
Grep for structure, not for values. Grepping for your package name is fine. Grepping for
state= inside dumpsys activity activities gives you one line per activity and a much smaller
output to read.
Capture, then read. A dump is a snapshot; reading it while it scrolls is guesswork. Redirect to a file, then use an editor.
adb shell dumpsys activity activities > /tmp/activities.txt
grep -A3 "com.example.app" /tmp/activities.txt
Example output
Task{7f3a1c2 #1234 type=standard A=10123:com.example.app}
ActivityRecord{8a2b3c4 u0 com.example.app/.MainActivity t1234}
state=RESUMED visible=truedumpsys versus cmd#
They are siblings and are often confused.
dumpsys <service>reads. It callsdump().cmd <service> <command>writes. It callsshellCommand(), which the service implements separately.
So dumpsys package com.example.app tells you what permissions the app holds, and
cmd package grant com.example.app android.permission.CAMERA changes them. dumpsys has no way to
change anything; cmd has no standard output format.
The bugreport#
adb bugreport is what happens when you run essentially every dump, plus logs, plus system
properties, plus a copy of the package database. It is dumpsys at maximum breadth, and it is the
format that field support and Google's own tooling consume.
That is why there are two different questions worth separating: "I want to understand this one
subsystem" (use a targeted dumpsys) and "I need a complete record for someone else" (use
bugreport). Reaching for the second when you need the first is a common way to spend twenty
minutes waiting for a file you will not read.
How it evolved#
| API | Version | What changed |
|---|---|---|
| 1 | 1.0 |
|
| 4 | 1.6 Donut |
|
| 5 | 2.0 Eclair |
|
| 8 | 2.2 Froyo |
|
| 9 | 2.3 Gingerbread |
|
| 11 | 3.0 Honeycomb |
|
| 13 | 3.2 Honeycomb |
|
| 14 | 4.0 Ice Cream Sandwich |
|
| 16 | 4.1 Jelly Bean |
|
| 17 | 4.2 Jelly Bean |
|
| 18 | 4.3 Jelly Bean |
|
| 19 | 4.4 KitKat |
|
| 20 | 4.4W KitKat (Wear) |
|
| 21 | 5.0 Lollipop |
|
| 22 | 5.1 Lollipop |
|
| 23 | 6.0 Marshmallow |
|
| 24 | 7.0 Nougat |
|
| 26 | 8.0 Oreo |
|
| 27 | 8.1 Oreo |
|
| 28 | 9 Pie |
|
| 29 | 10 |
|
| 30 | 11 |
|
| 31 | 12 |
|
| 32 | 12L |
|
| 33 | 13 Tiramisu |
|
| 34 | 14 Upside Down Cake |
|
| 35 | 15 Vanilla Ice Cream |
|
| 36 | 16 Baklava |
|
| 37 | 17 Cinnamon Bun |
|
The command has been stable for a very long time, and the changes have been in what the services
choose to print. dumpsys gfxinfo gained the framestats mode, which turned it from a summary into
a per-frame trace. dumpsys activity grew the activities / processes split when
ActivityTaskManager was carved out. The interface itself — dump(fd, args) — has not changed.
Under the hood#
- Dumpsys.javathe shell command itself: it resolves a name and calls dump(fd, args)
- Binder.javathe base dump implementation every service overrides
- ActivityManagerService.javaa dump method large enough to have its own subcommand dispatch
- WindowManagerService.javathe window dump: hierarchy, layers, focus and insets
Curiosity corner#
dumpsyscan hang. If a service holds its lock and the dump path needs the same lock, your command blocks. A dump that never returns is evidence, not an accident.- The output is not a stable API. Services add, remove and reorder fields between releases. Any
tooling that parses
dumpsysoutput is parsing a debug format, not a contract. dumpsys SurfaceFlingeris a different program's dump. SurfaceFlinger is native, and itsdumpis implemented in C++; the command is the same convention across the whole system.
Try it#
adb shell dumpsys -l | head -40
adb shell dumpsys activity activities | head -40
adb shell dumpsys window windows | grep -E "Window #|mBaseLayer" | head -20
adb shell dumpsys meminfo | head -30
adb shell dumpsys jobscheduler | grep -E "Registered|Pending" | head -20
Run these in order on a device you can afford to poke at. The first tells you what exists, the next three tell you what is running and where it is drawn, and the last tells you what the system intends to do next.
Check yourself#
Check yourself
How does system_server's process come into existence at boot?
Sources#
Sources
Every version number, API level, class name and date on this page is traced to one of these. Pages are re-verified against them; last_verified above says when.
- docsAndroid platform architecture (AOSP)source.android.comaccessed 2026-10-27↩
- docsdumpsysdeveloper.android.comaccessed 2026-10-27↩
- docsWinscopesource.android.comaccessed 2026-10-27↩
- docsBinder overviewsource.android.comaccessed 2026-10-27↩