android pm 命令总结
16lz
2021-01-23
文章出处:http://blog.csdn.net/shift_wwx
跟am命令一样,它的源码为位于frameworks/base/cmds/pm.
pm <command>
Command | Description |
list packages [options] <FILTER> | Prints all packages, optionally only those whose package name contains the text in<FILTER> . Options:
|
list permission-groups | Prints all known permission groups. |
list permissions [options] <GROUP> | Prints all known permissions, optionally only those in <GROUP> . Options:
|
list instrumentation | List all test packages. Options:
|
list features | Prints all features of the system. |
list libraries | Prints all the libraries supported by the current device. |
list users | Prints all users on the system. |
path <PACKAGE> | Print the path to the APK of the given <PACKAGE> . |
install [options] <PATH> | Installs a package (specified by <PATH> ) to the system. Options:
|
uninstall [options] <PACKAGE> | Removes a package from the system. Options:
|
clear <PACKAGE> | Deletes all data associated with a package. |
enable <PACKAGE_OR_COMPONENT> | Enable the given package or component (written as "package/class"). |
disable <PACKAGE_OR_COMPONENT> | Disable the given package or component (written as "package/class"). |
disable-user [options] <PACKAGE_OR_COMPONENT> | Options:
|
grant <PACKAGE_PERMISSION> | Grant permissions to applications. Only optional permissions the application has declared can be granted. |
revoke <PACKAGE_PERMISSION> | Revoke permissions to applications. Only optional permissions the application has declared can be revoked. |
set-install-location <LOCATION> | Changes the default install location. Location values:
Note: This is only intended for debugging; using this can cause applications to break and other undesireable behavior. |
get-install-location | Returns the current install location. Return values:
|
set-permission-enforced <PERMISSION> [true|false] | Specifies whether the given permission should be enforced. |
trim-caches <DESIRED_FREE_SPACE> | Trim cache files to reach the given free space. |
create-user <USER_NAME> | Create a new user with the given <USER_NAME> , printing the new user identifier of the user. |
ove-user <USER_ID> | Remove the user with the given <USER_IDENTIFIER> , deleting all data associated with that user |
get-max-users | Prints the maximum number of users supported by the device. |
更多相关文章
- android源码项目
- Android 本地广播LocalBroadcastManager 源码解析
- Android C+源码笔记(1)
- Android源码下载和编译
- Android 简单的图片查看器源码实现
- Android ArrayAdapter 源码查看 深入了解