2/25/2021 dumpsys-LXG Blog | Li Xiaogang's Blog
Android (/tags/#Android) debug (/tags/#debug) dumpsys (/tags/#dumpsys)
dumpsys
android debug
Posted by LXG on September 27, 2018
dumpsys -l
Service
Name Class name Features details
activity ActivityManagerService AMS related
information
package PackageManagerService PMS related
information
ethernet EthernetService wired network
device_policy DevicePolicyManagerService Device manager
deviceidle DeviceIdleController Battery
optimization
usb UsbService usb device related
connectivity ConnectivityService Connection
management
appops AppOpsService Application data/system/appops.xml
permission
management
PMS
https://lixiaogang03.github.io/2018/09/27/dumpsys/ 1/4
2/25/2021 dumpsys-LXG Blog | Li Xiaogang's Blog
L2K:/ # dumpsys package -h
Package manager dump options:
[-h] [-f] [--checkin] [cmd] ...
--checkin: dump for a checkin
-f: print details of intent filters // dumpsy
-h: print this help
cmd may be one of:
l[ibraries]: list known shared libraries //共享库
f[eatures]: list device features //设备 fea
k[eysets]: print known keysets //
r[esolvers] [activity|service|receiver|content]: dump intent resolvers // Intent
perm[issions]: dump permissions //权限
permission [name ...]: dump declaration and use of given permission //指定权限
pref[erred]: print preferred package settings //默认指定
preferred-xml [--full]: print preferred package settings as xml
prov[iders]: dump content providers
p[ackages]: dump installed packages
s[hared-users]: dump shared user IDs // share
m[essages]: print collected runtime messages //运⾏时的
v[erifiers]: print package verifier info
d[omain-preferred-apps]: print domains preferred apps
i[ntent-filter-verifiers]|ifv: print intent filter verifier info
version: print database version info
write: write current settings now
installs: details about install sessions
check-permission <permission> <package> [<user>]: does pkg hold perm?
dexopt: dump dexopt state
compiler-stats: dump compiler statistics
<package.name>: info about given package
AMS
https://lixiaogang03.github.io/2018/09/27/dumpsys/ 2/4
2/25/2021 dumpsys-LXG Blog | Li Xiaogang's Blog
L2K:/ $ dumpsys activity -h
Activity manager dump options:
[-a] [-c] [-p PACKAGE] [-h] [WHAT] ...
WHAT may be one of:
a[ctivities]: activity stack state // ActivitySt
r[recents]: recent activities state // Recent act
b[roadcasts] [PACKAGE_NAME] [history [-s]]: broadcast state //
broadcast-stats [PACKAGE_NAME]: aggregated broadcast statistics //
i[ntents] [PACKAGE_NAME]: pending intent state
p[rocesses] [PACKAGE_NAME]: process state // 查看进程状态
o[om]: out of memory management // 查看进程 oo
perm[issions]: URI permission grant state
prov[iders] [COMP_SPEC ...]: content provider state
provider [COMP_SPEC]: provider client-side state
s[ervices] [COMP_SPEC ...]: service state
as[sociations]: tracked app associations
service [COMP_SPEC]: service client-side state
package [PACKAGE_NAME]: all state related to given package // 查看某个应⽤
all: dump all activities
top: dump the top activity // 查看顶层的Ac
WHAT may also be a COMP_SPEC to dump activities.
COMP_SPEC may be a component name (com.foo/.myApp),
a partial substring in a component name, a
hex object identifier.
-a: include all available server state. // 查看所有的AM
-c: include client state.
-p: limit output to given package. // 查看指定包的
--checkin: output checkin format, resetting data.
--C: output checkin format, not resetting data.
Reference article
dumpsys command usage (http://gityuan.com/2016/05/14/dumpsys-command/)
Read the bug report (https://source.android.google.cn/setup/read-bug-reports)
Official tutorial (https://developer.android.com/studio/command-line/dumpsys)
PREVIOUS NEXT
HELLO (/2018/09/27/HELLO-2018/) ADB SHELL CONMAND (/2018/10/10/ADB-
SHELL-COMMAND/)
FEATURED TAGS (/tags/)
https://lixiaogang03.github.io/2018/09/27/dumpsys/ 3/4
2/25/2021 dumpsys-LXG Blog | Li Xiaogang's Blog
Android (/tags/#Android) debug (/tags/#debug) dumpsys (/tags/#dumpsys) shell (/tags/#shell)
linux (/tags/#linux) Permission (/tags/#Permission) Security (/tags/#Security) SELinux (/tags/#SELinux)
psychology (/tags/# ⼼理学) ubuntu (/tags/#ubuntu) JNI (/tags/#JNI) android (/tags/#android)
IMS (/tags/#IMS) systemui (/tags/#systemui) selinux (/tags/#selinux) e.g (/tags/#eSIM)
androidstudio (/tags/#androidstudio) performance (/tags/#performance) pms (/tags/#pms) wms (/tags/#wms)
view (/tags/#view) iptables (/tags/#iptables) property (/tags/#property) c++ (/tags/#c++)
statusbar (/tags/#statusbar)
FRIENDS
Gityuan (http://gityuan.com) Brief Book·LXG (https://www.jianshu.com/u/79cdf82d2b98)
Android Developer (https://developer.android.google.cn/) AOSP (https://source.android.com/)
(/feed.xml)
simple(https://www.jianshu.com/u/79cdf82d2b98)
(https://github.com/lixiaogang03)
Copyright © LXG Blog 2021
Theme on GitHub (https://github.com/lixiaogang03/lixiaogang03.github.io.git) | Star 1
https://lixiaogang03.github.io/2018/09/27/dumpsys/ 4/4