How to List All Apps on Android Device Using Terminal: ADB Command Guide
Android Debug Bridge (ADB) is a versatile command-line tool that lets you communicate with an Android device. Whether you’re a developer debugging apps, a power user managing device software, or just curious about the apps installed on your phone, ADB provides powerful ways to interact with your device—including listing all installed applications.
In this guide, we’ll walk through how to use ADB commands in the terminal to list apps on your Android device, from basic listings to advanced filtering and detailed app information. By the end, you’ll be able to export app lists, identify system vs. third-party apps, and troubleshoot common issues.
Table of Contents#
- Prerequisites
- Basic ADB Command to List Apps
- Advanced Listing Options: Filter and Customize Results
- Filtering and Searching for Specific Apps
- Exporting the App List to a File
- Getting Detailed App Information (Beyond Package Names)
- Troubleshooting Common Issues
- Conclusion
- References
Prerequisites#
Before diving into commands, ensure you have the following set up:
1.1 Install ADB on Your Computer#
ADB is part of the Android SDK Platform Tools. Follow these steps to install it:
-
Windows:
- Download the Android SDK Platform Tools for Windows.
- Extract the ZIP file to a folder (e.g.,
C:\adb). - Add the folder to your system’s
PATH(optional but recommended for easy access).
-
macOS/Linux:
- Use Homebrew (macOS) or
apt(Linux):# macOS (Homebrew) brew install android-platform-tools # Linux (Debian/Ubuntu) sudo apt install android-tools-adb - Alternatively, download the Platform Tools ZIP and extract it to
~/adb.
- Use Homebrew (macOS) or
1.2 Enable USB Debugging on Your Android Device#
USB Debugging allows ADB to communicate with your device. Here’s how to enable it:
- Open Settings on your Android device.
- Go to About Phone (or About Device) and tap Build Number 7 times to unlock Developer Options.
- Return to Settings, open Developer Options, and enable USB Debugging.
- A pop-up will appear; tap Allow to grant debugging access when prompted later.
1.3 Connect Your Device to the Computer#
- Wired Connection: Use a USB cable to connect your device to the computer. Ensure the cable supports data transfer (not just charging).
- Wireless Connection (Advanced):
- Connect your device and computer to the same Wi-Fi network.
- Enable USB Debugging, then connect via USB and run:
adb tcpip 5555 - Disconnect the USB cable, then run:
(Find your device’s IP in Settings > Wi-Fi > [Connected Network] > Advanced.)adb connect <device-ip-address>:5555
1.4 Verify the ADB Connection#
To confirm your device is detected:
- Open a terminal/command prompt.
- Run:
adb devices - You should see your device listed as
device(e.g.,ABC12345 device). If it showsunauthorized, check your device for a prompt to “Allow USB Debugging” and tap Allow.
Basic ADB Command to List Apps#
The core command to list installed apps on Android is:
adb shell pm list packages What it does:
adb shell: Executes a command directly on the device.pm: Short for “Package Manager,” Android’s tool for managing apps.list packages: Instructspmto list all installed package names.
Sample Output:
package:com.google.android.gms
package:com.android.settings
package:com.whatsapp
package:com.netflix.mediaclient
...
This lists all apps by their package name (e.g., com.whatsapp is WhatsApp’s package ID).
Advanced Listing Options: Filter and Customize Results#
The pm list packages command supports flags to filter results. Here are the most useful ones:
3.1 List Apps with APK File Paths (-f)#
Add -f to show the full path of each app’s APK file:
adb shell pm list packages -f Sample Output:
package:/data/app/com.whatsapp-abc123/base.apk=com.whatsapp
package:/system/app/GoogleServicesFramework/GoogleServicesFramework.apk=com.google.android.gsf
Useful for identifying where an app is stored (e.g., /data/app/ for third-party apps, /system/app/ for system apps).
3.2 List Only Third-Party Apps (-3)#
To exclude system apps and list only user-installed apps (e.g., WhatsApp, Chrome):
adb shell pm list packages -3 Sample Output:
package:com.whatsapp
package:com.google.android.chrome
package:com.netflix.mediaclient
3.3 List Only System Apps (-s)#
To list pre-installed system apps (e.g., Settings, Camera):
adb shell pm list packages -s Sample Output:
package:com.android.settings
package:com.android.camera
package:com.google.android.gms
3.4 List Apps with Installer Information (-i)#
See which app store or method installed each app (e.g., Google Play, Amazon Appstore, ADB):
adb shell pm list packages -i Sample Output:
package:com.whatsapp installer=com.android.vending
package:com.netflix.mediaclient installer=com.android.vending
package:com.example.sideloaded installer=adb
com.android.vending= Google Play Store.
3.5 List Disabled/Uninstalled Apps (-u)#
Include apps that are disabled, uninstalled (but not fully removed), or hidden:
adb shell pm list packages -u Sample Output:
package:com.twitter.android (disabled)
package:com.facebook.katana (uninstalled)
Filtering and Searching for Specific Apps#
To narrow down results (e.g., find all Google apps), use grep (Linux/macOS) or findstr (Windows) to search package names:
Linux/macOS:#
adb shell pm list packages | grep "google" Windows (Command Prompt):#
adb shell pm list packages | findstr "google" Sample Output:
package:com.google.android.gms
package:com.google.android.chrome
package:com.google.maps
Replace "google" with any keyword (e.g., "whatsapp", "netflix").
Exporting the App List to a File#
To save the app list for later analysis:
Save to Computer:#
adb shell pm list packages > ~/Documents/android_apps.txt (Replace ~/Documents/android_apps.txt with your desired path.)
Save to Device Storage:#
To save directly to your device’s internal storage:
adb shell "pm list packages > /sdcard/apps_list.txt" Find the file in your device’s Files app > Internal Storage > apps_list.txt.
Getting Detailed App Information (Beyond Package Names)#
For in-depth app details (version, data directory, permissions, etc.), use dumpsys package with the app’s package name:
adb shell dumpsys package com.whatsapp Key info to look for:
versionName: App version (e.g.,2.23.10.75).dataDir: Where app data is stored (e.g.,/data/user/0/com.whatsapp).installTime: When the app was installed (timestamp).permissions: List of granted permissions.
For a cleaner output, filter with grep:
adb shell dumpsys package com.whatsapp | grep "versionName\|dataDir" Troubleshooting Common Issues#
7.1 Device Not Detected#
- Fix:
- Run
adb kill-server && adb start-serverto restart ADB. - Reconnect the USB cable or re-enable USB Debugging.
- Ensure your device’s driver is installed (Windows: Use Google USB Driver).
- Run
7.2 Permission Denied Errors#
- Cause: ADB lacks access to certain system files (common for non-rooted devices).
- Fix: Avoid commands requiring root (e.g.,
pm list packages -fworks without root, but somedumpsysdata may be restricted).
7.3 Outdated ADB Version#
- Fix: Update ADB by reinstalling Platform Tools (see Prerequisites).
Conclusion#
ADB’s pm list packages command is a powerful tool for managing and auditing apps on Android. With flags like -3 (third-party), -i (installer), and -f (APK paths), you can customize results to fit your needs. Whether you’re debugging, cleaning up bloatware, or documenting installed apps, mastering these commands unlocks greater control over your device.
Explore more ADB commands (e.g., adb uninstall <package>, adb install <apk>) to take your Android management skills further!