adb shell commands list packages

Complete Guide to ADB Shell Commands List Packages for Android Management

By Matthew Walker
AD

When you need to manage applications on an Android device directly from a computer or terminal, understanding the adb shell commands list packages becomes essential.

Android Debug Bridge, or ADB, serves as a versatile command line tool that lets you communicate with a device, and one of the most frequent tasks is identifying every installed package on a system.

Getting Started with ADB and Package Listing

Before you can run an adb shell commands list packages, you must ensure that ADB is correctly installed on your machine and that USB debugging is enabled on the target device.

AD
Shell Built-ins: A Quick Reference
Shell Built-ins: A Quick Reference
Client Challenge
Client Challenge
Base Shell Commands: 50 Essential Tools You Should Master in 2025
Base Shell Commands: 50 Essential Tools You Should Master in 2025

Establishing a reliable connection between the computer and the Android device is the foundational step that allows any shell command, including package queries, to execute successfully.

Setting Up the Development Environment

You need to download the platform tools from the official Android developer site and install the necessary drivers depending on your operating system.

Download our cheat sheet with commands for CMD (free PDF)
Download our cheat sheet with commands for CMD (free PDF)
Linux Shell Scripting Command Cheat Sheet
Linux Shell Scripting Command Cheat Sheet
Arduino with HC-05 (ZS-040) Bluetooth module – AT MODE
Arduino with HC-05 (ZS-040) Bluetooth module – AT MODE

Once the environment is ready, verifying the connection with the `adb devices` command ensures that your device is recognized before you proceed to list packages.

Authorizing the Debug Connection

When you connect the device for the first time, a prompt appears on the screen asking for permission to allow USB debugging.

AD

Accepting this prompt grants your computer the necessary authorization to execute adb shell commands list packages and other system-level operations.

20 Windows PowerShell Commands You Must Know
20 Windows PowerShell Commands You Must Know
the ultimate guide to every cloude command
the ultimate guide to every cloude command
ADB Tips for Appium: How to Locate Android Package and Activity Names Easily
ADB Tips for Appium: How to Locate Android Package and Activity Names Easily
Termux Command list - Basic | PDF
Termux Command list - Basic | PDF
the basic commands for using command commands
the basic commands for using command commands
a handwritten diagram with words and phrases on the page, which are written in black ink
a handwritten diagram with words and phrases on the page, which are written in black ink

Basic Commands to List Packages

The most straightforward way to see every application installed on the device is by using the `pm list packages` command, which is part of the package manager shell.

This command outputs a simple list of package names, making it ideal for quick audits or scripting scenarios where you need to parse the results.

AD

Filtering the Package List

You can refine the output by using grep to search for specific terms, which helps when you are looking for a particular vendor or system app.

the complete guide for how to use an ultimate command command in your bulletpad or notebook
the complete guide for how to use an ultimate command command in your bulletpad or notebook
Fastboot Commands: All Hidden Commands List - GetWox
Fastboot Commands: All Hidden Commands List - GetWox
Command Prompt Commands: Top 16 CMD Commands You Must Know
Command Prompt Commands: Top 16 CMD Commands You Must Know
Shell Command | For Beginners | part-1 (Questions & answers)
Shell Command | For Beginners | part-1 (Questions & answers)
25 best Command Prompt (CMD) commands you should know
25 best Command Prompt (CMD) commands you should know
an image of a computer screen with the words anass commands in green and blue
an image of a computer screen with the words anass commands in green and blue
a list of names and numbers on a white background
a list of names and numbers on a white background
DOS Commands Chart 8 x 10 Digital Download
DOS Commands Chart 8 x 10 Digital Download
Install Command in Linux
Install Command in Linux
Termux Commands List from Basic to Advanced - With PDF file
Termux Commands List from Basic to Advanced - With PDF file
the system health & performance screen is shown in this screenshote image with green text
the system health & performance screen is shown in this screenshote image with green text
Must Know Ultimate Dog Training Commands List | Basic to Advanced
Must Know Ultimate Dog Training Commands List | Basic to Advanced
Useful Adb commands list (GitHubGist)
Useful Adb commands list (GitHubGist)
a table with the names and numbers of different types of items in it's display
a table with the names and numbers of different types of items in it's display

Combining pipes allows you to exclude system packages if you are only interested in third-party applications that the user has installed.

Displaying Detailed Package Information

For more context, the `dumpsys package` command provides deeper insights, including permissions, signatures, and storage paths for each entry.

While this generates a large amount of data, it is invaluable for debugging installation issues or verifying configuration details.

Advanced Usage and System Packages

Understanding the difference between system packages and user-installed packages is crucial when you manage or troubleshoot an Android device.

AD

System packages are integral to the operating system, and removing them can cause instability, so you must approach modifications with caution.

Listing System Packages Only

By using specific flags and filters, you can isolate system applications to analyze which components are part of the core firmware.

This helps developers ensure their apps do not conflict with essential system services or override critical functionality.

Identifying User Applications

Conversely, filtering for user apps allows you to focus on the software that occupies user space and can be uninstalled without affecting core operations.

Regularly reviewing this list can help maintain device performance and security by identifying outdated or unused applications.

Scripting and Automation with ADB

Once you master the adb shell commands list packages workflow, you can integrate it into shell scripts or batch processing routines.

Automation is particularly useful in testing environments where you need to install, verify, and then uninstall apps in a repeatable manner.

Creating Batch Processing Scripts

You can write scripts that parse the package list and perform actions based on specific criteria, such as version numbers or installation dates.

This enables developers to maintain consistency across multiple devices, ensuring that quality assurance processes are efficient and reliable.

Handling Errors and Edge Cases

It is important to account for scenarios where the device is offline or unauthorized, which would cause the command to fail.

Adding error checking logic to your scripts ensures that you receive clear feedback instead of ambiguous output, streamlining the troubleshooting process.

Mastering these techniques gives you precise control over the Android environment and empowers you to handle maintenance tasks programmatically.

As you continue to explore the capabilities of ADB, you will discover how these fundamental commands fit into larger workflows, improving both productivity and insight into your devices.

AD