How I can get the list of all installed on my Android 8 packages using ADB Shell? I preference to query Sqlite base, but accept any command-line solution.
Asked
Active
Viewed 1.3e+01k times
2 Answers
82
adb shell cmd package list packages
This will return a list of the package names of the apps installed on the device. Each line is prefixed by package:
.
There are even some options you can use:
list packages [-f] [-d] [-e] [-s] [-3] [-i] [-l] [-u] [-U] [--uid UID] [--user USER_ID] [FILTER]
Prints all packages; optionally only those whose name contains
the text in FILTER.
Options:
-f: see their associated file
-d: filter to only show disabled packages
-e: filter to only show enabled packages
-s: filter to only show system packages
-3: filter to only show third party packages
-i: see the installer for the packages
-l: ignored (used for compatibility with older releases)
-U: also show the package UID
-u: also include uninstalled packages
--uid UID: filter to only show packages with the given UID
--user USER_ID: only list packages belonging to the given user
An alternative for older Android versions is
adb shell pm list packages
but this is deprecated and will likely be removed in the future.

TheWanderer
- 16,775
- 6
- 49
- 63
-
2`cmd` is not available on old Android versions. There, `pm` was the official way to list packages. – tanius Jun 28 '20 at 12:46
-
1@tanius I already mention that. – TheWanderer Jun 28 '20 at 13:34
-
WHAT ON EARTH do you mean by "other Android versions"??? That is so vague! Why not write OLDER or NEWER OS's of 9+ or 7+ or....? – do loop Jan 26 '23 at 17:31
53
Get all installed packages using:
adb shell pm list packages
To see user installed packages:
adb shell pm list packages -3 | cut -f 2 -d ":"

BuvinJ
- 10,221
- 5
- 83
- 96

Saurabh Thorat
- 18,131
- 5
- 53
- 70