如何通过 adb(或通过 Python 命令)获取 android 内核版本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15121061/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 13:23:59 来源:igfitidea点击:
How can I get the android kernel version via adb (or via Python command)?
提问by Raí Avancini Franco
I need the kernel version from a device with Android OS to use in a Python script. How can I get this value?
我需要来自装有 Android 操作系统的设备的内核版本才能在 Python 脚本中使用。我怎样才能得到这个值?
采纳答案by Yury
You can use the following command:
您可以使用以下命令:
adb shell cat /proc/version
For my phone I received the following output:
对于我的手机,我收到以下输出:
Linux version 2.6.35.7-g3cc95e3 (peter@boris) (gcc version 4.4.3 (GCC) ) #3 PREEMPT Thu Aug 18 14:34:17 EDT 2011

