Get the currently running app package name and activity:
adb shell dumpsys window w |findstr \ |findstr name=
method One in Appium's Android setting, select the app package that you downloaded to your computer to get the activity.
Method Two installs the Build-tools package in ANDROID-SDK and enters this directory.
AAPT dump badging *.apk (download to the app package path on your PC)
method Three connect to the computer and open the app.
ADB devices (see if your phone is connected to your computer)
ADB Logcat | grep Activitymanager (view currently running activity)
Or:
ADB Logcat | grep Displayed (IBID.)
method Four the phone is connected to the computer.
ADB devices (see if your phone is connected to your computer)
ADB shell PM List Packages: Lists all package names to find the package name of the package you are viewing.
ADB shell Dumpsys Package Com.android.XXX: View specific information for a particular packet
Other:
ADB devices: Check to see if your Android device is connected to your computer.
ADB shell Dumpsys activity: see which activity is currently running, some processes that are running, etc.
ADB shell Dumpsys activity activities
ADB shell PM List Packages: Lists all the package names.
ADB Shell Dumpsys Package: Listing information for all installed apps
ADB shell Dumpsys Package Com.android.XXX: View specific information for a particular packet
ADB Shell Dumpsys Activity | grep mfocusedactivity: See which activity is currently being resume
ADB Logcat | grep activitymanager: View the activity that is currently running
ADB Logcat | grep Displayed: View the activity that is currently running
Appium get the package name and main activity for Android app