Adapt with new Magisk installation

This commit is contained in:
topjohnwu
2017-12-07 04:20:15 +08:00
parent 96eaa833f5
commit c461fc6daa
6 changed files with 45 additions and 6 deletions
@@ -51,6 +51,8 @@ public class MagiskManager extends Application {
public String managerLink;
public String bootBlock = null;
public int snetVersion;
public boolean keepVerity;
public boolean keepEnc;
// Data
public Map<String, Module> moduleMap;
@@ -197,6 +199,23 @@ public class MagiskManager extends Application {
} catch (NumberFormatException e) {
magiskHide = true;
}
ret = Shell.su(
"getvar KEEPVERITY",
"echo $KEEPVERITY");
try {
keepVerity = Utils.isValidShellResponse(ret) && Boolean.parseBoolean(ret.get(0));
} catch (NumberFormatException e) {
keepVerity = false;
}
ret = Shell.su(
"getvar KEEPFORCEENCRYPT",
"echo $KEEPFORCEENCRYPT");
try {
keepEnc = Utils.isValidShellResponse(ret) && Boolean.parseBoolean(ret.get(0));
} catch (NumberFormatException e) {
keepEnc = false;
}
}
public void setPermissionGrantCallback(Runnable callback) {