android中的根检测绕过问题

时间:2017-02-26 12:43:29

标签: android security root

我在代码下面检查根检测

private static boolean checkRootMethod1() {
        String buildTags = android.os.Build.TAGS;
        return buildTags != null && buildTags.contains("test-keys");
    }

    private static boolean checkRootMethod2() {
        String[] paths = { "/system/app/Superuser.apk", "/sbin/su",
                "/system/bin/su", "/system/xbin/su", "/data/local/xbin/su",
                "/data/local/bin/su", "/system/sd/xbin/su",
                "/system/bin/failsafe/su", "/data/local/su" };
        for (String path : paths) {
            if (new File(path).exists())
                return true;
        }
        return false;
    }

    private static boolean checkRootMethod3() {
        Process process = null;
        try {
            process = Runtime.getRuntime().exec(new String[] { "/system/xbin/which", "su" });
            BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
            if (in.readLine() != null)
                return true;
            return false;
        } catch (Throwable t) {
            return false;
        } finally {
            if (process != null)
                process.destroy();
        }
    }

现在的问题是,安装了测试仪"隐藏我的根"应用程序和选项"隐藏su二进制",它已执行的操作。 在我们启动应用程序之后,它无法识别root。 有人可以让我知道任何解决方法吗? 我浏览了博客http://bertonjulian.github.io/2015/01/30/root-detection-bypass.html,但它提出了想法,但要实现这些目标?

0 个答案:

没有答案