Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
871 views
in Technique[技术] by (71.8m points)

android - Get Application Name/ Label via ADB Shell or Terminal

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

Just Browsing Browsing

[5] html - How to create even cell spacing within a

2.1m questions

2.1m answers

60 comments

56.9k users

...