1、查看当前界面的activity
$ dumpsys activity top
$ dumpsys activity top | grep ACTIVITY
$ dumpsys activity top | grep ACTIVITY | tail -n 1
2、查看当前界面的Fragment
$ dumpsys activity top | grep '#0: '
$ dumpsys activity top | grep '#0: ' | tail -n 1
3、查看Activity任务栈
$ dumpsys activity activities
$ dumpsys activity activities | grep ActivityRecord
4、查看Window的堆信息
$ dumpsys window -h
$ dumpsys window l
$ dumpsys window p
$ dumpsys window a
$ dumpsys window s
$ dumpsys window d
$ dumpsys window t
$ dumpsys window w
$ dumpsys window | grep mCurrentFocus
5、查看应用信息
$ dumpsys package com.android.settings
$ dumpsys package com.android.settings | grep version
6、dumpsys基础命令
$ dumpsys --help
$ dumpsys -l
$ dumpsys activity -h
$ dumpsys | grep BroadcastRecord