Skip to content

Instantly share code, notes, and snippets.

View fleficher's full-sized avatar
🦜
I may be slow to respond.

Florian LE FICHER fleficher

🦜
I may be slow to respond.
View GitHub Profile
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 {