Is there an adb command to run on a .apk which gives me the android:versionCode that is set in the AndroidManifest file of that apk?
Basically, how do I get the version code of the apk using adb?
adb shell dumpsys iphonesybinfo You can check and save the IMEI number of your device by dialing *#06# in your dialer app and taking a screenshot of it.
For Version Name :
adb shell dumpsys package my.package | grep versionName
For Version Code :
adb shell dumpsys package my.package | grep versionCode
Also you can try this below too:
Android: Get versionName or versionCode of an APK from the command line
You can use aapt in android's build-tools directory of whatever build tools version you're using.
You pass that tool the badging command, and then pass it the location of your APK.
Example:
$ANDROID_HOME/build-tools/24.0.2/aapt dump badging app/build/outputs/apk/app-release.apk
If you scroll through all the output, you can find the versionName and versionCode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With