Improve install Magisk

This commit is contained in:
topjohnwu
2017-09-06 14:41:59 +08:00
parent 1c06b04c45
commit a1ba4fda6f
4 changed files with 7 additions and 2 deletions

View File

@ -166,7 +166,7 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
shell.sh(mList,
"cd " + install,
"KEEPFORCEENCRYPT=" + mKeepEnc + " KEEPVERITY=" + mKeepVerity + " sh " +
"update-binary indep boot_patch.sh " + boot + " 2>&1" +
"update-binary indep boot_patch.sh " + boot +
" && echo 'Success!' || echo 'Failed!'"
);
@ -213,8 +213,10 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
// Finals
getShell().sh_raw(
"cd " + install,
"mv bin/busybox busybox",
"rm -rf bin *.img update-binary");
"rm -rf bin *.img update-binary",
"cd /");
} catch (Exception e) {
e.printStackTrace();
return false;

View File

@ -354,6 +354,7 @@ public class Utils {
mm.toast(R.string.no_boot_file_patch_support, Toast.LENGTH_LONG);
return;
}
mm.toast(R.string.boot_file_patch_msg, Toast.LENGTH_LONG);
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("*/*");
fragment.startActivityForResult(intent, SELECT_BOOT_IMG,