问题描述
如何使用adb shell命令启动浏览器并使其打开某个网页?
运行此命令将在Android中启动Web浏览器:
adb shell am start -a android.intent.action.VIEW -d http://www.stackoverflow.com
其他推荐答案
如果您的网址是符号重,您还应该引用攻击性
adb shell am start -a android.intent.action.VIEW -d 'http://stackoverflow.com/?uid=isme&debug=true'
其他推荐答案
如果您想专门启动Chrome
adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main -a android.intent.action.VIEW -d 'file:///sdcard/lazer.html'
还通过
给出到SDCARD的Chrome
adb shell pm grant com.android.chrome android.permission.READ_EXTERNAL_STORAGE
交换com.android.chrome与com.chrome.canary如果您使用的是Chrome Canary版本.