Search code examples
appium

How to fetch package-name and launcher activity from Android apk


I have an apk file. Now i need to fetch package-name as well as launcher activity from apk so that i can install apk and launch app from my test cases.


Solution

  • Android Aapt provides this feature. Use below commands

    a)package :

    D:\Android\sdk\build-tools\23.0.2>aapt d badging Apk-path\apk-name.apk |grep package
    

    b)launchable-activity:

    aapt d badging Apk-path\apk-name.apk |grep launchable-activity