mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-05 03:20:46 -05:00
Support installing to new path
This commit is contained in:
@@ -244,13 +244,12 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
|
||||
console.add("*********************************");
|
||||
break;
|
||||
case DIRECT_MODE:
|
||||
// Direct flash boot image and patch dtbo if possible
|
||||
String binPath = mm.remoteMagiskVersionCode >= 1464 ? "/data/adb/magisk" : "/data/magisk";
|
||||
Shell.getShell().run(console, logs,
|
||||
"rm -rf /data/magisk/*",
|
||||
"mkdir -p /data/magisk 2>/dev/null",
|
||||
"mv -f " + install + "/* /data/magisk",
|
||||
"rm -rf " + install,
|
||||
"flash_boot_image " + patched_boot + " " + mBootLocation,
|
||||
Utils.fmt("rm -rf %s/*; mkdir -p %s; chmod 700 /data/adb", binPath, binPath),
|
||||
Utils.fmt("mv -f %s/* %s; rm -rf %s", install, binPath, install),
|
||||
Utils.fmt("flash_boot_image %s %s", patched_boot, mBootLocation),
|
||||
mm.remoteMagiskVersionCode >= 1464 ? "cp /data/magisk.img /data/adb/magisk.img" : "",
|
||||
"patch_dtbo_image");
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user