0

今日、既存の mdm ソフトウェアの代わりに WSO2 EMM サーバーをインストールしました。私の会社は、ストック Android 4.xx を搭載した独自の Android スマートフォンとタブレット PC を構築しています。私は Android EMM-Agent をインストールし、デバイスがルート化されているという情報を取得しました。

デバイスがルート化されているため、登録できません

しかし、電話にはルートがありません。

では、デバイスがルート化されていないことをエージェントにどのように伝えることができますか? それとも、開発者と話す必要がありますか?

4

2 に答える 2

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 にチェーン「テストキー」があります!
  2. デバイスに Superuser.apk があります。
  3. スーパーユーザーアクセスでシェルコマンドを実行できるため、デバイスは本当にルート化されています!!!
于 2014-09-08T10:46:14.373 に答える
1

私は同じ問題を抱えています...

ルート テストをバイパスするためにエージェントのソースを変更することで、問題を回避できます。

これは、ファイル Root.java、関数 isDeviceRooted() にあります。test の 3 行をコメントするだけです。

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