Android通过adb启动应用
2015-04-23 15:02
253 查看
在Android中,除了从界面上启动程序之外,还可以从命令行启动程序,使用的是命令行工具am.
启动的方法为
例如,启动包名为com.example.wdy.classifier的应用,启动命令如下:
usage: am [subcommand] [options] start an Activity: am start [-D] -D: enable debugging send a broadcast Intent: am broadcast start an Instrumentation: am instrument [flags] -r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT) -e : set argument to -p : write profiling data to -w: wait for instrumentation to finish before returning start profiling: am profile start stop profiling: am profile stop specifications include these flags: [-a ] [-d ] [-t ] [-c [-c ] ...] [-e|--es ...] [--ez ...] [-e|--ei ...] [-n ] [-f ] []
启动的方法为
$ adb shell $ am start -n {包(package)名}/{包名}.{活动(activity)名称}
例如,启动包名为com.example.wdy.classifier的应用,启动命令如下:
am start -n com.example.wdy.classifier/com.example.wdy.classifier.MainActivity
相关文章推荐
- 通过eclipse开发Android应用,启动adb失败
- android中通过adb shell关闭和启动应用
- Android adb命令大全(通过adb命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)
- 转载 Android 通过adb shell命令查看内存,CPU,启动时间,电量等信息
- Android ADB命令大全(通过ADB命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)
- android -- 小功能 上面通过URL来启动本地应用
- 在Android中通过导入静态数据库来提高应用第一次的启动速度
- android--通过广播启动另一个应用的Activity
- 通过URL Scheme启动Android应用
- 获取整机应用信息以及启动界面(通过adb启动应用)
- 通过ADB命令行卸载或删除你的Android设备中的应用
- Android上面通过URL来启动本地应用
- Android上面通过URL来启动本地应用
- (转)Android开发——通过广播启动另一个应用的Activity
- Android上面通过URL来启动本地应用
- 通过ADB命令行卸载或删除你的Android设备中的应用(转载)
- Android ADB命令大全(通过ADB命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)
- Android开发——通过广播启动另一个应用的Activity
- Android ADB命令大全(通过ADB命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)