adb shell am start通过模拟发送Intent来启动Activity或Service。 下面是一个使用adb shell am start启动一个Activity的示例。 Intentintent=newIntent();intent.setComponent(newComponentName("com.example.app","com.example.app.MainActivity"));startActivity(intent); 1. 2. 3. 上述示例中,通过创建一个新的Int...
# 使用am命令来启动淘宝Appadb shell am start com.taobao.taobao/com.taobao.tao.TBMainActivity 还可以用来获取应用的启动时间,如下: adb shell am start -W com.qiniu.pili.droid.shortvideo.effect.demo/com.qiniu.pili.droid.shortvideo.demo.activity.MainActivity Starting: Intent { act=android.intent.ac...
adb shell am start –S com.android.camera/.Camera 先停止目标应用,再启动 adb shell am start –W com.android.camera/.Camera 等待应用完成启动 adb shell am start –a android.intent.action.VIEW –d http://testerhome.com 启动默认浏览器打开一个网页 adb shell am start –a android.intent.action...
am全称activity manager,你能使用am参数去模拟各种系统的行为,例如去启动一个activity,强制停止进程,发送广播进程,修改设备屏幕属性等等。 例如: adb shell am start -a android.intent.action.VIEW 关于am参数的一些命令: start [options] :启动activity通过指定的intent参数。具体intent参数参照官方表。 startservice [...
adb shell am 命令 adb shell am start [options] intent 启动由 intent 指定的 Activity。格式与参数如下 start [options] intent 启动由 intent 指定的 Activity。 请参阅 intent 参数的规范。 具体选项包括: -D:启用调试功能。 -W:等待启动完成。
1//使用Action方式打开系统设置-输入法设置2adb shell am start -a android.settings.INPUT_METHOD_SETTINGS34//使用组件名方式启动照相机功能5adb shell am start -n com.android.camera/.Camera67//打开拨号界面,并传递一个DATA_URI数据给拨号界面8am start -a android.intent.action.CALL -d tel:10086 ...
adb shell am start -a android.intent.action.CALL -d tel:10086 启动拨号器拨打 10086 am instrument 启动一个 instrumentation 单元测试或者 Robotium 会用到 am monitor 监控 crash 与 ANR adb shell am monitor 例如:C:\Users\mkcshwzx>adbshell ammonitor ...
adb shell am start-a"android.intent.action.VIEW"-d"https://www.google.com" 上面这个命令会启动浏览器打开谷歌网址页面。 am 也能发送广播和启动服务。比如启动一个广播,一般要添加一个**-a**: 代码语言:javascript 代码运行次数:0 复制 Cloud Studio代码运行 ...
adb shell am start命令还支持其他选项和参数,例如: -a <ACTION>:指定Intent的action。 -d <DATA_URI>:指定Intent的数据URI。 -t <MIME_TYPE>:指定Intent的MIME类型。 -c <CATEGORY>:指定Intent的category。 -e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE>:传递...