Get application version name using adb

frognosis picture frognosis · Aug 13, 2012 · Viewed 93.7k times · Source

Is there an easy way to get the version name of an application on an Android device using adb shell?

I found the application version number (not the version name) in /data/system/packages.xml.

It would be nice if there was a file that contained the Application Info.

Answer

arbuz picture arbuz · Aug 14, 2012
adb shell dumpsys package my.package | grep versionName

as mentioned by @david and @Jeremy Fishman. This will be much quicker than:

adb shell dumpsys | grep -A18 "Package \[my.package\]"