[Magisk] pndwal:
Yes 😛

See this log for patching recovery image (Recovery mode checked):

- Device platform: arm64-v8a
- Installing: e136fb3a (22102)
- Copying image to cache
- Unpacking boot image
- Checking ramdisk status
- Stock boot image detected
- Patching ramdisk
- Repacking boot image

****************************
Output file is written to
/storage/emulated/0/Download/magisk_patched-22102_xumwp.img
****************************
- All done!

Direct Installation log is similar.

😆

But recovery ramdisk and boot ramdisk are implemented differently.

As John took pains to point out, type III (Ramdisk= no) devices (generally speaking) DON'T support boot-ramdisk (even if added manually when missing, as Magisk does) due to lack of bootloader support. However, since bootloader (generally speaking) supports recovery-ramdisk, Magisk in recovery is an option.

As I understand it, to use any ramdisk type requires ramdisk specific bootloader support. Kernel and ramdisk can be patched, but bootloader (again, generally) cannot be, due to proprietary nature.

Bootloader support (or lack of it) presents the real challenge.

Yep, understand that. 🙂 But I don't understand fully what's going on yet.

Since trying with stock, I tried patching and flashing TWRP image (w/ fastboot) both w/ stock boot, and Magisk patched boot image with similar results; patching succeeds (completes w/ no errors), but get 'system has been destroyed' on booting.

Then, with Magisk in boot, I've checked Recovery mode and tried Direct Install. Surprisingly, this succeeds, and reboot (from Magisk App) lands me in recovery.

It appeared I now had Magisk in Recovery as all settings were for this, but on powering off and trying to boot with recovery key combo / releasing keys at splash screen (for system with Magisk in recovery), like you, I have great difficulty getting to system. I get recovery unless I release keys on vibration, and almost BEFORE splash screen appears! I get System with root this way, but I'm not sure I'm not simply releasing keys too early to boot using recovery at all (ie. that this isn't actually Magisk in boot.)!

To test this, I've variously to flash stock boot.img (to see if I can boot with and without root as instructions say I should have ability), and with boot.img patched with a slightly different version of Magisk (for bootup comparison), but ANY such changes in combination with patched working recovery image result in 'System Has Been Destroyed', Fastboot mode only available, and this is fixed only by flashing unpatched recovery image.

Seems the symptoms I have may be similar to yours (difficulty booting to system from recovery key combo, etc). At the very least, I'm not convinced I actually have Magisk in recovery, although it has clearly been Patched / altered.

At this stage, I suspect that Xiaomi devices that appear as type III (and possibly other devices) may not be properly accounted for in John's Booting Shenanigans summary. I'm thinking the unexplained bootloader compatibility with ramdisk in boot may somehow be there to boot recovery, although not needed for system.... or other perhaps something else is going on.... So we may in fact have more than IV basic boot-types of Android device... There seem to be more discrepancy with John's Type III model that just having Magisk in Boot ability.

I'd love to get my head around this!

Covered by @zgfg. 👍 PW