Adjustment to direct install

This commit is contained in:
topjohnwu 2018-08-13 02:57:03 +08:00
parent 59f78d7dfc
commit c967e618a1
2 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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
}