Skip to content

[ABIS] spoof proc/self/exe #54

Description

@dathacky

Hi, I found a way to check android OS but I don't see xplex fake it

public static String[] getSupportedAbis() {
String[] strArr = Build.SUPPORTED_ABIS;
TreeSet treeSet = new TreeSet();
try {
if (is64Bit()) {
treeSet.add("arm64-v8a");
treeSet.add("x86_64");
} else {
treeSet.add("armeabi-v7a");
treeSet.add("x86");
}
ArrayList arrayList = new ArrayList();
for (String str : strArr) {
if (treeSet.contains(str)) {
arrayList.add(str);
}
}
return (String[]) arrayList.toArray(new String[arrayList.size()]);
} catch (ErrnoException e) {
A00(String.format("Could not read /proc/self/exe. Falling back to default ABI list: %s. errno: %d Err msg: %s", new Object[]{Arrays.toString(strArr), Integer.valueOf(e.errno), e.getMessage()}));
String[] strArr2 = Build.SUPPORTED_ABIS;
return strArr;
}
}

public static boolean is64Bit() {
return Os.readlink("/proc/self/exe").contains("64");
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions