Android系统下好用的shell命令
来源:互联网 发布:java webservice传xml 编辑:程序博客网 时间:2024/06/06 09:50
首先要知道am其实就是ActivityManager的缩写!
使用am可以很方便执行很多操作,比如启动一个应用,启动一个服务,发送一个广播 ,等等。。。
下面是一个通用的参数,通过这写参数就可以很好的使用上面的功能:
[-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>] [-c <CATEGORY> [-c <CATEGORY>] ...] [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...] [--esn <EXTRA_KEY> ...] [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...] [--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...] [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...] [--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...] [--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...] [--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>] [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]] (mutiple extras passed as Integer[]) [--eial <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]] (mutiple extras passed as List<Integer>) [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]] (mutiple extras passed as Long[]) [--elal <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]] (mutiple extras passed as List<Long>) [--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]] (mutiple extras passed as Float[]) [--efal <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]] (mutiple extras passed as List<Float>) [--esa <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]] (mutiple extras passed as String[]; to embed a comma into a string, escape it using "\,") [--esal <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]] (mutiple extras passed as List<String>; to embed a comma into a string, escape it using "\,") [--grant-read-uri-permission] [--grant-write-uri-permission] [--grant-persistable-uri-permission] [--grant-prefix-uri-permission] [--debug-log-resolution] [--exclude-stopped-packages] [--include-stopped-packages] [--activity-brought-to-front] [--activity-clear-top] [--activity-clear-when-task-reset] [--activity-exclude-from-recents] [--activity-launched-from-history] [--activity-multiple-task] [--activity-no-animation] [--activity-no-history] [--activity-no-user-action] [--activity-previous-is-top] [--activity-reorder-to-front] [--activity-reset-task-if-needed] [--activity-single-top] [--activity-clear-task] [--activity-task-on-home] [--receiver-registered-only] [--receiver-replace-pending] [--selector] [<URI> | <PACKAGE> | <COMPONENT>] [-c <CATEGORY> [-c <CATEGORY>] ...] [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...] [--esn <EXTRA_KEY> ...] [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...] [--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...] [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...] [--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...] [--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...] [--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>] [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]] (mutiple extras passed as Integer[]) [--eial <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]] (mutiple extras passed as List<Integer>) [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]] (mutiple extras passed as Long[]) [--elal <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]] (mutiple extras passed as List<Long>) [--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]] (mutiple extras passed as Float[]) [--efal <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]] (mutiple extras passed as List<Float>) [--esa <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]] (mutiple extras passed as String[]; to embed a comma into a string, escape it using "\,") [--esal <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]] (mutiple extras passed as List<String>; to embed a comma into a string, escape it using "\,") [--grant-read-uri-permission] [--grant-write-uri-permission] [--grant-persistable-uri-permission] [--grant-prefix-uri-permission] [--debug-log-resolution] [--exclude-stopped-packages] [--include-stopped-packages] [--activity-brought-to-front] [--activity-clear-top] [--activity-clear-when-task-reset] [--activity-exclude-from-recents] [--activity-launched-from-history] [--activity-multiple-task] [--activity-no-animation] [--activity-no-history] [--activity-no-user-action] [--activity-previous-is-top] [--activity-reorder-to-front] [--activity-reset-task-if-needed] [--activity-single-top] [--activity-clear-task] [--activity-task-on-home] [--receiver-registered-only] [--receiver-replace-pending] [--selector] [<URI> | <PACKAGE> | <COMPONENT>]
- 启动一个应用:
adb shell am start -n "com.example.huanglei.test/com.example.huanglei.test.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER-D: enable debugging -W: wait for launch to complete --start-profiler <FILE>: start profiler and send results to <FILE> --sampling INTERVAL: use sample profiling with INTERVAL microseconds between samples (use with --start-profiler) -P <FILE>: like above, but profiling stops when app goes idle -R: repeat the activity launch <COUNT> times. Prior to each repeat, the top activity will be finished. -S: force stop the target app before starting the activity --opengl-trace: enable tracing of OpenGL functions --user <USER_ID> | current: Specify which user to run as; if not specified then run as the current user.
- 启动一个服务:
adb shell am startservice -a ecarx.intent.action.NAVI_SERVICE_STARTED -c ecarx.intent.category.NAVI - 发送一个广播:
adb shell am broadcast -a com.haley.b.TEST_ACTION
wm (WindowManager) 用来管理窗口的,比如获取和设置屏幕的分辨率,可以通过设置这个值来查看你的做的界面是否适配很方便。 usage: wm [subcommand] [options]
wm size [reset|WxH]
wm density [reset|DENSITY]
wm overscan [reset|LEFT,TOP,RIGHT,BOTTOM]
0 0
- Android系统下好用的shell命令
- Android shell 系统命令
- Android shell 系统命令
- Android shell 系统命令大全
- Android shell 系统命令大全
- Android shell 系统命令大全
- Android系统 adb shell命令大全
- Android系统shell中的clear命令实现
- Android系统shell中的df命令实现
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- AI日报(11.15)
- 谁是我邻居--kdTree&OcTree
- leetcode_347. Top K Frequent Elements 找出现频率最高的前k个元素
- linux deploy 设置root账户密码
- 邻居,咱俩关系近么---欧几里得与区域生长算法
- Android系统下好用的shell命令
- 算法基础
- link和@import的区别
- linux下与windows下的换行符
- Android System Server进程源码分析 下
- 【hdu 1233】还是畅通工程(kruskal)
- webView网页中JS调原生OC方法与JS注入
- Nginx介绍及Nginx的优点
- POJ 2676 Sudoku