Skip to content

Instantly share code, notes, and snippets.

@karthikeyan1241997
Last active May 25, 2022 05:28
Show Gist options
  • Save karthikeyan1241997/91a13c616a46b8413c6a019b319fe049 to your computer and use it in GitHub Desktop.
Save karthikeyan1241997/91a13c616a46b8413c6a019b319fe049 to your computer and use it in GitHub Desktop.

adb commands

To list services use the follwoing command. adb shell dumpsys activity services

Start activities

  • specifying the action and data uri adb shell am start -a "android.intent.action.VIEW" -d "http://developer.android.com"

  • specifying the action, mime type and an extra string adb shell am start -a "android.intent.action.SEND" --es "android.intent.extra.TEXT" "Hello World" -t "text/plain"

  • specifying an explicit component name adb shell am start -n "com.example.application/.MainActivity"

  • specifying an explicit component name adb shell am startservice -n "com.example.application/.BackgroundService"

  • specifying the action adb shell am broadcast -a "android.intent.action.PACKAGE_FIRST_LAUNCH" -d "com.example.application"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment