前言:am全称为Activity Manager,活动管理器,可以用来控制activity、service;
pm全称Package Manager 包管理器,用以管理系统中安装的应用。
adb shell进入android的命令界面后可执行am与pm命令
1.am命令大全
1.1启动Activity
start-activity [-D] [-N] [-W] [-P <FILE>] [--start-profiler <FILE>][--sampling INTERVAL] [--streaming] [-R COUNT] [-S][--track-allocation] [--user <USER_ID> | current] <INTENT>Start an Activity. Options are:-D: enable debugging-N: enable native debugging-W: wait for launch to complete--start-profiler <FILE>: start profiler and send results to <FILE>--sampling INTERVAL: use sample profiling with INTERVAL microsecondsbetween samples (use with --start-profiler)--streaming: stream the profiling output to the specified file(use with --start-profiler)-P <FILE>: like above, but profiling stops when app goes idle--attach-agent <agent>: attach the given agent before binding--attach-agent-bind <agent>: attach the given agent during binding-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--track-allocation: enable tracking of object allocations--user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.--windowingMode <WINDOWING_MODE>: The windowing mode to launch the activity into.--activityType <ACTIVITY_TYPE>: The activity type to launch the activity as.
正常启动一个Activity
am start-activity cn.pigdreams.ampmdemo/.MainActivity
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=cn.pigdreams.ampmdemo/.MainActivity }am start cn.pigdreams.ampmdemo/.MainActivity
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=cn.pigdreams.ampmdemo/.MainActivity }
- start-activity与start都可以正常启动,两者的作用是一样的。
- 多次调用该方法,最终只会呈现一个Acitivty,按返回键直接退出了应用而不是后续start的Activity
-D -N -W 参数
- -D表示允许调试
- -N表示允许Native调试
- -W表示等待启动完成,会将启动的时长打印出来
am start -W cn.pigdreams.ampmdemo/.MainActivity
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=cn.pigdreams.ampmdemo/.MainActivity }
Status: ok
Activity: cn.pigdreams.ampmdemo/.MainActivity
ThisTime: 545
TotalTime: 545
WaitTime: 977
Complete
-S 参数
会将目标app先停止再启动
am start -S cn.pigdreams.ampmdemo/.MainActivity
Stopping: cn.pigdreams.ampmdemo
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=cn.pigdreams.ampmdemo/.MainActivity }
-R COUNT
重复启动多次Activity,在每次重复启动前,最顶部的Activity将被销毁掉
am start -R 5 cn.pigdreams.ampmdemo/.MainActivity
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=cn.pigdreams.ampmdemo/.MainActivity }
Warning: Activity not started, intent has been delivered to currently running top-most instance.
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=cn.pigdreams.ampmdemo/.MainActivity }
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=cn.pigdreams.ampmdemo/.MainActivity }
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=cn.pigdreams.ampmdemo/.MainActivity }
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=cn.pigdreams.ampmdemo/.MainActivity }
–start-profiler
启动事件分析器并将结果发送到目标文件中
am start --start-profiler /data/local/tmp/test.txt cn.pigdreams.ampmdemo/.MainActivity
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=cn.pigdreams.ampmdemo/.MainActivity }
1.2 启动与停止服务
启动服务 start-service
start-service [--user <USER_ID> | current] <INTENT>Start a Service. Options are:--user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.//实际运行am start-service cn.pigdreams.ampmdemo/.MyService
Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=cn.pigdreams.ampmdemo/.MyService }//logcat,服务已启动10046-10046/cn.pigdreams.ampmdemo D/MyService: service onCreate
启动服务必须用start-service,不能用start,否则无法启动服务,start是默认启动的activity
启动前台服务 start-foreground-service
start-foreground-service [--user <USER_ID> | current] <INTENT>Start a foreground Service. Options are:--user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.
停止服务 stop-service
stop-service [--user <USER_ID> | current] <INTENT>Stop a Service. Options are:--user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.//实际运行
am stop-service cn.pigdreams.ampmdemo/.MyService
Stopping service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=cn.pigdreams.ampmdemo/.MyService }
Service stopped//logcat,服务已销毁
10046-10046/cn.pigdreams.ampmdemo D/MyService: service onDestroy
1.3 其余命令
broadcast [--user <USER_ID> | all | current] <INTENT>Send a broadcast Intent. Options are:--user <USER_ID> | all | current: Specify which user to send to; if notspecified then send to all users.--receiver-permission <PERMISSION>: Require receiver to hold permission.instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w][--user <USER_ID> | current] [--no-hidden-api-checks][--no-window-animation] [--abi <ABI>] <COMPONENT>Start an Instrumentation. Typically this target <COMPONENT> is in theform <TEST_PACKAGE>/<RUNNER_CLASS> or only <TEST_PACKAGE> if thereis only one instrumentation. Options are:-r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT). Use with[-e perf true] to generate raw output for performance measurements.-e <NAME> <VALUE>: set argument <NAME> to <VALUE>. For test runners acommon form is [-e <testrunner_flag> <value>[,<value>...]].-p <FILE>: write profiling data to <FILE>-m: Write output as protobuf to stdout (machine readable)-f <Optional PATH/TO/FILE>: Write output as protobuf to a file (machinereadable). If path is not specified, default directory and file name willbe used: /sdcard/instrument-logs/log-yyyyMMdd-hhmmss-SSS.instrumentation_data_proto-w: wait for instrumentation to finish before returning. Required fortest runners.--user <USER_ID> | current: Specify user instrumentation runs in;current user if not specified.--no-hidden-api-checks: disable restrictions on use of hidden API.--no-window-animation: turn off window animations while running.--abi <ABI>: Launch the instrumented process with the selected ABI.This assumes that the process supports the selected ABI.trace-ipc [start|stop] [--dump-file <FILE>]Trace IPC transactions.start: start tracing IPC transactions.stop: stop tracing IPC transactions and dump the results to file.--dump-file <FILE>: Specify the file the trace should be dumped to.profile [start|stop] [--user <USER_ID> current] [--sampling INTERVAL][--streaming] <PROCESS> <FILE>Start and stop profiler on a process. The given <PROCESS> argumentmay be either a process name or pid. Options are:--user <USER_ID> | current: When supplying a process name,specify user of process to profile; uses current user if not specified.--sampling INTERVAL: use sample profiling with INTERVAL microsecondsbetween samples--streaming: stream the profiling output to the specified filedumpheap [--user <USER_ID> current] [-n] [-g] <PROCESS> <FILE>Dump the heap of a process. The given <PROCESS> argument maybe either a process name or pid. Options are:-n: dump native heap instead of managed heap-g: force GC before dumping the heap--user <USER_ID> | current: When supplying a process name,specify user of process to dump; uses current user if not specified.set-debug-app [-w] [--persistent] <PACKAGE>Set application <PACKAGE> to debug. Options are:-w: wait for debugger when application starts--persistent: retain this valueclear-debug-appClear the previously set-debug-app.set-watch-heap <PROCESS> <MEM-LIMIT>Start monitoring pss size of <PROCESS>, if it is at orabove <HEAP-LIMIT> then a heap dump is collected for the user to report.clear-watch-heapClear the previously set-watch-heap.bug-report [--progress | --telephony]Request bug report generation; will launch a notificationwhen done to select where it should be delivered. Options are:--progress: will launch a notification right away to show its progress.--telephony: will dump only telephony sections.force-stop [--user <USER_ID> | all | current] <PACKAGE>Completely stop the given application package.crash [--user <USER_ID>] <PACKAGE|PID>Induce a VM crash in the specified package or processkill [--user <USER_ID> | all | current] <PACKAGE>Kill all background processes associated with the given application.kill-allKill all processes that are safe to kill (cached, etc).make-uid-idle [--user <USER_ID> | all | current] <PACKAGE>If the given application's uid is in the background and waiting tobecome idle (not allowing background services), do that now.monitor [--gdb <port>]Start monitoring for crashes or ANRs.--gdb: start gdbserv on the given port at crash/ANRwatch-uids [--oom <uid>]Start watching for and reporting uid state changes.--oom: specify a uid for which to report detailed change messages.hang [--allow-restart]Hang the system.--allow-restart: allow watchdog to perform normal system restartrestartRestart the user-space system.idle-maintenancePerform idle maintenance now.screen-compat [on|off] <PACKAGE>Control screen compatibility mode of <PACKAGE>.package-importance <PACKAGE>Print current importance of <PACKAGE>.to-uri [INTENT]Print the given Intent specification as a URI.to-intent-uri [INTENT]Print the given Intent specification as an intent: URI.to-app-uri [INTENT]Print the given Intent specification as an android-app: URI.switch-user <USER_ID>Switch to put USER_ID in the foreground, startingexecution of that user if it is currently stopped.get-current-userReturns id of the current foreground user.start-user <USER_ID>Start USER_ID in background if it is currently stopped;use switch-user if you want to start the user in foregroundunlock-user <USER_ID> [TOKEN_HEX]Attempt to unlock the given user using the given authorization token.stop-user [-w] [-f] <USER_ID>Stop execution of USER_ID, not allowing it to run anycode until a later explicit start or switch to it.-w: wait for stop-user to complete.-f: force stop even if there are related users that cannot be stopped.is-user-stopped <USER_ID>Returns whether <USER_ID> has been stopped or not.get-started-user-state <USER_ID>Gets the current state of the given started user.track-associationsEnable association tracking.untrack-associationsDisable and clear association tracking.get-uid-state <UID>Gets the process state of an app given its <UID>.attach-agent <PROCESS> <FILE>Attach an agent to the specified <PROCESS>, which may be either a process name or a PID.get-config [--days N] [--device] [--proto]Retrieve the configuration and any recent configurations of the device.--days: also return last N days of configurations that have been seen.--device: also output global device configuration info.--proto: return result as a proto; does not include --days info.supports-multiwindowReturns true if the device supports multiwindow.supports-split-screen-multi-windowReturns true if the device supports split screen multiwindow.suppress-resize-config-changes <true|false>Suppresses configuration changes due to user resizing an activity/task.set-inactive [--user <USER_ID>] <PACKAGE> true|falseSets the inactive state of an app.get-inactive [--user <USER_ID>] <PACKAGE>Returns the inactive state of an app.set-standby-bucket [--user <USER_ID>] <PACKAGE> active|working_set|frequent|rarePuts an app in the standby bucket.get-standby-bucket [--user <USER_ID>] <PACKAGE>Returns the standby bucket of an app.send-trim-memory [--user <USER_ID>] <PROCESS>[HIDDEN|RUNNING_MODERATE|BACKGROUND|RUNNING_LOW|MODERATE|RUNNING_CRITICAL|COMPLETE]Send a memory trim event to a <PROCESS>. May also supply a raw trim int level.display [COMMAND] [...]: sub-commands for operating on displays.move-stack <STACK_ID> <DISPLAY_ID>Move <STACK_ID> from its current display to <DISPLAY_ID>.stack [COMMAND] [...]: sub-commands for operating on activity stacks.start <DISPLAY_ID> <INTENT>Start a new activity on <DISPLAY_ID> using <INTENT>move-task <TASK_ID> <STACK_ID> [true|false]Move <TASK_ID> from its current stack to the top (true) orbottom (false) of <STACK_ID>.resize <STACK_ID> <LEFT,TOP,RIGHT,BOTTOM>Change <STACK_ID> size and position to <LEFT,TOP,RIGHT,BOTTOM>.resize-animated <STACK_ID> <LEFT,TOP,RIGHT,BOTTOM>Same as resize, but allow animation.resize-docked-stack <LEFT,TOP,RIGHT,BOTTOM> [<TASK_LEFT,TASK_TOP,TASK_RIGHT,TASK_BOTTOM>]Change docked stack to <LEFT,TOP,RIGHT,BOTTOM>and supplying temporary different task bounds indicated by<TASK_LEFT,TOP,RIGHT,BOTTOM>move-top-activity-to-pinned-stack: <STACK_ID> <LEFT,TOP,RIGHT,BOTTOM>Moves the top activity from<STACK_ID> to the pinned stack using <LEFT,TOP,RIGHT,BOTTOM> for thebounds of the pinned stack.positiontask <TASK_ID> <STACK_ID> <POSITION>Place <TASK_ID> in <STACK_ID> at <POSITION>listList all of the activity stacks and their sizes.info <WINDOWING_MODE> <ACTIVITY_TYPE>Display the information about activity stack in <WINDOWING_MODE> and <ACTIVITY_TYPE>.remove <STACK_ID>Remove stack <STACK_ID>.task [COMMAND] [...]: sub-commands for operating on activity tasks.lock <TASK_ID>Bring <TASK_ID> to the front and don't allow other tasks to run.lock stopEnd the current task lock.resizeable <TASK_ID> [0|1|2|3]Change resizeable mode of <TASK_ID> to one of the following:0: unresizeable1: crop_windows2: resizeable3: resizeable_and_pipableresize <TASK_ID> <LEFT,TOP,RIGHT,BOTTOM>Makes sure <TASK_ID> is in a stack with the specified bounds.Forces the task to be resizeable and creates a stack if no existing stackhas the specified bounds.update-appinfo <USER_ID> <PACKAGE_NAME> [<PACKAGE_NAME>...]Update the ApplicationInfo objects of the listed packages for <USER_ID>without restarting any processes.writeWrite all pending state to storage.
2.pm命令大全
2.1 获取基本信息
path [--user USER_ID] PACKAGEPrint the path to the .apk of the given PACKAGE.dump PACKAGEPrint various system state associated with the given PACKAGE.list featuresPrints all features of the system.has-feature FEATURE_NAME [version]Prints true and returns exit status 0 when system has a FEATURE_NAME,otherwise prints false and returns exit status 1
2.2 打印应用列表
list instrumentation [-f] [TARGET-PACKAGE]Prints all test packages; optionally only those targeting TARGET-PACKAGEOptions:-f: dump the name of the .apk file containing the test packagelist librariesPrints all system libraries.list packages [-f] [-d] [-e] [-s] [-3] [-i] [-l] [-u] [-U][--uid UID] [--user USER_ID] [FILTER]Prints all packages; optionally only those whose name containsthe text in FILTER. Options are:-f: see their associated file-d: filter to only show disabled packages-e: filter to only show enabled packages-s: filter to only show system packages-3: filter to only show third party packages-i: see the installer for the packages-l: ignored (used for compatibility with older releases)-U: also show the package UID-u: also include uninstalled packages--uid UID: filter to only show packages with the given UID--user USER_ID: only list packages belonging to the given userlist permission-groupsPrints all known permission groups.list permissions [-g] [-f] [-d] [-u] [GROUP]Prints all known permissions; optionally only those in GROUP. Options are:-g: organize by group-f: print all information-s: short summary-d: only list dangerous permissions-u: list only the permissions users will see
2.3 获取intent路径
resolve-activity [--brief] [--components] [--user USER_ID] INTENTPrints the activity that resolves to the given INTENT.query-activities [--brief] [--components] [--user USER_ID] INTENTPrints all activities that can handle the given INTENT.query-services [--brief] [--components] [--user USER_ID] INTENTPrints all services that can handle the given INTENT.query-receivers [--brief] [--components] [--user USER_ID] INTENTPrints all broadcast receivers that can handle the given INTENT.
2.4 安装应用/卸载应用
install [-lrtsfdg] [-i PACKAGE] [--user USER_ID|all|current][-p INHERIT_PACKAGE] [--install-location 0/1/2][--originating-uri URI] [---referrer URI][--abi ABI_NAME] [--force-sdk][--preload] [--instantapp] [--full] [--dont-kill][--force-uuid internal|UUID] [--pkg PACKAGE] [-S BYTES] [PATH|-]Install an application. Must provide the apk data to install, either as afile path or '-' to read from stdin. Options are:-l: forward lock application-R: disallow replacement of existing application-t: allow test packages-i: specify package name of installer owning the app-s: install application on sdcard-f: install application on internal flash-d: allow version code downgrade (debuggable packages only)-p: partial application install (new split on top of existing pkg)-g: grant all runtime permissions-S: size in bytes of package, required for stdin--user: install under the given user.--dont-kill: installing a new feature split, don't kill running app--originating-uri: set URI where app was downloaded from--referrer: set URI that instigated the install of the app--pkg: specify expected package name of app being installed--abi: override the default ABI of the platform--instantapp: cause the app to be installed as an ephemeral install app--full: cause the app to be installed as a non-ephemeral full app--install-location: force the install location:0=auto, 1=internal only, 2=prefer external--force-uuid: force install on to disk volume with given UUID--force-sdk: allow install even when existing app targets platformcodename but new one targets a final API levelinstall-create [-lrtsfdg] [-i PACKAGE] [--user USER_ID|all|current][-p INHERIT_PACKAGE] [--install-location 0/1/2][--originating-uri URI] [---referrer URI][--abi ABI_NAME] [--force-sdk][--preload] [--instantapp] [--full] [--dont-kill][--force-uuid internal|UUID] [--pkg PACKAGE] [-S BYTES]Like "install", but starts an install session. Use "install-write"to push data into the session, and "install-commit" to finish.install-write [-S BYTES] SESSION_ID SPLIT_NAME [PATH|-]Write an apk into the given install session. If the path is '-', datawill be read from stdin. Options are:-S: size in bytes of package, required for stdininstall-commit SESSION_IDCommit the given active install session, installing the app.install-abandon SESSION_IDDelete the given active install session.set-install-location LOCATIONChanges the default install location. NOTE this is only intended for debugging;using this can cause applications to break and other undersireable behavior.LOCATION is one of:0 [auto]: Let system decide the best location1 [internal]: Install on internal device storage2 [external]: Install on external mediaget-install-locationReturns the current install location: 0, 1 or 2 as per set-install-location.move-package PACKAGE [internal|UUID]move-primary-storage [internal|UUID]pm uninstall [-k] [--user USER_ID] [--versionCode VERSION_CODE] PACKAGE [SPLIT]Remove the given package name from the system. May remove an entire appif no SPLIT name is specified, otherwise will remove only the split of thegiven app. Options are:-k: keep the data and cache directories around after package removal.--user: remove the app from the given user.--versionCode: only uninstall if the app has the given version code.
2.5 清除应用数据
clear [--user USER_ID] PACKAGEDeletes all data associated with a package.enable [--user USER_ID] PACKAGE_OR_COMPONENTdisable [--user USER_ID] PACKAGE_OR_COMPONENTdisable-user [--user USER_ID] PACKAGE_OR_COMPONENTdisable-until-used [--user USER_ID] PACKAGE_OR_COMPONENTdefault-state [--user USER_ID] PACKAGE_OR_COMPONENTThese commands change the enabled state of a given package orcomponent (written as "package/class").hide [--user USER_ID] PACKAGE_OR_COMPONENTunhide [--user USER_ID] PACKAGE_OR_COMPONENTsuspend [--user USER_ID] TARGET-PACKAGESuspends the specified package (as user).unsuspend [--user USER_ID] TARGET-PACKAGEUnsuspends the specified package (as user).
2.6 权限与授权
grant [--user USER_ID] PACKAGE PERMISSIONrevoke [--user USER_ID] PACKAGE PERMISSIONThese commands either grant or revoke permissions to apps. The permissionsmust be declared as used in the app's manifest, be runtime permissions(protection level dangerous), and the app targeting SDK greater than Lollipop MR1.reset-permissionsRevert all runtime permissions to their default state.set-permission-enforced PERMISSION [true|false]get-privapp-permissions TARGET-PACKAGEPrints all privileged permissions for a package.get-privapp-deny-permissions TARGET-PACKAGEPrints all privileged permissions that are denied for a package.get-oem-permissions TARGET-PACKAGEPrints all OEM permissions for a package.
2.7 app-link
set-app-link [--user USER_ID] PACKAGE {always|ask|never|undefined}get-app-link [--user USER_ID] PACKAGEtrim-caches DESIRED_FREE_SPACE [internal|UUID]Trim cache files to reach the given free space.create-user [--profileOf USER_ID] [--managed] [--restricted] [--ephemeral][--guest] USER_NAMECreate a new user with the given USER_NAME, printing the new user identifierof the user.remove-user USER_IDRemove the user with the given USER_IDENTIFIER, deleting all dataassociated with that userset-user-restriction [--user USER_ID] RESTRICTION VALUEget-max-usersget-max-running-users
2.8 编译相关
compile [-m MODE | -r REASON] [-f] [-c] [--split SPLIT_NAME][--reset] [--check-prof (true | false)] (-a | TARGET-PACKAGE)Trigger compilation of TARGET-PACKAGE or all packages if "-a". Options are:-a: compile all packages-c: clear profile data before compiling-f: force compilation even if not needed-m: select compilation modeMODE is one of the dex2oat compiler filters:assume-verifiedextractverifyquickenspace-profilespacespeed-profilespeedeverything-r: select compilation reasonREASON is one of:first-bootbootinstallbg-dexoptab-otainactiveshared--reset: restore package to its post-install state--check-prof (true | false): look at profiles when doing dexopt?--secondary-dex: compile app secondary dex files--split SPLIT: compile only the given split nameforce-dex-opt PACKAGEForce immediate execution of dex opt for the given PACKAGE.bg-dexopt-jobExecute the background optimizations immediately.Note that the command only runs the background optimizer logic. It mayoverlap with the actual job but the job scheduler will not be able tocancel it. It will also run even if the device is not in the idlemaintenance mode.reconcile-secondary-dex-files TARGET-PACKAGEReconciles the package secondary dex files with the generated oat files.dump-profiles TARGET-PACKAGEDumps method/class profile files to/data/misc/profman/TARGET-PACKAGE.txtsnapshot-profile TARGET-PACKAGE [--code-path path]Take a snapshot of the package profiles to/data/misc/profman/TARGET-PACKAGE[-code-path].profIf TARGET-PACKAGE=android it will take a snapshot of the boot imageset-home-activity [--user USER_ID] TARGET-COMPONENTSet the default home activity (aka launcher).set-installer PACKAGE INSTALLERSet installer package nameget-instantapp-resolverReturn the name of the component that is the current instant app installer.set-harmful-app-warning [--user <USER_ID>] <PACKAGE> [<WARNING>]Mark the app as harmful with the given warning message.get-harmful-app-warning [--user <USER_ID>] <PACKAGE>Return the harmful app warning message for the given app, if presentuninstall-system-updatesRemove updates to all system applications and fall back to their /system version.
2.9 Intent详情
<INTENT> specifications include these flags and arguments:[-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>][-c <CATEGORY> [-c <CATEGORY>] ...][-n <COMPONENT_NAME>][-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 "\,")[-f <FLAG>][--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] [--activity-match-external][--receiver-registered-only] [--receiver-replace-pending][--receiver-foreground] [--receiver-no-abort][--receiver-include-background][--selector][<URI> | <PACKAGE> | <COMPONENT>]