android adb use a command-line speed in seconds to find the Activity class name of the current display interface

In fact, you go to Baidu to find "find the Activity class names displayed" can get a lot of results, but Baidu of these methods need a couple more steps, I feel very troublesome, then checked himself adb command line and found only one command as follows line can solve the problem (windows system):
adb shell dumpsys Activity Top | the Find "the ACTIVITY"

Grep replaced should find in UNIX / mac above system. Adb shell dumpsys activity top [Expression] grep "ACTIVITY"

adb shell dumpsys activity top |grep -i activity

or

adb shell dumpsys activity |grep -i resumedactivity

adb shell dumpsys activity | grep -i activity // this will print a large amount of information, the above two can

Reproduced in: https: //www.jianshu.com/p/82ae3c40e7f3

Guess you like

Origin blog.csdn.net/weixin_33795093/article/details/91191316