Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: get all installed packages using ADB [duplicate]

Tags:

android

adb

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.

like image 427
Евгений Шахов Avatar asked Dec 05 '18 14:12

Евгений Шахов


People also ask

How can I get a list of all installed Android apps?

Go to Settings and find the App Management or Apps section, depending on your phone. If you can't locate it, simply perform a quick search within Settings. Once in App Management, tap on See All Apps or App Settings to see the list of apps installed on your device, excluding the system apps.


2 Answers

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.

like image 101
TheWanderer Avatar answered Oct 26 '22 16:10

TheWanderer


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 ":"
like image 22
Saurabh Thorat Avatar answered Oct 26 '22 17:10

Saurabh Thorat