adb gets the Activity name of the current page of the Android phone

method one:

1. Command line input:

adb logcat |grep ActivityManager

Then, a bunch of logs related to Activity will be displayed
write picture description here
. 2. Scroll to the bottom of the log, and then open the interface you want. At the end of the log, the activity name corresponding to the current interface will be updated.

Method Two:

1. Command line input:

adb shell dumpsys activity activities

2. Find the information about the Running activities under the first Stack information. The activity under the first TaskRecord is the activity corresponding to the current interface.
write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325757379&siteId=291194637