一. 打印出设备中所有service的信息

zh@zh:~$adb shell dumpsys -l (字母l)

zh@zh:~$adb shell service list

adb shell dumpsys的用法_android


二.查询到运行的system service后,就可以在dumpsys后面加上service的名字,查看指定的service信息

zh@zh:~$adb shell dumpsys activity

a.

zh@zh:~$adb shell dumpsys activity recents | more 

adb shell dumpsys的用法_android_02

延伸:另一个命令:adb shell am stack list

adb shell dumpsys的用法_android_03


b.

zh@zh:~$adb shell dumpsys activity activities | more

adb shell dumpsys的用法_android_04


zh@zh:~$adb shell dumpsys dropbox

Usage: dumpsys dropbox [--print|--file] [YYYY-mm-dd] [HH:MM:SS] [tag]

a.

adb shell dumpsys的用法_android_05

b.

zh@zh:~$adb shell dumpsys dropbox --print system_server_wtf |more

adb shell dumpsys的用法_android_06

c.

zh@zh:~$adb shell dumpsys activity services | more

adb shell dumpsys的用法_android_07



zh@zh:~$adb shell dumpsys battery

adb shell dumpsys的用法_android_08


zh@zh:~$adb shell dumpsys display | more

adb shell dumpsys的用法_android_09

延伸:

zh@zh:~$adb shell wm --help

adb shell dumpsys的用法_android_10



zh@zh:~$adb shell dumpsys cpuinfo

adb shell dumpsys的用法_android_11


zh@zh:~$adb shell dumpsys window -h

zh@zh:~$adb shell dumpsys window displays

adb shell dumpsys的用法_android_12

延伸:

adb shell dumpsys的用法_android_13


zh@zh:~$adb shell dumpsys package -h

zh@zh:~$adb shell dumpsys meminfo com.android.systemui


zh@zh:~$adb shell dumpsys usagestats

adb shell dumpsys的用法_android_14