If device is already connected and device id is shown there then use command “adb shell” but make sure your device is unlocked.
Note:- If device id is not shown there then first run “adb devices” and further “adb shell”
After running “adb shell” command then see screen will look like below screen. It is successful.
Now open the app on device which want to test, as we used “play store”.
Now run command “ dumpsys window windows | grep -E ‘mCurrentFocus’ “
Now see “ app package name and app activity name” both are appeared there.
“com.android.vending” is package name and “com.android.vending.AssetBrowserActivity” is activity name of app.