简体   繁体   English

什么是adb命令列出Android设备上安装的所有浏览器?

[英]What is adb command to list all the browsers installed on android device?

I wanted to list all the browser package names from android device 我想列出Android设备中的所有浏览器包名称

Like (chrome, Mozilla and UC browser ) 喜欢(chrome,Mozilla和UC浏览器)

Is there any generalized adb command ? 有没有任何通用的adb命令?

Depends on your definition of a browser . 取决于您对browser的定义。 If it is an app with registered intent filters in the android.intent.category.APP_BROWSER category - you can get the list with the following adb shell command: 如果它是在android.intent.category.APP_BROWSER类别中具有已注册意图过滤器的应用程序 - 您可以使用以下adb shell命令获取列表:

for P in $(pm list packages); do test -n "$(dumpsys package ${P#package:} | grep APP_BROWSER)" && echo ${P#package:}; done

Is there any generalized adb command ? 有没有任何通用的adb命令?

The short answer is: No 最简洁的答案是不

Currently, ADB shell only support its own list of commands available, you just can't filter them into application type such as browser. 目前,ADB shell仅支持自己的可用命令列表,您只是无法将它们过滤到浏览器等应用程序类型中。

adb shell pm list packages [options] adb shell pm list packages [options]

List of commands 命令列表

adb shell pm list packages
adb shell pm list packages -f See their associated file.
adb shell pm list packages -d Filter to only show disabled packages.
adb shell pm list packages -e Filter to only show enabled packages.
adb shell pm list packages -s Filter to only show system packages.
adb shell pm list packages -3 Filter to only show third party packages.
adb shell pm list packages -i See the installer for the packages.
adb shell pm list packages -u Also include uninstalled packages.
adb shell pm list packages --user <USER_ID> The user space to query.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM