Update cheatsheets

This commit is contained in:
ivuorinen
2025-10-22 00:20:27 +00:00
parent 8d00ec1c41
commit 0cc7cfe867
23 changed files with 180 additions and 20 deletions

41
tldr/adb-shell-pm Normal file
View 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|...}}`