如何确定 Android 设备的安全补丁级别? [英] How to determine the Security Patch Level of an Android device?

查看:84
本文介绍了如何确定 Android 设备的安全补丁级别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 API 或其他机制确定 Android 设备的安全补丁级别?我正在寻找可以通过单击 Settings -> 手动找到的相同安全补丁信息.设备上的关于 菜单.

Google 每个月都会发布安全补丁,例如

解决方案

在 Android SDK 23 (Marshmallow) 及更高版本中,您可以从 android.os.Build.VERSION.SECURITY_PATCH.日期是 YYYY-MM-DD 形式的字符串值.

在 Lollipop 中,您可以使用 getprop 命令读取 ro.build.version.security_patch 的值.请参阅此S/O 问题,了解如何执行getprop 使用 ProcessBuilder.

自 2015 年 10 月起每月发布一次安全补丁,请参阅 Android 安全公告了解更多详情.

How can I determine the security patch level of an Android device using an API or other mechanism? I'm looking for the same security patch information that can be found manually by clicking the Settings -> About menu on the device.

Google issues security patches every month, for example 2016-12-01.

解决方案

In Android SDK 23 (Marshmallow) and later, you can retrieve the security patch date from android.os.Build.VERSION.SECURITY_PATCH. The date is a string value in YYYY-MM-DD form.

In Lollipop, you can use the getprop command to read the value of ro.build.version.security_patch. See this S/O question for how to execute getprop using ProcessBuilder.

Security patches have been released on a monthly basis since October 2015, see Android Security Bulletins for more details.

这篇关于如何确定 Android 设备的安全补丁级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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