MainMenu

Home Java Overview Maven Tutorials

Thursday 8 June 2017

How to Find App Package & App Activity



For Video Tutorial : Move on Youtube Channel


Note : Select the playlist as per your need & move with number sequence


Video for this tutorial :

Click here



How to find App package and App Activity ?



In this Article/Tutorial , we will let you know that how to find app package and app activity to automate mobile application.

First of all verify that your mobile device is connected or not.
In windows open the command Prompt (window key + r & then enter "cmd" and hit enter)


Type the command adb devices and hit enter
your device binary name will appear.
Method :1- Enter below commond in commond promt & hit enter

adb shell pm list packages -f



This above command will list all the application path and package names.
Note that above commond prints the package details for all apps in the device.
You can use findstr (grep for mac os) commond to filter only specific apps as shown in below image.


adb shell pm list packages -f | findstr "whatsapp"


Now use below command to copy apk file from mobile/emulator to your machine(computer)
adb pull /system/app/Calculator/Calculator.apk






After that your apk file will be downloaded at user directory
In my computer path is :
C:\Users\cchauhan\com.whatsapp-1.apk

Now open the appium and click on the andriod icon, a pop up window will appear


Now select the check box Application path and click the Choose button, and select your apk file from your machine.

after selecting the apk file, app package and activity will get populated.

enjoy, you have found what you want. :)
Mathod 2 :- Using command : adb shell
dumpsys window windows | grep-E 'mcurrentFocus | mFocusedApp'
In windows open the command Prompt (window key + r & then enter "cmd" and hit enter)
to verify that your device is connected or not type the command adb devices
your device binary name will appear



open the app in your mobile & now type the command :
adb shell
and hit enter key and then
type the command dumpsys window windows | grep -E 'mcurrentFocus | mFocusedApp' and hit enter key
you will find the app package & app activity.


or you can also use dumpsys window windows | grep -E 'mFocusedApp' command to find the app package and app activity.

Congratulation you have found app package and app activity.



Method 3 :- Using Appinfo.apk file(apkinfo android app) :- Step-1:- Download and install Apk Info app from play store


Step-2:- Open the apk info app


Step-3:-Suppose i want to find app package & app activity of Whatsapp
Then i will scroll it upto Whatsapp and then long press on it


Step-4:-Select the detailed information option
, here you will find app package


Step-5:-Scroll down and find the app activity


Congratulation You have done a good job.

Tags :

How to find app package and app activity

,

Commond to find app package and app activity

,

Methods to app package and app activity

,

Different methods to find app package and app activity

.

No comments:

Post a Comment