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.
as mentioned by @david and @Jeremy Fishman. This will be much quicker than:
If you don't want install *.apk on device but you need get version of app, you can do it as follow
Dumpsys package is your friend
Will return
In case someone needs all apps versions for comparing purposes then here is my oneliner:
Maybe it will be helpful for somebody but please note that I use versionName and ignore versionCode, so use with care.
If you want to get all package versions, try this awk script: