LinuxCommandLibrary

adb-shell-pm-list

List installed Android packages

TLDR

List all installed packages

$ adb shell pm list packages
copy

Print all users on the system
$ adb shell pm list users
copy

Print all known permission groups
$ adb shell pm list permission-groups
copy

Print all known permissions
$ adb shell pm list permissions
copy

List all test packages
$ adb shell pm list instrumentation
copy

Print all features of the system
$ adb shell pm list features
copy

Print all the libraries supported by the current device
$ adb shell pm list libraries
copy

SYNOPSIS

adb shell pm list <subcommand> [options] [FILTER]

PARAMETERS

-f
    Show APK file path for each package

-d
    Filter to disabled packages only

-e
    Filter to enabled packages only

-s
    Filter to system packages only

-3
    Filter to third-party packages only

-i
    Show installer package name

-u
    Include uninstalled packages

-U
    Show UID for each package

--user <USER_ID>
    Specify user ID for multi-user devices

FILTER
    Package name prefix to filter results

DESCRIPTION

The adb shell pm list command is a powerful tool within the Android Debug Bridge (ADB) ecosystem used to query and list various package-related information on an Android device. Primarily, it invokes the Android Package Manager (pm) shell command to enumerate installed applications, permissions, libraries, and more. The most common usage, pm list packages, displays all installed package names, helping developers, testers, and administrators identify apps by their unique identifiers.

This command is essential for debugging, automation scripts, and device management. Options allow filtering by enabled/disabled status, system vs. user apps, or including paths and UIDs. It supports multiple subcommands like packages, permissions, features, making it versatile for comprehensive package audits. Output is plain text, easily parsable for scripting with tools like grep or awk.

Executed over ADB, it requires a connected device with USB debugging enabled, making it invaluable in development workflows without physical root access.

CAVEATS

Requires ADB setup with device connected and USB debugging enabled.
Some options need shell root privileges.
Not for listing on host system; device-only.

COMMON SUBCOMMANDS

packages: List installed packages.
permissions: List permissions.
features: List device features.
libraries: List native libraries.
instrumentation: List instrumentation components.

EXAMPLE USAGE

adb shell pm list packages – Lists all packages.
adb shell pm list packages -s – System packages only.
adb shell pm list packages | grep com.example – Filter via pipe.

HISTORY

Part of Android SDK since Android 1.0 (2008). ADB tools evolved from initial AOSP releases; pm list enhanced in Android 4+ for better filtering and multi-user support.

SEE ALSO

adb(1)

Copied to clipboard