adb view the top layer into the activity name

linux or mac:

New version Android phone

adb shell dumpsys activity | grep "mResumed"

Old version Android phones:

adb shell dumpsys activity | grep "mFocusedActivity"

windows:

adb shell dumpsys activity | findstr "mResumed"

Old version Android phones:

adb shell dumpsys activity | findstr "mFocusedActivity"

Quickly display the top-level Activity through the command line (only the windows method is written here, and the same is true for linux):

1. Create a new topActivity.bat in any directory, right-click to edit the file, and enter

adb shell dumpsys activity | findstr "mResumed"

 2. Save and exit.

3. Modify the environment variables and add the newly created topActivity.bat.

For example, my bat file is created in c:\my_tools\topActivity.bat, copy c:\my_tools

Just add the copied one to the path, I won’t write how to modify the environment variable, everyone is writing JAVA ^_^

 

Guess you like

Origin blog.csdn.net/mldxs/article/details/38751773