mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 20:07:39 +00:00
Adjustment to direct install
This commit is contained in:
parent
59f78d7dfc
commit
c967e618a1
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user