Get Android OS version of device connected via ADB

AndroidShellAdb

Android Problem Overview


Can one use adb or adb shell commands to get attached emulator/device OS info, i.e. API version?

Android Solutions


Solution 1 - Android

To get Android version you can use:

adb shell getprop ro.build.version.release 

to get API level:

adb shell getprop ro.build.version.sdk 

You can see all available properties with this command:

adb shell getprop

Solution 2 - Android

I know , you already got the correct solution , & here is my solution only for additional information.

You will get every details by cat ing the /system/build.prop file like

adb shell cat /system/build.prop

Here is collection of adb commands

Solution 3 - Android

For all properties:

adb shell getprop

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionkiruwkaView Question on Stackoverflow
Solution 1 - AndroidMattia MaestriniView Answer on Stackoverflow
Solution 2 - AndroidDon ChakkappanView Answer on Stackoverflow
Solution 3 - Androidcom2ghzView Answer on Stackoverflow