0

今天我安装了 WSO2 EMM 服务器作为我们现有 mdm 软件的替代品。我的公司正在构建她自己的 Android 智能手机和带有 Stock Android 4.xx 的平板电脑我安装了 Android EMM-Agent 并获得了我的设备已植根的信息。

您无法注册,因为您的设备已植根

但是手机上没有root。

那么我怎么能说设备没有root呢?还是我应该和开发人员谈谈?

4

2 回答 2

1

我有同样的问题 ...

您可以通过修改代理源以绕过根测试来解决此问题!

这是在文件Root.java上,函数isDeviceRooted(),只需注释掉test的三行:

public boolean isDeviceRooted() { 
    // if (checkRootMethod3()){return true;}
    // if (checkRootMethod2()){return true;}
    // if (checkRootMethod1()){return true;}
    return false;
}
于 2014-09-08T10:36:47.087 回答
1

另一种方法是分析代理发现您的设备已植根的方式...

代码如下:

/**
*Returns true if the OS build tags contains "test-keys"
*/
public boolean checkRootMethod1(){
    String buildTags = android.os.Build.TAGS;

    if (buildTags != null && buildTags.contains("test-keys")) {
        Log.e("ROOT CHECKER", "ROOT METHOD 1");
        return true;
    }
    return false;
}
/**
*Returns true if the device contains SuperUser.apk which is stored into the device in the rooting process
*/
public boolean checkRootMethod2(){
    try {
        File file = new File("/system/app/Superuser.apk");
        if (file.exists()) {
            Log.e("ROOT CHECKER", "ROOT METHOD 2");
            return true;

        }
    } catch (Exception e) { }

    return false;
}
/**
*Executes a shell command (superuser access with su binary) and returns true if the command succeeds
*/
public boolean checkRootMethod3() {
    if (new ExecShell().executeCommand(ExecShell.SHELL_CMD.check_su_binary) != null){
        Log.e("ROOT CHECKER", "ROOT METHOD 3");
        return true;
    }else{
        return false;
    }
}

所以,有3个检查:

  1. 你的 Android buildTags 上有链“test-keys”!
  2. 您的设备上有 Superuser.apk !
  3. 您的设备确实已植根,因为您可以执行具有超级用户访问权限的 shell 命令!!!
于 2014-09-08T10:46:14.373 回答