Get Application Name/ Label via ADB Shell or Terminal

hamsteyr picture hamsteyr · May 20, 2013 · Viewed 98.9k times · Source

I'm developing an application that uses ADB Shell to interface with android devices, and I need some way of printing out the application name or label of an application, given maybe their package name.

In short, I need a way of getting app names (i.e. "Angry Birds v1.0.0") for user installed applications through adb shell.

Any light on the matter? Any help is appreciated on this.

Answer

rcbevans picture rcbevans · May 20, 2013

adb shell pm list packages will give you a list of all installed package names.

You can then use dumpsys | grep -A18 "Package \[my.package\]" to grab the package information such as version identifiers etc