Root shell with no outputs

This commit is contained in:
topjohnwu
2017-07-16 03:32:29 +08:00
parent 87ea2a2bef
commit f4097a372b
9 changed files with 47 additions and 37 deletions
@@ -75,7 +75,7 @@ public class FlashZip extends ParallelTask<Void, String, Integer> {
}
private int cleanup(int ret) {
magiskManager.rootShell.su(
magiskManager.rootShell.su_raw(
"rm -rf " + mCachedFile.getParent() + "/*",
"rm -rf " + MagiskManager.TMP_FOLDER_PATH
);
@@ -146,7 +146,7 @@ public class FlashZip extends ParallelTask<Void, String, Integer> {
new AlertDialogBuilder(activity)
.setTitle(R.string.reboot_title)
.setMessage(R.string.reboot_msg)
.setPositiveButton(R.string.reboot, (dialogInterface, i) -> magiskManager.rootShell.su("reboot"))
.setPositiveButton(R.string.reboot, (dialogInterface, i) -> magiskManager.rootShell.su_raw("reboot"))
.setNegativeButton(R.string.no_thanks, null)
.show();
}
@@ -33,7 +33,7 @@ public class ProcessMagiskZip extends ParallelTask<Void, Void, Boolean> {
@Override
protected Boolean doInBackground(Void... params) {
if (Shell.rootAccess()) {
magiskManager.rootShell.su("rm -f /dev/.magisk",
magiskManager.rootShell.su_raw("rm -f /dev/.magisk",
(mBoot != null) ? "echo \"BOOTIMAGE=" + mBoot + "\" >> /dev/.magisk" : "",
"echo \"KEEPFORCEENCRYPT=" + String.valueOf(mEnc) + "\" >> /dev/.magisk",
"echo \"KEEPVERITY=" + String.valueOf(mVerity) + "\" >> /dev/.magisk"