For appium/android automation testing, the Launcher activity is one of DesiredCapabilities to setup initialize running step. so below is way that use adb command to find it.
From command line/terminal, type command(com.android.launcher3 is package name)
- adb shell dumpsys window windows | grep -i com.android.launcher3 (MAC/LINUX)
- adb shell dumpsys window windows | findstr com.android.launcher3 (WINDOWS)
For more solutions, please find at: http://stackoverflow.com/questions/12698814/get-launchable-activity-name-of-package-from-adb
The other way:
- open the application you want to get activity
- open command line/terminal and type command below:
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
(MAC)
adb shell dumpsys window windows | find "mCurrentFocus"
(WINDOWS)