Hot fix for detecting MagiskHide

This commit is contained in:
topjohnwu
2017-10-15 03:12:13 +08:00
parent aa0b9e2db2
commit f742bb1c47
4 changed files with 9 additions and 4 deletions

View File

@@ -312,7 +312,11 @@ public class MagiskManager extends Application {
} catch (NumberFormatException e) {
disabled = false;
}
ret = shell.sh("getprop " + MAGISKHIDE_PROP);
if (magiskVersionCode > 1435) {
ret = shell.su("resetprop -p " + MAGISKHIDE_PROP);
} else {
ret = shell.sh("getprop " + MAGISKHIDE_PROP);
}
try {
magiskHide = !Utils.isValidShellResponse(ret) || Integer.parseInt(ret.get(0)) != 0;
} catch (NumberFormatException e) {