Search code examples
androidinstallationapkadb

Install and open package through adb


I can install an apk through adb without any issue.

But after I install it, I want to OPEN that package through adb. I want to send an Intent to the package that opens the MAIN or LAUNCHER activity just how the launcher would.

But adb seems to always want to me include an activity name in my intent.

How do I get around this? Can I scan an apk for all the package names? For the main one? Is there a way to open it through adb without an Activity name?


Solution

  • Through adb you can simplify the app opening process by using monkey from adb itself without needing to find the launchable activity.

    For example, to open Facebook:

    adb shell monkey -p com.facebook.katana 1