Getting Android SDK version of a device from command line

前端 未结 4 1253
抹茶落季
抹茶落季 2021-02-02 15:00

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

4条回答
  •  滥情空心
    2021-02-02 15:21

    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

提交回复
热议问题