There are three ways to
find app package and activity form apk, here I'm trying to show the ways
Way 1: By using Appium server
Way 2: By using APK Info application
Way 1: By using Appium server
- Install the old version of Appium on your PC (Appium 1.2.2)
- Open the Appium server > Click on the Android icon > Check the Application Path check box> Choose > Select apk file
- Package and Launch Activity will be populated automatically
- Use Package as appPackage and Launch Activity as appActivity
Way 2: By using APK Info application
- Install test application(which you want to test) on your device
- Install 'APK Info' application on your device from Play Store(Play Store link)
- Open 'APK Info' application > Long press on desired application (in my case 'Calculator')
- Detailed Information
- Collect the appPackage and appActivity from below the Activates title
Note: For some application appPackage and appActivity not same for that case you should use uiautomatorviewer.bat for collecting app package
Way 3: By using Windows command prompt
For that you must have installed the Android SDK and set up
Android Environment Variables on you system
- Connect your android device via USB cable with PC
- Go to command prompt and type adb devices make sure your device is connected with PC
- Then run the command adb shell
- Now grab your mobile phone, and open the application (for which you want to find the appPackage and appActivity), for my case Calculator
- Run the command dumpsys window windows | grep -E ‘mCurrentFocus’
It’s a great post. Keep sharing such kind of worthy information.
ReplyDeleteMobile Testing Training in Chennai | Mobile Testing Course in Chennai
Good Post! Thank you so much for sharing this pretty post,
ReplyDeleteAndroid Training Institute in Chennai | Android Training Institute in anna nagar | Android Training Institute in omr | Android Training Institute in porur | Android Training Institute in tambaram | Android Training Institute in velachery