How to know app package and activities information without having apk | android app | Appium
In Android app mobile automation,we need apk file of app but sometimes we have to perform action on inbuild app(pre installed) which come with device like call,sms etc.. for this we do not have apk file. Basically in android app automation we need app package information and app activities. In case of apk it is easy to get above information with appium. But if we do not have apk and need the app package/activities information, we can use following command:
Precondition:
1. Android mobile must have developer option set to true.
2. ADB (Android debug bridge) must be configure
3. Android SDK installed.
Step1. Open then command terminal type adb devices and press enter
Step2: Now in mobile, open the app of which you want to get app pkg info/activities. In your mobile, it should be current activated app with focus. Means current window of your mobile should be app like calling/msg/your app window.
Step3: Now type adb shell and press enter to open the adb shell
Step4: type dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp' and press enter
Above command will show the current activated app info of your mobile. Now check the value of mCurrentFocus.
First highlighted text is pkg info
Second highlighted text is app activities info
Here you can see that we can use this:
No comments:
Post a Comment