9

I used to able to launch Chrome using ADB like this:

adb shell am start -n com.android.chrome/com.android.chrome.Main

But now when I try it, I get:

Starting: Intent { cmp=com.android.chrome/.Main }
Error type 3
Error: Activity class {com.android.chrome/com.android.chrome.Main} does not exist.

It seems that the Main Class name has changed. If so, what's the new one?

4
  • 1
    this works fine for me. adb shell am start -a android.intent.action.VIEW -d http://www.stackoverflow.com Commented Jan 26, 2015 at 13:45
  • If you have more than one browser installed, it will ask you which one to use. I want to target Chrome specifically.
    – rmcc
    Commented Jan 26, 2015 at 13:47
  • no if you set default to Chrome Commented Jan 26, 2015 at 13:48
  • 1
    Correct, but as I mentioned, I want to target Chrome specifically. As I do, for example, with Firefox but doing 'adb shell am start -n org.mozilla.fennec/org.mozilla.fennec.App'
    – rmcc
    Commented Jan 26, 2015 at 13:56

3 Answers 3

26

Adb command for this

adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
1
4

To open the default page of Chrome with ADB you can use:

adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main

Instead, to open an url directly you can use:

adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main -d "www.facebook.com"
0
adb shell

webview with default browser:

am start -a android.intent.action.VIEW -d https://www.google.com/

Firefox:

monkey -p org.mozilla.tv.firefox -c android.intent.category.LAUNCHER 1

Chromium:

monkey -p org.chromium.chrome -c android.intent.category.LAUNCHER 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.