Originally Posted by Didgeridoohan
That doesn't sound like it's caused by a module. They're loaded later in the boot process. You've likely got something else going on. A wipe might be necessary...
And what about the bootloader? Magisk doesn't touch that.
The module I'm thinking is the problem is the Edge Sense Plus Magisk module. I'm not sure how early in the process that loads. If I could just wipe /data/adb/modules or put it into core only...
Originally Posted by jcmm11
What happens if you flash the new stock (unrooted) kernel to both slots? This almost sounds (guessing since I haven't seen it) that it's failing to boot on one slot then recovering by booting from the other slot. Saying this because you say it fails, then succeeds.
Bootloader will always be stock. Nothing you've done, or attempted to do, effects the bootloader (other than applying the OTA).
Did you patch the new, updated, stock kernel with Magisk or are you trying to use an older kernel?
I did the update via the flash-all script of the full factory image, which used slot A. There's nothing installed, or has ever been installed, to slot B. The fail-then-succeed is because I'm loading the Magisk patched bootloader via fastboot while leaving the stock bootloader on the device itself so that it's still at least usable until I can get this sorted. Flashing the Magisk patched bootloader to slot A doesn't change it failing to boot, so I've left the stock one in-place and do all of my testing via fastboot. I apologize for not making that clear before.
I've tried working around it by adding
write /data/cache/.disable_magisk 1
chmod 0775 /data/cache/.disable_magisk
# sanity check
write /sdcard/bootlog 1
exec -- /system/bin/sh /sdcard/boottest.sh
to the init.rc of the otherwise unchanged stock bootloader between the early-boot and boot triggers (which should be after /data is decrypted and usable..), with the boottest.sh script being
echo "well, it executed" > /sdcard/bootlog # sanity check
/system/bin/whoami >> /sdcard/bootlog # sanity check
echo "cache" >> /sdcard/bootlog
/system/bin/ls -lA /data/cache >> /sdcard/bootlog # see if it *did* create .disable_magisk
echo "modules" >> /sdcard/bootlog
/system/bin/ls -lA /data/adb/modules >> /sdcard/bootlog # because I don't know the directory names used in case I can't do .disable_magisk but can somehow rm -R a module
however, no /sdcard/bootlog is created at all, which is confusing. Unless I should be using /storage/emulated/0 or /data/user/0 instead in those? I'm throwing things at the wall to see what sticks at this point. I don't even know if exec is implemented in the stock, or even the Magisk patched init binary.