Skip to content

Instantly share code, notes, and snippets.

@simrat39
Last active May 4, 2019 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simrat39/13eed95bea2f9f6e282e8d2e1eea1539 to your computer and use it in GitHub Desktop.
Save simrat39/13eed95bea2f9f6e282e8d2e1eea1539 to your computer and use it in GitHub Desktop.

Needs ADB to be installed

open terminal / cmd

connect your phone and check with adb devices

run - adb shell

open the app of which you want to know the mainActivity of

while the app is open , run - dumpsys window windows | grep -E mCurrentFocus

appPackage starts with com. and ends before backshash (/). appActivity starts after the backslash (/) and goes till the end.

source - http://www.automationtestinghub.com/apppackage-and-appactivity-name/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment