Android cmd 命令常用参数详解

本文详尽介绍了 Android 平台下 CMD 命令的使用方法,包括了 package 编译、权限管理、应用操作、系统设置、调试工具等多方面的功能,是开发者进行 Android 应用开发和系统调试的必备指南。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.youkuaiyun.com/ZHOUYONGXYZ/article/details/80538019

Android cmd 命令包含了我们之前使用am pm sm 等等命令的集合功能非常强大,下面随便列举一些很实用的功能

1. adb shell cmd package


    
  1. compile [-m MODE | -r REASON] [-f] [-c] [--split SPLIT_NAME]
  2. [--reset] [--check-prof ( true | false)] (-a | TARGET-PACKAGE)
  3. Trigger compilation of TARGET-PACKAGE or all packages if "-a".
  4. Options:
  5. -a: compile all packages
  6. -c: clear profile data before compiling
  7. -f: force compilation even if not needed
  8. -m: select compilation mode
  9. MODE is one of the dex2oat compiler filters:
  10. assume-verified
  11. extract
  12. verify
  13. quicken
  14. space-profile
  15. space
  16. speed-profile
  17. speed
  18. everything
  19. -r: select compilation reason
  20. REASON is one of:
  21. first-boot
  22. boot
  23. install
  24. bg-dexopt
  25. ab-ota
  26. inactive
  27. shared
  28. --reset: restore package to its post-install state
  29. --check-prof ( true | false): look at profiles when doing dexopt?
  30. --secondary-dex: compile app secondary dex files
  31. --split SPLIT: compile only the given split name
  32. bg-dexopt-job
  33. Execute the background optimizations immediately.
  34. Note that the command only runs the background optimizer logic. It may
  35. overlap with the actual job but the job scheduler will not be able to
  36. cancel it. It will also run even if the device is not in the idle
  37. maintenance mode.
  38. list features
  39. Prints all features of the system.
  40. list instrumentation [-f] [TARGET-PACKAGE]
  41. Prints all test packages; optionally only those targeting TARGET-PACKAGE
  42. Options:
  43. -f: dump the name of the .apk file containing the test package
  44. list libraries
  45. Prints all system libraries.
  46. list packages [-f] [-d] [-e] [-s] [ -3] [-i] [-l] [-u] [-U] [--uid UID] [--user USER_ID] [FILTER]
  47. Prints all packages; optionally only those whose name contains
  48. the text in FILTER.
  49. Options:
  50. -f: see their associated file
  51. -d: filter to only show disabled packages
  52. -e: filter to only show enabled packages
  53. -s: filter to only show system packages
  54. -3: filter to only show third party packages
  55. -i: see the installer for the packages
  56. -l: ignored (used for compatibility with older releases)
  57. -U: also show the package UID
  58. -u: also include uninstalled packages
  59. --uid UID: filter to only show packages with the given UID
  60. --user USER_ID: only list packages belonging to the given user
  61. reconcile-secondary-dex-files TARGET-PACKAGE
  62. Reconciles the package secondary dex files with the generated oat files.
  63. list permission-groups
  64. Prints all known permission groups.
  65. list permissions [-g] [-f] [-d] [-u] [ GROUP]
  66. Prints all known permissions; optionally only those in GROUP.
  67. Options:
  68. -g: organize by group
  69. -f: print all information
  70. -s: short summary
  71. -d: only list dangerous permissions
  72. -u: list only the permissions users will see
  73. dump-profiles TARGET-PACKAGE
  74. Dumps method/ class profile files to
  75. /data/misc/profman/TARGET-PACKAGE.txt
  76. resolve-activity [--brief] [--components] [--user USER_ID] INTENT
  77. Prints the activity that resolves to the given Intent.
  78. query-activities [--brief] [--components] [--user USER_ID] INTENT
  79. Prints all activities that can handle the given Intent.
  80. query-services [--brief] [--components] [--user USER_ID] INTENT
  81. Prints all services that can handle the given Intent.
  82. query-receivers [--brief] [--components] [--user USER_ID] INTENT
  83. Prints all broadcast receivers that can handle the given Intent.
  84. suspend [--user USER_ID] TARGET-PACKAGE
  85. Suspends the specified package ( as user).
  86. unsuspend [--user USER_ID] TARGET-PACKAGE
  87. Unsuspends the specified package ( as user).
  88. set-home-activity [--user USER_ID] TARGET-COMPONENT
  89. set the default home activity (aka launcher).
  90. has-feature FEATURE_NAME [version]
  91. prints true and returns exit status 0 when system has a FEATURE_NAME,
  92. otherwise prints false and returns exit status 1
  93. <INTENT> specifications include these flags and arguments:
  94. [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>]
  95. [-c <CATEGORY> [-c <CATEGORY>] ...]
  96. [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...]
  97. [--esn <EXTRA_KEY> ...]
  98. [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]
  99. [--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]
  100. [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]
  101. [--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]
  102. [--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]
  103. [--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>]
  104. [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
  105. (mutiple extras passed as Integer[])
  106. [--eial <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
  107. (mutiple extras passed as List< Integer>)
  108. [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
  109. (mutiple extras passed as Long[])
  110. [--elal <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
  111. (mutiple extras passed as List< Long>)
  112. [--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
  113. (mutiple extras passed as Float[])
  114. [--efal <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
  115. (mutiple extras passed as List<Float>)
  116. [--esa <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]]
  117. (mutiple extras passed as String[]; to embed a comma into a string,
  118. escape it using "\,")
  119. [--esal <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]]
  120. (mutiple extras passed as List< String>; to embed a comma into a string,
  121. escape it using "\,")
  122. [-f <FLAG>]
  123. [--grant-read-uri-permission] [--grant-write-uri-permission]
  124. [--grant-persistable-uri-permission] [--grant-prefix-uri-permission]
  125. [--debug-log-resolution] [--exclude-stopped-packages]
  126. [--include-stopped-packages]
  127. [--activity-brought- to-front] [--activity-clear-top]
  128. [--activity-clear- when-task-reset] [--activity-exclude- from-recents]
  129. [--activity-launched- from-history] [--activity-multiple-task]
  130. [--activity-no-animation] [--activity-no-history]
  131. [--activity-no-user-action] [--activity-previous- is-top]
  132. [--activity-reorder- to-front] [--activity-reset-task- if-needed]
  133. [--activity- single-top] [--activity-clear-task]
  134. [--activity-task- on-home]
  135. [--receiver-registered-only] [--receiver-replace-pending]
  136. [--receiver-foreground] [--receiver-no-abort]
  137. [--receiver-include-background]
  138. [--selector]
  139. [<URI> | <PACKAGE> | <COMPONENT>]

2. adb shell cmd activity


    
  1. start-activity [-D] [-N] [-W] [-P <FILE>] [--start-profiler <FILE>]
  2. [--sampling INTERVAL] [--streaming] [-R COUNT] [-S]
  3. [--track-allocation] [--user <USER_ID> | current] <INTENT>
  4. Start an Activity. Options are:
  5. -D: enable debugging
  6. -N: enable native debugging
  7. -W: wait for launch to complete
  8. --start-profiler <FILE>: start profiler and send results to <FILE>
  9. --sampling INTERVAL: use sample profiling with INTERVAL microseconds
  10. between samples (use with --start-profiler)
  11. --streaming: stream the profiling output to the specified file
  12. (use with --start-profiler)
  13. -P <FILE>: like above, but profiling stops when app goes idle
  14. --attach-agent <agent>: attach the given agent before binding
  15. -R: repeat the activity launch <COUNT> times. Prior to each repeat,
  16. the top activity will be finished.
  17. -S: force stop the target app before starting the activity
  18. --track-allocation: enable tracking of object allocations
  19. --user <USER_ID> | current: Specify which user to run as; if not
  20. specified then run as the current user.
  21. --stack <STACK_ID>: Specify into which stack should the activity be put.
  22. start-service [--user <USER_ID> | current] <INTENT>
  23. Start a Service. Options are:
  24. --user <USER_ID> | current: Specify which user to run as; if not
  25. specified then run as the current user.
  26. start-foreground-service [--user <USER_ID> | current] <INTENT>
  27. Start a foreground Service. Options are:
  28. --user <USER_ID> | current: Specify which user to run as; if not
  29. specified then run as the current user.
  30. stop-service [--user <USER_ID> | current] <INTENT>
  31. Stop a Service. Options are:
  32. --user <USER_ID> | current: Specify which user to run as; if not
  33. specified then run as the current user.
  34. broadcast [--user <USER_ID> | all | current] <INTENT>
  35. Send a broadcast Intent. Options are:
  36. --user <USER_ID> | all | current: Specify which user to send to; if not
  37. specified then send to all users.
  38. --receiver-permission <PERMISSION>: Require receiver to hold permission.
  39. instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]
  40. [--user <USER_ID> | current]
  41. [--no-window-animation] [--abi <ABI>] <COMPONENT>
  42. Start an Instrumentation. Typically this target <COMPONENT> is in the
  43. form <TEST_PACKAGE>/<RUNNER_CLASS> or only <TEST_PACKAGE> if there
  44. is only one instrumentation. Options are:
  45. -r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT). Use with
  46. [-e perf true] to generate raw output for performance measurements.
  47. -e <NAME> <VALUE>: set argument <NAME> to <VALUE>. For test runners a
  48. common form is [-e <testrunner_flag> <value>[,<value>...]].
  49. -p <FILE>: write profiling data to <FILE>
  50. -m: Write output as protobuf (machine readable)
  51. -w: wait for instrumentation to finish before returning. Required for
  52. test runners.
  53. --user <USER_ID> | current: Specify user instrumentation runs in;
  54. current user if not specified.
  55. --no-window-animation: turn off window animations while running.
  56. --abi <ABI>: Launch the instrumented process with the selected ABI.
  57. This assumes that the process supports the selected ABI.
  58. trace-ipc [start| stop] [--dump-file <FILE>]
  59. Trace IPC transactions.
  60. start: start tracing IPC transactions.
  61. stop: stop tracing IPC transactions and dump the results to file.
  62. --dump-file <FILE>: Specify the file the trace should be dumped to.
  63. profile [start| stop] [--user <USER_ID> current] [--sampling INTERVAL]
  64. [--streaming] <PROCESS> <FILE>
  65. Start and stop profiler on a process. The given <PROCESS> argument
  66. may be either a process name or pid. Options are:
  67. --user <USER_ID> | current: When supplying a process name,
  68. specify user of process to profile; uses current user if not specified.
  69. --sampling INTERVAL: use sample profiling with INTERVAL microseconds
  70. between samples
  71. --streaming: stream the profiling output to the specified file
  72. dumpheap [--user <USER_ID> current] [-n] [-g] <PROCESS> <FILE>
  73. Dump the heap of a process. The given <PROCESS> argument may
  74. be either a process name or pid. Options are:
  75. -n: dump native heap instead of managed heap
  76. -g: force GC before dumping the heap
  77. --user <USER_ID> | current: When supplying a process name,
  78. specify user of process to dump; uses current user if not specified.
  79. set-debug-app [-w] [--persistent] <PACKAGE>
  80. Set application <PACKAGE> to debug. Options are:
  81. -w: wait for debugger when application starts
  82. --persistent: retain this value
  83. clear-debug-app
  84. Clear the previously set-debug-app.
  85. set-watch-heap <PROCESS> <MEM-LIMIT>
  86. Start monitoring pss size of <PROCESS>, if it is at or
  87. above <HEAP-LIMIT> then a heap dump is collected for the user to report.
  88. clear-watch-heap
  89. Clear the previously set-watch-heap.
  90. bug-report [--progress | --telephony]
  91. Request bug report generation; will launch a notification
  92. when done to select where it should be delivered. Options are:
  93. --progress: will launch a notification right away to show its progress.
  94. --telephony: will dump only telephony sections.
  95. force- stop [--user <USER_ID> | all | current] <PACKAGE>
  96. Completely stop the given application package.
  97. crash [--user <USER_ID>] <PACKAGE|PID>
  98. Induce a VM crash in the specified package or process
  99. kill [--user <USER_ID> | all | current] <PACKAGE>
  100. Kill all processes associated with the given application.
  101. kill-all
  102. Kill all processes that are safe to kill (cached, etc).
  103. make-uid-idle [--user <USER_ID> | all | current] <PACKAGE>
  104. If the given application 's uid is in the background and waiting to
  105. become idle ( not allowing background services), do that now.
  106. monitor [--gdb <port>]
  107. Start monitoring for crashes or ANRs.
  108. --gdb: start gdbserv on the given port at crash/ANR
  109. watch-uids [--oom <uid>
  110. Start watching for and reporting uid state changes.
  111. --oom: specify a uid for which to report detailed change messages.
  112. hang [--allow-restart]
  113. Hang the system.
  114. --allow-restart: allow watchdog to perform normal system restart
  115. restart
  116. Restart the user-space system.
  117. idle-maintenance
  118. Perform idle maintenance now.
  119. screen-compat [ on| off] <PACKAGE>
  120. Control screen compatibility mode of <PACKAGE>.
  121. package-importance <PACKAGE>
  122. Print current importance of <PACKAGE>.
  123. to-uri [INTENT]
  124. Print the given Intent specification as a URI.
  125. to-intent-uri [INTENT]
  126. Print the given Intent specification as an intent: URI.
  127. to-app-uri [INTENT]
  128. Print the given Intent specification as an android-app: URI.
  129. switch-user <USER_ID>
  130. Switch to put USER_ID in the foreground, starting
  131. execution of that user if it is currently stopped.
  132. get-current-user
  133. Returns id of the current foreground user.
  134. start-user <USER_ID>
  135. Start USER_ID in background if it is currently stopped;
  136. use switch-user if you want to start the user in foreground
  137. unlock-user <USER_ID> [TOKEN_HEX]
  138. Attempt to unlock the given user using the given authorization token.
  139. stop-user [-w] [-f] <USER_ID>
  140. Stop execution of USER_ID, not allowing it to run any
  141. code until a later explicit start or switch to it.
  142. -w: wait for stop-user to complete.
  143. -f: force stop even if there are related users that cannot be stopped.
  144. is-user-stopped <USER_ID>
  145. Returns whether <USER_ID> has been stopped or not.
  146. get-started-user-state <USER_ID>
  147. Gets the current state of the given started user.
  148. track-associations
  149. Enable association tracking.
  150. untrack-associations
  151. Disable and clear association tracking.
  152. get-uid-state <UID>
  153. Gets the process state of an app given its <UID>.
  154. attach-agent <PROCESS> <FILE>
  155. Attach an agent to the specified <PROCESS>, which may be either a process name or a PID.
  156. get-config
  157. Rtrieve the configuration and any recent configurations of the device.
  158. supports-multiwindow
  159. Returns true if the device supports multiwindow.
  160. supports-split-screen-multi-window
  161. Returns true if the device supports split screen multiwindow.
  162. suppress-resize-config-changes < true| false>
  163. Suppresses configuration changes due to user resizing an activity/task.
  164. set-inactive [--user <USER_ID>] <PACKAGE> true| false
  165. Sets the inactive state of an app.
  166. get-inactive [--user <USER_ID>] <PACKAGE>
  167. Returns the inactive state of an app.
  168. send-trim-memory [--user <USER_ID>] <PROCESS>
  169. [HIDDEN|RUNNING_MODERATE|BACKGROUND|RUNNING_LOW|MODERATE|RUNNING_CRITICAL|COMPLETE]
  170. Send a memory trim event to a <PROCESS>. May also supply a raw trim int level.
  171. display [COMMAND] [...]: sub-commands for operating on displays.
  172. move-stack <STACK_ID> <DISPLAY_ID>
  173. Move <STACK_ID> from its current display to <DISPLAY_ID>.
  174. stack [COMMAND] [...]: sub-commands for operating on activity stacks.
  175. start <DISPLAY_ID> <INTENT>
  176. Start a new activity on <DISPLAY_ID> using <INTENT>
  177. move-task <TASK_ID> <STACK_ID> [ true| false]
  178. Move <TASK_ID> from its current stack to the top ( true) or
  179. bottom ( false) of <STACK_ID>.
  180. resize <STACK_ID> <LEFT,TOP,RIGHT,BOTTOM>
  181. Change <STACK_ID> size and position to <LEFT,TOP,RIGHT,BOTTOM>.
  182. resize-animated <STACK_ID> <LEFT,TOP,RIGHT,BOTTOM>
  183. Same as resize, but allow animation.
  184. resize-docked-stack <LEFT,TOP,RIGHT,BOTTOM> [<TASK_LEFT,TASK_TOP,TASK_RIGHT,TASK_BOTTOM>]
  185. Change docked stack to <LEFT,TOP,RIGHT,BOTTOM>
  186. and supplying temporary different task bounds indicated by
  187. <TASK_LEFT,TOP,RIGHT,BOTTOM>
  188. size-docked-stack-test: <STEP_SIZE> <l|t|r|b> [DELAY_MS]
  189. Test command for sizing docked stack by
  190. <STEP_SIZE> increments from the side <l>eft, <t>op, <r>ight, or <b>ottom
  191. applying the optional [DELAY_MS] between each step.
  192. move-top-activity- to-pinned-stack: <STACK_ID> <LEFT,TOP,RIGHT,BOTTOM>
  193. Moves the top activity from
  194. <STACK_ID> to the pinned stack using <LEFT,TOP,RIGHT,BOTTOM> for the
  195. bounds of the pinned stack.
  196. positiontask <TASK_ID> <STACK_ID> <POSITION>
  197. Place <TASK_ID> in <STACK_ID> at <POSITION>
  198. list
  199. List all of the activity stacks and their sizes.
  200. info <STACK_ID>
  201. Display the information about activity stack <STACK_ID>.
  202. remove <STACK_ID>
  203. Remove stack <STACK_ID>.
  204. task [COMMAND] [...]: sub-commands for operating on activity tasks.
  205. lock <TASK_ID>
  206. Bring <TASK_ID> to the front and don 't allow other tasks to run.
  207. lock stop
  208. End the current task lock.
  209. resizeable <TASK_ID> [ 0| 1| 2| 3]
  210. Change resizeable mode of <TASK_ID> to one of the following:
  211. 0: unresizeable
  212. 1: crop_windows
  213. 2: resizeable
  214. 3: resizeable_and_pipable
  215. resize <TASK_ID> <LEFT,TOP,RIGHT,BOTTOM>
  216. Makes sure <TASK_ID> is in a stack with the specified bounds.
  217. Forces the task to be resizeable and creates a stack if no existing stack
  218. has the specified bounds.
  219. drag-task-test <TASK_ID> <STEP_SIZE> [DELAY_MS]
  220. Test command for dragging/moving <TASK_ID> by
  221. <STEP_SIZE> increments around the screen applying the optional [DELAY_MS]
  222. between each step.
  223. size-task-test <TASK_ID> <STEP_SIZE> [DELAY_MS]
  224. Test command for sizing <TASK_ID> by <STEP_SIZE>
  225. increments within the screen applying the optional [DELAY_MS] between
  226. each step.
  227. update-appinfo <USER_ID> <PACKAGE_NAME> [<PACKAGE_NAME>...]
  228. Update the ApplicationInfo objects of the listed packages for <USER_ID>
  229. without restarting any processes.
  230. write
  231. Write all pending state to storage.
  232. <INTENT> specifications include these flags and arguments:
  233. [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>]
  234. [-c <CATEGORY> [-c <CATEGORY>] ...]
  235. [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...]
  236. [--esn <EXTRA_KEY> ...]
  237. [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]
  238. [--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]
  239. [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]
  240. [--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]
  241. [--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]
  242. [--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>]
  243. [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
  244. (mutiple extras passed as Integer[])
  245. [--eial <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
  246. (mutiple extras passed as List< Integer>)
  247. [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
  248. (mutiple extras passed as Long[])
  249. [--elal <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
  250. (mutiple extras passed as List< Long>)
  251. [--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
  252. (mutiple extras passed as Float[])
  253. [--efal <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
  254. (mutiple extras passed as List<Float>)
  255. [--esa <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]]
  256. (mutiple extras passed as String[]; to embed a comma into a string,
  257. escape it using "\,")
  258. [--esal <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]]
  259. (mutiple extras passed as List< String>; to embed a comma into a string,
  260. escape it using "\,")
  261. [-f <FLAG>]
  262. [--grant-read-uri-permission] [--grant-write-uri-permission]
  263. [--grant-persistable-uri-permission] [--grant-prefix-uri-permission]
  264. [--debug-log-resolution] [--exclude-stopped-packages]
  265. [--include-stopped-packages]
  266. [--activity-brought- to-front] [--activity-clear-top]
  267. [--activity-clear- when-task-reset] [--activity-exclude- from-recents]
  268. [--activity-launched- from-history] [--activity-multiple-task]
  269. [--activity-no-animation] [--activity-no-history]
  270. [--activity-no-user-action] [--activity-previous- is-top]
  271. [--activity-reorder- to-front] [--activity-reset-task- if-needed]
  272. [--activity- single-top] [--activity-clear-task]
  273. [--activity-task- on-home]
  274. [--receiver-registered-only] [--receiver-replace-pending]
  275. [--receiver-foreground] [--receiver-no-abort]
  276. [--receiver-include-background]
  277. [--selector]
  278. [<URI> | <PACKAGE> | <COMPONENT>]

3. adb shell cmd statusbar


    
  1. expand-notifications
  2. Open the notifications panel.
  3. expand-settings
  4. Open the notifications panel and expand quick settings if present.
  5. collapse
  6. Collapse the notifications and settings panel.
  7. add-tile COMPONENT
  8. Add a TileService of the specified component
  9. remove-tile COMPONENT
  10. Remove a TileService of the specified component
  11. click-tile COMPONENT
  12. Click on a TileService of the specified component
  13. check-support
  14. Check if this device supports QS + APIs
  15. get-status-icons
  16. Print the list of status bar icons and the order they appear in

4. adb shell cmd overlay


    
  1. dump [ --verbose] [--user USER_ID] [PACKAGE [PACKAGE [...]]]
  2. Print debugging information about the overlay manager.
  3. list [ --user USER_ID] [PACKAGE [PACKAGE [...]]]
  4. Print information about target and overlay packages.
  5. Overlay packages are printed in priority order. With optional
  6. parameters PACKAGEs, limit output to the specified packages
  7. but include more information about each package.
  8. enable [ --user USER_ID] PACKAGE
  9. Enable overlay package PACKAGE.
  10. disable [ --user USER_ID] PACKAGE
  11. Disable overlay package PACKAGE.
  12. set- priority [ --user USER_ID] PACKAGE PARENT|lowest|highest
  13. Change the priority of the overlay PACKAGE to be just higher than
  14. the priority of PACKAGE_PARENT If PARENT is the special keyword
  15. 'lowest', change priority of PACKAGE to the lowest priority.
  16. If PARENT is the special keyword 'highest', change priority of
  17. PACKAGE to the highest priority.

5. adb shell cmd settings


    
  1. get [ --user <USER_ID> | current] NAMESPACE KEY
  2. Retrieve the current value of KEY.
  3. put [ --user <USER_ID> | current] NAMESPACE KEY VALUE [TAG] [default]
  4. Change the contents of KEY to VALUE.
  5. TAG to associate with the setting.
  6. { default} to set as the default, case-insensitive only for global/secure namespace
  7. delete NAMESPACE KEY
  8. Delete the entry for KEY.
  9. reset [ --user <USER_ID> | current] NAMESPACE {PACKAGE_NAME | RESET_MODE}
  10. Reset the global/secure table for a package with mode.
  11. RESET_MODE is one of {untrusted_defaults, untrusted_clear, trusted_defaults}, case-insensitive
  12. list NAMESPACE
  13. Print all defined keys.
  14. NAMESPACE is one of { system, secure, global}, case-insensitive

6. adb shell cmd  appops


    
  1. set [ --user <USER_ID>] <PACKAGE | UID> <OP> <MODE>
  2. Set the mode for a particular application and operation.
  3. get [ --user <USER_ID>] <PACKAGE | UID> [<OP>]
  4. Return the mode for a particular application and optional operation.
  5. query-op [ --user <USER_ID>] <OP> [<MODE>]
  6. Print all packages that currently have the given op in the given mode.
  7. reset [ --user <USER_ID>] [<PACKAGE>]
  8. Reset the given application or all applications to default modes.
  9. write- settings
  10. Immediately write pending changes to storage.
  11. read- settings
  12. Read the last written settings, replacing current state in RAM.
  13. options:
  14. < PACKAGE> an Android package name.
  15. <OP> an AppOps operation.
  16. < MODE> one of allow, ignore, deny, or default
  17. <USER_ID> the user id under which the package is installed. If --user is not
  18. specified, the current user is assumed.

7. adb shell cmd battery


    
  1. set [-f] [ac|usb|wireless| status| level|temp| present|invalid] < value>
  2. Force a battery property value, freezing battery state.
  3. -f: force a battery change broadcast be sent, prints new sequence.
  4. unplug [-f]
  5. Force battery unplugged, freezing battery state.
  6. -f: force a battery change broadcast be sent, prints new sequence.
  7. reset [-f]
  8. Unfreeze battery state, returning to current hardware values.
  9. -f: force a battery change broadcast be sent, prints new sequence.
8. 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值