Skip to content

Instantly share code, notes, and snippets.

public boolean isRooted() {
return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary("su")
|| checkForBinary("busybox") || checkForDangerousProps() || checkForRWPaths()
|| detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBinary();
}
@fleficher
fleficher / Fabric_CommonUtils.java
Created November 12, 2018 20:01
How Fabric detects root
package io.fabric.sdk.android.services.common;
public class CommonUtils {
// ...
public static boolean isRooted(Context context) {
boolean isEmulator = isEmulator(context);
String buildTags = Build.TAGS;
if (!isEmulator && buildTags != null && buildTags.contains("test-keys")) {
return true;
} else {