This question already has answers here:
How to get the list of all apps on android device using terminal

(2个答案)


2年前关闭。




如何使用ADB Shell获取在Android 8软件包中安装的所有软件的列表?
我倾向于查询Sqlite基础,但是接受任何命令行解决方案。

最佳答案

adb shell cmd package list packages

这将返回设备上安装的应用程序的软件包名称的列表。每行都以package:为前缀。

您甚至可以使用一些选项:
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

较旧的Android版本的替代方法是
adb shell pm list packages

但是不建议使用,将来可能会删除它。

关于android - Android:使用ADB获取所有已安装的软件包,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53634246/

10-11 22:27
查看更多