Cheatography
https://cheatography.com
How to use the Android Package Manager (pm)
pm commandslist permission-groups Prints all known permission groups | list features Prints all features of the system | list libraries Prints all the libraries supported by current device | list users Prints all users on system | path PACKAGE Print the path to the APK of given PACKAGE | clear PACKAGE Deletes all data associated with a package | enable PKG | COMPONENT Enable given package or component (written as "package/class") | disable PKG | COMPONENT Disable given package or component (written as "package/class") | grant PERMISSION Grant permissions to applications. Only optional permissions the application has declared can be granted. | revoke PERMISSION Revoke permissions to applications. Only optional permissions the application has declared can be revoked. | set-permission-enforced PERMISSION [true|false] Specifies whether the given permission should be enforced. | trim-caches DESIRED_FREE_SPACE Trim cache files to reach given free space | create-user USERNAME Create new user with given USERNAME, printing the new user identifier of the user | remove-user USER_ID Remove the user with given USER_ID, deleting all data associated with that user | get-max-users Prints the maximum number of users supported by the device |
| | pm command : install-l Install package with forward lock | -r Reinstall an existing app, keeping its data | -t Allow test APKs to be installed | -i NAME Specify the installer package name | -s Install package on the shared mass storage (such as sdcard) | -f Install package on internal system memory | -d Allow version code downgrade |
install [options] <PATH>
pm command : uninstall-k Keep the data and cache directories around after removal |
uninstall [options] <PACKAGE>
pm command : set-install-locationLocation Values | 0 Auto - let system decide best location | 1 Internal - internal device storage | 2 External - install on external media |
set-install-location LOCATION
pm command : get-install-locationReturn Values | 0 Auto - system decides best location | 1 Internal - internal device storage | 2 External - install on external media |
get-install-location
| | pm commands : disable-user--user USER_ID User to disable |
disable-user [options] (PKG | COMPONENT)
pm command : list packages-f See their associated file | -d Only show disabled packages | -e Only show enabled packages | -s Only show system packages | -3 Only show third party packages | -i See the installer for the packages | -u Include uninstalled packages | --user <USER_ID> User space to query |
list packages [options] <FILTER>
pm command : list permissions-g Organize by group | -f Print all information | -s Short summary | -d Only list dangerous permissions | -u Only list permissions users will see |
list permissions [options] <GROUP>
pm command : list instrumentation-f List the APK file for the test package |
list instrumentation [options]
|
Help Us Go Positive!
We offset our carbon usage with Ecologi. Click the link below to help us!
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by CITguy