利用亚洲开发银行获取应用程序的版本名称 [英] Get application version name using adb
本文介绍了利用亚洲开发银行获取应用程序的版本名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种简单的方法来获得应用程序的版本名称中使用亚行外壳在Android设备上?
Is there an easy way to get the version name of an application on an Android device using adb shell?
我发现/data/system/packages.xml应用程序版本号(而不是版本名称)。
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.
推荐答案
不是很优雅,但你可以试试这个:
Not very elegant but you can try this:
adb shell dumpsys | grep -A18 "Package \[my.package\]"
这将告诉你一些软件包的信息(版本名称及编号:行7-9)
that will show you some package info (version name and number: line 7-9)
更新:
As @david and @Jeremy Fishman said, this will be much quicker:
adb shell dumpsys package my.package | grep versionName
这篇关于利用亚洲开发银行获取应用程序的版本名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文