← 返回命令列表

Linux command

adb-shell-pm 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

adb shell pm list packages

Example

adb shell pm list packages -s

Example

adb shell pm list packages -3

Uninstall

adb shell pm uninstall [com.example.app]

Clear

adb shell pm clear [com.example.app]

Example

adb shell pm path [com.example.app]

说明

pm (Package Manager) is an Android shell command for managing installed applications. It provides functionality for listing, installing, uninstalling, and querying information about packages on the device. This tool is more powerful than the standard adb install/uninstall commands, offering options to manage permissions, disable packages, and query detailed package information.

参数

list packages _-f_ _-d_ _-e_ _-s_ _-3_ _-i_ _-u_ _filter_
List packages (-f: with APK path, -d: disabled, -e: enabled, -s: system, -3: third-party, -i: with installer, -u: include uninstalled)
path _package_
Print path to the APK
install _-r_ _-t_ _-d_ _path_
Install package from device path
uninstall _-k_ _package_
Remove package (-k: keep data)
clear _package_
Delete all data associated with package
enable _package_
Enable a disabled package
disable _package_
Disable a package
grant _package_ _permission_
Grant a permission to a package
revoke _package_ _permission_
Revoke a permission from a package
dump _package_
Print package information

FAQ

What is the adb-shell-pm command used for?

pm (Package Manager) is an Android shell command for managing installed applications. It provides functionality for listing, installing, uninstalling, and querying information about packages on the device. This tool is more powerful than the standard adb install/uninstall commands, offering options to manage permissions, disable packages, and query detailed package information.

How do I run a basic adb-shell-pm example?

Run `adb shell pm list packages` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list packages _-f_ _-d_ _-e_ _-s_ _-3_ _-i_ _-u_ _filter_ do in adb-shell-pm?

List packages (-f: with APK path, -d: disabled, -e: enabled, -s: system, -3: third-party, -i: with installer, -u: include uninstalled)