Syed Rafi
Syed Rafi

Reputation: 915

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

Like (chrome, Mozilla and UC browser )

Is there any generalized adb command ?

Upvotes: 4

Views: 2896

Answers (2)

Alex P.
Alex P.

Reputation: 31686

Depends on your definition of a 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:

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

Upvotes: 6

cw fei
cw fei

Reputation: 1564

Is there any generalized adb command ?

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 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.

Upvotes: 2

Related Questions