dumpsys
Diagnose Android system services status
SYNOPSIS
dumpsys [options] [service_name] [args]
PARAMETERS
-h, --help
Display usage help and available services.
-p <pid>
Dump info for specific process ID only.
-u <uid>
Dump info for specific user ID.
--checkin
Output in a machine-readable checkin format.
--proto <proto>
Output in protocol buffer format.
-l
Dump only the list of services.
-H
Hide non-critical, sensitive details.
--skip <service>
Skip dumping the specified service.
DESCRIPTION
The dumpsys command is an Android-specific debugging tool that extracts and displays detailed state information from various system services running on an Android device. Accessed via adb shell dumpsys, it provides verbose output on components like activities, windows, battery stats, CPU usage, memory allocation, Wi-Fi, Bluetooth, and more.
Primarily used by developers for troubleshooting, performance analysis, and diagnostics, dumpsys reveals internal states not visible through standard apps. For example, dumpsys activity lists running activities and services, while dumpsys battery shows power stats. Output can be voluminous, often piped to files for analysis.
Running without arguments lists all available services. It's invaluable for app optimization, bug hunting, and system monitoring on rooted devices or via ADB. Note it's not a standard Linux command but part of Android's framework.
CAVEATS
Requires ADB shell access on Android device; root often needed for full output. Output is verbose and device-specific; not available on standard desktop Linux. Can impact performance on low-end devices.
COMMON SERVICES
activity: Running tasks/services.
battery: Power stats.
meminfo: Memory usage.
cpuinfo: CPU details.
window: Window hierarchy.
USAGE EXAMPLE
adb shell dumpsys activity services > services.txt
HISTORY
Introduced in Android 1.0 (2008) as part of the Android Debug Bridge toolkit. Evolved with Android versions to support new services and proto formats; key for AOSP development.


