如何使用Android获取Linux内核的版本? [英] How to get the version of the Linux kernel using Android?

查看:606
本文介绍了如何使用Android获取Linux内核的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Android应用程序中获取Linux内核的版本?

How can I get the version of the Linux kernel in an Android application?

推荐答案

不确定100%,但是我认为调用"uname -r"需要root访问权限.无论如何,有一种更简单的方法可以做到这一点,即:

Not 100% sure, but I think calling "uname -r" would require root access. There is anyways a less dirty way to do this, which is :

System.getProperty("os.version");

我在这里找到此信息: http://cb1991.blogspot .com/2011/03/android-code-to-get-kernel-version.html

I found this information here : http://cb1991.blogspot.com/2011/03/android-code-to-get-kernel-version.html

这篇关于如何使用Android获取Linux内核的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆