Skip to content

Commit 000582a

Browse files
committed
fix detecting boot partition
Magisk added VENDORBOOT which wasn't overwritten. Fix is to move get_flags to initialize which sets the variable to false
1 parent 49fe5cf commit 000582a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/addon.d.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ initialize() {
3333
fi
3434
OUTFD=
3535
setup_flashable
36+
get_flags
3637
}
3738

3839
main() {
@@ -59,7 +60,6 @@ main() {
5960
print_title "Lygisk $PRETTY_VER addon.d"
6061

6162
mount_partitions
62-
get_flags
6363

6464
if $backuptool_ab; then
6565
# Swap the slot for addon.d-v2
@@ -105,11 +105,13 @@ case "$1" in
105105
# Back up PREINITDEVICE from existing partition before OTA on A-only devices
106106
if ! $backuptool_ab; then
107107
initialize
108-
RECOVERYMODE=false
109108
find_boot_image
110109
$MAGISKBIN/magiskboot unpack "$BOOTIMAGE"
111110
$MAGISKBIN/magiskboot cpio ramdisk.cpio "extract .backup/.magisk config.orig"
112111
$MAGISKBIN/magiskboot cleanup
112+
if [ ! -f config.orig ]; then
113+
ui_print "! Unable to back up config.orig"
114+
fi
113115
fi
114116
;;
115117
pre-restore)

0 commit comments

Comments
 (0)