in ADB, Android, Scripting

Random Android Tip: ADB (Android Debug Bridge)

The Android Debug Bridge (adb) is a powerful tool that allows you to communicate with a connected device. One of my favorite features is the ability to start an Activity , BroadcastReceivers or Service while passing intent parameters to it, all from command line.
e.g starting an activity takes the form:

adb shell am start  -n “[your package name here]/[your activity path here]”

Take a look at the attached gist to see how you can do this.


Marking your Activities,Services and Receivers as exported in your app manifest might not be something you want to do in a production app as it might be a security risk if you do not wish to share you app info with any other app.