How to start an application using android ADB tools?


Question

How do I send an intent using Android's ADB tools?

1
427
3/11/2011 12:55:35 PM

Accepted Answer

adb shell
am start -n com.package.name/com.package.name.ActivityName

Or you can use this directly:

adb shell am start -n com.package.name/com.package.name.ActivityName

You can also specify actions to be filter by your intent-filters:

am start -a com.example.ACTION_NAME -n com.package.name/com.package.name.ActivityName 
578
12/31/2010 3:40:29 AM

It's possible to run application specifying package name only using monkey tool by follow this pattern:

adb shell monkey -p your.app.package.name -c android.intent.category.LAUNCHER 1

Command is used to run app using monkey tool which generates random input for application. The last part of command is integer which specify the number of generated random input for app. In this case the number is 1, which in fact is used to launch the app (icon click).


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon