Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get application version name using adb

Tags:

android

adb

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.

like image 341
frognosis Avatar asked Aug 13 '12 21:08

frognosis


People also ask

How do I find my ADB package name?

To list the package names as well as the path to the installed APK files, use the “ -f ” option. The “ -f ” option can be combined with the other options as well. For example, to list system package names with the installed package location, use the “ -f -s ” option.

How do I read an app version?

Android System SettingsOnce in Settings, tap Apps and notifications (or your phone manufacturer's name it). When you're in there, tap See all xyz apps (where xyz is the number of apps you have installed). Now scroll down until you find the app you want to find the version for. Then tap it in the list.

How do I check ADB version?

Download ADB and FastbootVisit the SDK Platform Tools download page to find the latest version of ADB and fastboot.


1 Answers

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\]" 
like image 187
arbuz Avatar answered Oct 30 '22 09:10

arbuz