mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 10:35:26 +00:00
Improve install Magisk
This commit is contained in:
parent
1c06b04c45
commit
a1ba4fda6f
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -212,5 +212,6 @@
|
||||
<string name="restore_stock_boot">還原原廠 boot 映像</string>
|
||||
<string name="restore_done">還原完成!</string>
|
||||
<string name="restore_fail">原廠 boot 映像備份不存在!</string>
|
||||
<string name="boot_file_patch_msg">選擇原廠 boot 映像備份;支援 .img 以及 .img.tar 格式</string>
|
||||
|
||||
</resources>
|
||||
|
@ -116,6 +116,7 @@
|
||||
<string name="direct_install">Direct Install (Recommend)</string>
|
||||
<string name="select_method">Select Method</string>
|
||||
<string name="no_boot_file_patch_support">Target Magisk version doesn\'t support boot image file patching</string>
|
||||
<string name="boot_file_patch_msg">Select stock boot image dump in .img or .img.tar format</string>
|
||||
<string name="complete_uninstall">Complete Uninstall</string>
|
||||
<string name="restore_stock_boot">Restore Stock Boot</string>
|
||||
<string name="restore_done">Restoration done!</string>
|
||||
|
Loading…
Reference in New Issue
Block a user