Skip to content

XprivacyLua Script #2

@Hifi-Games-Pro

Description

@Hifi-Games-Pro

i have seen that you developed Xprivacy lua script with Marcel who developed that module. Marcel said to me direct contact fif for new Lua script. one of the code below I give detect su using path System.getenv, i want to hook that code and only return false value. but i not understand class system for this code.

Code is:-

private static boolean searchPathForBinary(String binary) {
String[] paths = System.getenv("PATH").split(":");
for(String path : paths) {
File pathDir = new File(path);
if(pathDir.exists() && pathDir.isDirectory()) {
File[] pathDirFiles = pathDir.listFiles();
if(pathDirFiles != null) {
for (File fileInPath : pathDirFiles) {
if (fileInPath.getName().equals(binary)) {
return true;
}
}
}
}
}
return false;
}
public static boolean isRooted() {
try {
return searchPathForBinary("su");
} catch(Exception e) {
DeviceLog.exception("Rooted check failed", e);
return false;
}
}

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