mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-20 07:01:43 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/adb-shell-pm
Normal file
41
tldr/adb-shell-pm
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# adb shell pm
|
||||
|
||||
> Android Package Manager tool.
|
||||
> More information: <https://developer.android.com/tools/adb>.
|
||||
|
||||
- Print the path to the APK of a package:
|
||||
|
||||
`adb shell pm path {{package}}`
|
||||
|
||||
- Install an app package from a given path:
|
||||
|
||||
`adb shell pm install /{{path/to/app.apk}}`
|
||||
|
||||
- Uninstall a package from the device:
|
||||
|
||||
`adb shell pm uninstall {{package}}`
|
||||
|
||||
- Clear all app data for a package:
|
||||
|
||||
`adb shell pm clear {{package}}`
|
||||
|
||||
- Enable a package or component:
|
||||
|
||||
`adb shell pm enable {{package_or_class}}`
|
||||
|
||||
- Disable a package or component:
|
||||
|
||||
`adb shell pm disable {{package_or_class}}`
|
||||
|
||||
- Grant a permission for an app:
|
||||
|
||||
`adb shell pm grant {{package}} {{android.permission.CAMERA|android.permission.ACCESS_FINE_LOCATION|android.permission.READ_CONTACTS|...}}`
|
||||
|
||||
- Revoke a permission for an app:
|
||||
|
||||
`adb shell pm revoke {{package}} {{android.permission.CAMERA|android.permission.ACCESS_FINE_LOCATION|android.permission.READ_CONTACTS|...}}`
|
||||
Reference in New Issue
Block a user