Get the package name and activity of the currently running APP:
adb shell dumpsys window w |findstr \/ |findstr name=
Method 1 Select the app package downloaded to the computer in the android setting of appium to get the Activity.
Method 2 Install the build-tools package in android-sdk and enter this directory.
aapt dump badging *.apk (the path of the app package downloaded to the computer)
Method 3 Connect to the computer and open the app.
adb devices (to see if the phone is connected to the computer)
adb logcat | grep ActivityManager (view currently running Activity)
or:
adb logcat | grep Displayed (same as above)
Method 4 Connect the phone to the computer.
adb devices (to see if the phone is connected to the computer)
adb shell pm list packages: List all package names and find the package name of the viewed package.
adb shell dumpsys package com.android.XXX: View the specific information of a package
other:
adb devices: Check if the Android device is connected to the computer.
adb shell dumpsys activity: View which activity is currently running, some running processes, etc.
adb shell dumpsys activity activities
adb shell pm list packages: List all package names.
adb shell dumpsys package: List all installed application information
adb shell dumpsys package com.android.XXX: View the specific information of a package
adb shell dumpsys activity | grep mFocusedActivity: View which activity is currently resumed
adb logcat | grep ActivityManager: View currently running Activity
adb logcat | grep Displayed: View currently running Activity
Method 1 Select the app package downloaded to the computer in the android setting of appium to get the Activity.
Method 2 Install the build-tools package in android-sdk and enter this directory.
aapt dump badging *.apk (the path of the app package downloaded to the computer)
Method 3 Connect to the computer and open the app.
adb devices (to see if the phone is connected to the computer)
adb logcat | grep ActivityManager (view currently running Activity)
or:
adb logcat | grep Displayed (same as above)
Method 4 Connect the phone to the computer.
adb devices (to see if the phone is connected to the computer)
adb shell pm list packages: List all package names and find the package name of the viewed package.
adb shell dumpsys package com.android.XXX: View the specific information of a package
other:
adb devices: Check if the Android device is connected to the computer.
adb shell dumpsys activity: View which activity is currently running, some running processes, etc.
adb shell dumpsys activity activities
adb shell pm list packages: List all package names.
adb shell dumpsys package: List all installed application information
adb shell dumpsys package com.android.XXX: View the specific information of a package
adb shell dumpsys activity | grep mFocusedActivity: View which activity is currently resumed
adb logcat | grep ActivityManager: View currently running Activity
adb logcat | grep Displayed: View currently running Activity