Android ADB commands to get the device properties

Venkatesh picture Venkatesh · Jan 13, 2014 · Viewed 152.4k times · Source

I am trying to get the device properties from ADB commands. I can how ever get those values by running sample android application. How ever I wish to get using adb shell command itself to make my life easier. Here is the way I will get through sample application but I want corresponding adb commands for

  1. device manufacturer
  2. device hardware
  3. device model
  4. Os version(integer value)
  5. Kernel version

* Please note my device is not rooted and I have no idea of rooting the device to get these values :-) *

## Code snippet
import android.os.Build;
manufacturer = Build.MANUFACTURER;
hardware = Build.HARDWARE;
model = Build.MODEL;
oSVersion = Build.VERSION.SDK_INT;
kernelVersion = System.getProperty("os.version");

However I can able to get the os version. But then I want SDK version in integer. I want 18 in place of 4.2.2

C:\>adb shell getprop ro.build.version.release
4.2.2

Answer

dmarin picture dmarin · Jan 13, 2014
adb shell getprop ro.build.version.sdk

If you want to see the whole list of parameters just type:

adb shell getprop