Fix post ota scripts
This commit is contained in:
parent
4ff70aefac
commit
7b9a45f1a8
@ -285,7 +285,7 @@ public abstract class MagiskInstaller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean postOTA() {
|
protected boolean postOTA() {
|
||||||
SuFile bootctl = new SuFile(Const.MAGISK_PATH + "/.core/bootctl");
|
SuFile bootctl = new SuFile("/data/adb/bootctl");
|
||||||
try (InputStream in = App.self.getResources().openRawResource(R.raw.bootctl);
|
try (InputStream in = App.self.getResources().openRawResource(R.raw.bootctl);
|
||||||
OutputStream out = new SuFileOutputStream(bootctl)) {
|
OutputStream out = new SuFileOutputStream(bootctl)) {
|
||||||
ShellUtils.pump(in, out);
|
ShellUtils.pump(in, out);
|
||||||
|
@ -66,7 +66,7 @@ post_ota() {
|
|||||||
./bootctl hal-info || return
|
./bootctl hal-info || return
|
||||||
[ `./bootctl get-current-slot` -eq 0 ] && SLOT_NUM=1 || SLOT_NUM=0
|
[ `./bootctl get-current-slot` -eq 0 ] && SLOT_NUM=1 || SLOT_NUM=0
|
||||||
./bootctl set-active-boot-slot $SLOT_NUM
|
./bootctl set-active-boot-slot $SLOT_NUM
|
||||||
echo '${0%/*}/../bootctl mark-boot-successful;rm -f ${0%/*}/../bootctl $0' > post-fs-data.d/post_ota.sh
|
echo "BCTRL=${1}/bootctl;\$BCTRL mark-boot-successful;rm -f \$BCTRL \$0" > post-fs-data.d/post_ota.sh
|
||||||
chmod 755 post-fs-data.d/post_ota.sh
|
chmod 755 post-fs-data.d/post_ota.sh
|
||||||
cd /
|
cd /
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user