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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…