问题
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?
回答1:
Adb command for this
adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
回答2:
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"
来源:https://stackoverflow.com/questions/28150650/open-chrome-with-adb