Android:使用ADB获取所有已安装的软件包 [英] Android: get all installed packages using ADB

查看:982
本文介绍了Android:使用ADB获取所有已安装的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

推荐答案

adb shell cmd package list packages

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

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

较早的Android版本的替代方法是

An alternative for older Android versions is

adb shell pm list packages

但是不推荐使用,将来可能会删除。

but this is deprecated and will likely be removed in the future.

这篇关于Android:使用ADB获取所有已安装的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆