Tuesday 9 July 2019

Ways to identify App Package name and App Activity

app package name and App activity
Why there is need of App Package name and App Activity?

App Package name & App Activity name is required when we are doing automation for a particular app.

For example, if we want to automate dialer app using APPIUM (which I will be covering in upcoming posts) , then you need to have app package name & app activity.

Method 1: By using adb command

This is how we can have app package name and app activity

Dialer App
Fig 1. Select the Dialer app and launch


Dialer app
Fig 2. Dialer App launched
To get the package name & activity name run below command after launching the dialer app
adb shell 
shell@LS-5016:/ $dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
Below will be output on the command prompt

Fig 3. Run above command from cmd prompt
Method 2 : By Using aapt dump badging command

For this method, I have considered Amazon app. First we have to place the apk at given path C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\28.0.3

Later we can run below command at command prompt
C:\..\AppData\Local\Android\Sdk\build-tools\28.0.3>aapt dump badging "C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\28.0.3\Amazon Shopping_v18.12.0.100_apkpure.com.apk"
Fig 4. Package name using aapt

Fig 5. App Activity using aapt



5 comments:

  1. I like your post there is a lot of information about software testing, which i would like to learn, thank you for the great guide. Very useful post and I think it is rather easy to see from the other comments as well that this post is well written and useful. I bookmarked this blog a while ago because of the useful content and I am never being disappointed. Keep up the good work.. Read more about QA Services

    ReplyDelete
  2. I like your post there is a lot of information about software testing companies , which i would like to learn, thank you for the great guide.

    ReplyDelete
  3. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. download for pc

    ReplyDelete
  4. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. best pc games under 1gb ram

    ReplyDelete
  5. Thanks for sharing a detailed informative post. Also know more details about product engineering services here.

    ReplyDelete

Feature Posts

Python Appium - Step by step procedure for capturing screenshot

 Why To capture screenshot? It is as important as your logs. If there is any failure for any test scenario, we can provide screenshot for th...