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 /d
If you want to get all package versions, try this awk script:
adb shell dumpsys package | awk '/^[ ]*Package \[.*\] (.*)/ { i = index($0, "[") + 1; pkg = substr($0, i, index($0, "]") - i); } /[ ]*versionName=/ { { print pkg "\t" substr($0, index($0, "=") + 1); pkg = ""; } }'