adb 命令查看当前与用户交互的activity
用adb命令查看当前与用户交互的activity
adb shell "dumpsys activity | grep mResumed"
shell后面一定要加引号,不然会报错:‘grep’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
D:\work\xxxx>adb shell "dumpsys activity | grep mResumed"
mFocusedActivity: ActivityRecord{e7bf55c u0 ***com.xxx.xxxx/.activity.MatchLiveActivity*** t118}
mFocusedStack=ActivityStack{35fa3e5 stackId=1, 3 tasks} mLastFocusedStack=ActivityStack{35fa3e5 stackId=1, 3 tasks}
查看该应用包名下的activity栈(过滤)
dumpsys activity | grep “xxxx” -----Linux(Android手机)
dumpsys activity | findstr “xxxx” -----Windows
adb shell
dumpsys activity | grep "包名(中的字符串)"