mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 07:27: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;
|
break;
|
||||||
case SECOND_SLOT_MODE:
|
case SECOND_SLOT_MODE:
|
||||||
case DIRECT_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())
|
.to(console, logs).exec().isSuccess())
|
||||||
return false;
|
return false;
|
||||||
if (!Data.keepVerity)
|
if (!Data.keepVerity)
|
||||||
|
@ -57,15 +57,15 @@ direct_install() {
|
|||||||
rm -rf /data/adb/magisk/* 2>/dev/null
|
rm -rf /data/adb/magisk/* 2>/dev/null
|
||||||
mkdir -p /data/adb/magisk 2>/dev/null
|
mkdir -p /data/adb/magisk 2>/dev/null
|
||||||
chmod 700 /data/adb
|
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"
|
echo "- Flashing new boot image"
|
||||||
flash_image $1 $2
|
flash_image $1/new-boot.img $2
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "! Insufficient partition size"
|
echo "! Insufficient partition size"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
rm -f $1
|
rm -rf $1
|
||||||
rm -rf $3
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user