How to Find appActivity and appPackage for Android App?

appActivity & appPackage are required to launch a Mobile App on Android device.

In Selenium, we use URL to launch a webpage. However in Appium, it is required to use Activity and Package details of an Android App to launch it on a Device.

Let’s have look at the steps to find out the Activity & Package Name for Android App:

NOTE: Assuming that Android Device is connected to your computer via USB cable and USB Debugging option of Android Device is also enabled.

1. Launch the App that you want to test on Android Device

2. Open command prompt and execute following command to make sure that Android Device is connected:

adb devices


3. Execute following 2 commands one by one to get App Activity and Package Name:

adb shell
dumpsys window windows | grep -E 'mCurrentFocus'


Once you get the appActivity & appPackage, then you need to set them in Desired Capabitites like below:

DesiredCapabilities capabilities =;
capabilities.setCapability("appPackage", "");
capabilities.setCapability("appActivity", "");

If you find the information provided above is useful, please don’t forget to like us on Facebook, you can also leave the comment.

Leave a Reply

Your email address will not be published. Required fields are marked *