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
- device manufacturer
- device hardware
- device model
- Os version(integer value)
- 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
You should use
adb shell getprop
command andgrep
specific info about your current device, For additional information you can read documentation: Android Debug Bridge documentationI added some examples below:
adb shell getprop | grep language
adb shell getprop | grep boot_completed
adb shell getprop | grep model
adb shell getprop | grep sdk
adb shell getprop | grep timezone
adb shell getprop | grep serialno
If you want to see the whole list of parameters just type:
From Linux Terminal:
From Windows PowerShell:
Sample output for Samsung: