如何使用ADB Shell获取Android 8软件包中所有已安装的列表?我偏爱查询Sqlite基础,但接受任何命令行解决方案。
The*_*rer 11
adb shell cmd package list packages
Run Code Online (Sandbox Code Playgroud)
这将返回设备上安装的应用程序的软件包名称的列表。每行以开头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
Run Code Online (Sandbox Code Playgroud)
较旧的Android版本的替代方法是
adb shell pm list packages
Run Code Online (Sandbox Code Playgroud)
但是不推荐使用,将来可能会删除。
使用以下命令获取所有已安装的软件包:
adb shell pm list packages
Run Code Online (Sandbox Code Playgroud)
要查看用户安装的软件包:
adb shell pm list packages -3"|cut -f 2 -d ":
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10449 次 |
| 最近记录: |