android am start 启动某个apk
看需要启动的apk目录下的AndroidManifest.xml
am start -a action android:name="android.intent.action.VIEW" -d 输入的数据 -n package="com.android.gallery"/activity android:name="com.android.camera.MovieView
也就是 am -a "action" -d data -n "package/activity"
am start -a android.intent.action.VIEW -d /mnt/video/aaa.mkv -n
com.android.gallery/com.android.camera.MovieView
usage: am [subcommand] [options]
usage: am start [-D] [-W] [-P
[--R COUNT] [-S]
am startservice
am force-stop
am kill
am kill-all
am broadcast
am instrument [-r] [-e
[--no-window-animation]
am profile [looper] start
am profile [looper] stop [
am dumpheap [flags]
am set-debug-app [-w] [--persistent]
am clear-debug-app
am monitor [--gdb
am screen-compat [on|off]
am display-size [reset|MxN]
am to-uri [INTENT]
am to-intent-uri [INTENT]
am start: start an Activity. Options are:
-D: enable debugging
-W: wait for launch to complete
--start-profiler
-P
-R: repeat the activity launch
the top activity will be finished.
-S: force stop the target app before starting the activity
am startservice: start a Service.
am force-stop: force stop everything associated with
am kill: Kill all processes associated with
processes that are safe to kill -- that is, will not impact the user
experience.
am kill-all: Kill all background processes.
am broadcast: send a broadcast Intent.
am instrument: start an Instrumentation. Typically this target
is the form
-r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT). Use with
[-e perf true] to generate raw output for performance measurements.
-e
common form is [-e
-p
-w: wait for instrumentation to finish before returning. Required for
test runners.
--no-window-animation: turn off window animations will running.
am profile: start and stop profiler on a process.
am dumpheap: dump the heap of a process. Options are:
-n: dump native heap instead of managed heap
am set-debug-app: set application
-w: wait for debugger when application starts
--persistent: retain this value
am clear-debug-app: clear the previously set-debug-app.
am monitor: start monitoring for crashes or ANRs.
--gdb: start gdbserv on the given port at crash/ANR
am screen-compat: control screen compatibility mode of
am display-size: override display size.
am to-uri: print the given Intent specification as a URI.
am to-intent-uri: print the given Intent specification as an intent: URI.
[-a ] [-d
[-c
[-e|--es
[--esn
[--ez
[--ei
[--el
[--eu
[--eia
[--grant-read-uri-permission] [--grant-write-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]
[
更多相关文章
- android中在切换fragment时,怎样做到无需重复加载数据的方法。
- Android 将一个数据对象保存到本地以及读取的方法
- 自定义progressBar显示静态数据
- android之解析json数据格式详解
- android 本地存取复杂数据
- android 系统数据库
- android ListView 刷新数据,加载时遇到的数组越界问题
- Android数据库操作工具类分享