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.
APK# can do it:
just enter the following command on command prompt after launching the app:
if executing the command on linux terminal replace find by grep
A shell script to accomplish this:
If you know the app id of the package (like org.mozilla.firefox), it is easy. First to get the path of actual package file of the appId,
Now you can do some grep|sed magic to extract the path :
/data/app/com.google.android.apps.inbox-1/base.apk
After that aapt tool comes in handy :
Again some grep magic to get the Label.
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