Commit c967e618 authored by topjohnwu's avatar topjohnwu

Adjustment to direct install

parent 59f78d7d
......@@ -278,7 +278,7 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
break;
case SECOND_SLOT_MODE:
case DIRECT_MODE:
if (!Shell.su(Utils.fmt("direct_install %s %s %s", patched, mBoot, installDir))
if (!Shell.su(Utils.fmt("direct_install %s %s", installDir, mBoot))
.to(console, logs).exec().isSuccess())
return false;
if (!Data.keepVerity)
......
......@@ -57,15 +57,15 @@ direct_install() {
rm -rf /data/adb/magisk/* 2>/dev/null
mkdir -p /data/adb/magisk 2>/dev/null
chmod 700 /data/adb
cp -rf $3/* /data/adb/magisk
cp -rf $1/* /data/adb/magisk
rm -rf /data/adb/magisk/new-boot.img
echo "- Flashing new boot image"
flash_image $1 $2
flash_image $1/new-boot.img $2
if [ $? -ne 0 ]; then
echo "! Insufficient partition size"
return 1
fi
rm -f $1
rm -rf $3
rm -rf $1
return 0
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment