Android的根检测用建立标签? [英] Android root detection using build tags?

查看:224
本文介绍了Android的根检测用建立标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的方法是,我们可以通过编程检测是否在Android设备根植的途径之一:

The following method is one of the ways we can programatically detect if an android device is rooted:

public boolean checkRootMethod1(){
    String buildTags = android.os.Build.TAGS;

    if (buildTags != null && buildTags.contains("test-keys")) {
        return true;
    }
    return false;
}

有人能解释这实际上是在做什么?什么是测试键构建标记,这是什么都与根?我找不到从谷歌的任何相关信息。

Can someone explain what this is actually doing? What is the "test-keys" build tag, and what does it have to do with root? I couldn't find any relevant information from google.

推荐答案

发布 - 键和测试键,是因为有如何编译时内核签署。释放键意味着它是从官方的开发正式签约的关键。试验键意味着它是由第三方开发者生成的自定义密钥签名。从安全角度来看推出-密钥一般是指内核是更安全的,这并不总是如此。

Release-Keys and Test-Keys has to do with how the kernel is signed when it is compiled. Release-Keys means it was signed with an official Key from an official developer. Test-Keys means it was signed with a custom key generated by a third-party developer. From a security standpoint Release-Keys generally means the kernel is more secure, which is not always the case.

这篇关于Android的根检测用建立标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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