I\'m planning to build an automated system for deploying an Android build to various devices, in order to make development for multiple platforms a bit more comfortable. Is ther
I think you can by accessing the device with adb shell - change directories to position you at system and do a cat of build.prop. Here you will find for instance, ro.build.description=google_sdk-eng 2.2, ro.build.version.release=2.2 etc
adb shell getprop ro.build.version.sdk
Note @Tim: this works even on phones without grep
support on all host OS :-). (i.e. on old phones where toolbox
does not support grep
you you need to have busybox
on your phone).
you can use this command:
adb shell grep ro.build.version.sdk= system/build.prop
It will output something like this:
ro.build.version.sdk=10
I also discovered a way to get the exact version of Android e.g. 4.2.2 based on the following web article http://xayon.net/looking-for-android-version-with-adb/ You need to be using a unix-like operating system - Linux and Mac OSX are fine, and windows users can use cygwin or equivalent.
At a command line:
echo version=$(adb shell getprop |awk -F":" '/build.version.release/ { print $2 }')|tr -d '[]'
Here is the result for my Nexus 4:
version= 4.2.2