mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-03-03 22:35:10 +00:00
Delete bootctl binary if execution fails
New devices may use AIDL bootctrl HAL, so if bootctl hal-info fails, simply remove the temp file and return.
This commit is contained in:
parent
494615d9a0
commit
442d0b5ddc
@ -102,7 +102,10 @@ post_ota() {
|
||||
cp -f $1 bootctl
|
||||
rm -f $1
|
||||
chmod 755 bootctl
|
||||
./bootctl hal-info || return
|
||||
if ! ./bootctl hal-info; then
|
||||
rm -f bootctl
|
||||
return
|
||||
fi
|
||||
SLOT_NUM=0
|
||||
[ $(./bootctl get-current-slot) -eq 0 ] && SLOT_NUM=1
|
||||
./bootctl set-active-boot-slot $SLOT_NUM
|
||||
|
Loading…
x
Reference in New Issue
Block a user