i have some methods for root detection.
final boolean t1 = canExecuteCommand("/system/bin/which su");
final boolean t2 = canExecuteCommand("which su");
private static boolean canExecuteCommand(String command)
{
boolean executedSuccesfully;
try {
Runtime.getRuntime().exec(command);
executedSuccesfully = true;
} catch (Exception e) {
executedSuccesfully = false;
}
return executedSuccesfully;
}
Everything works fine until Android 6. From that version A6 return TRUE on t1 and t2. My device is not rooted. I updated device from A5 to A6 using system update.
Why is return true from A6? Thanks.