[Magisk] badabing2003:
You're right I don't understand, and I'm not being sarcastic, that is why I'm asking the questions,

I do clearly understand about the availability of a ROM file in zip format flashable in recovery, and availability of firmware in tgz archive format flashable in bootloader.

The archive being zip, tgz, gz, tar or even .md5 is orthogonal, the content is what matters.

That I gathered from @ipdev here, you here and @zgfg here.

What was throwing me off was this:

Passing Full AP for Samsung devices, I was trying to understand if it was a general case.

Looking at two such the recovery rom zip files:

miui_LMIGlobal_V14.0.1.0.SJKMIXM_440715d694_12.0.zip

xiaomi.eu_multi_HMK20MI9T_V12.5.2.0.RFJCNXM_v12-11.zip

I don't see recovery.img in either of those, I see boot.img,

Yes with my changes PF will be able to extract boot.img file from it, send it to the phone, create a patch and pull it back.

I suppose I would need the user to indicate that this would need to be patched for use in recovery mode, so that the patch is performed with the proper flags,

This option is not available yet, but quite easy to add, just want to make sure about it.

I don't see such option on my phones when using Magisk, though I recall seeing them before, perhaps it's been removed in the latest Magisk? which will make all this moot.

Or is it the case that Magisk is detecting that my phone cannot or should not be patching for recovery and hence not offering that choice.

Do you see it on your phone with the latest Magisk?

I suppose that would only go half the distance and I suppose there would be no way for Magisk to determine what the user wants or if the boot.img is from recovery zip or not.

What does one do after pulling a patched boot.img, replace the boot.img inside the zip with the patched one?

I ask because the point of PF is for the user to be able to do what they need all in PF as a workflow without having to do manual steps outside of the tool, unless it is impossible to automate those.

Which brings me to this question.

When someone uses this type of tgz for example

lmi_global_images_V14.0.1.0.SJKMIXM_20230317.0000.00_12.0_global_15e376c371.tgz

This is not much different than a standard Pixel firmware (which makes sense as it is to be flashed in bootloader), however the archive content structure, the tree format is different, hence need to be specially handled.

It's easy enough (though slow due to nested large archives) to extract boot.img and get a patch, but typically with bootloader flashable firmware PF takes care of everything (if one chooses to do so)

You select the firmware

It finds the boot

You select and patch it.

Then you can select the patch and just flash that as boot.img (you would do so if you are already on the latest firmware and you just need to get rooted)

But typically users do monthly upgrades, hence they click on Flash Pixel Phone button, which would flash the entire firmware and also have the patched boot flashed before rebooting to system, effectively upgrade and keep root without multiple reboots or uninstalling Magisk.

With some adjustments this can also be done for that tgz image type I looked at,

Trying to learn how one normally does it, do they do it in two steps?

Flash the firmware, and then extract boot and flash the boot alone?

Is there value adding support for that?

If you say that typically people do OTA updates and will not bother with this, I wouldn't burden PF with it, but if it can help some, it's not difficult to support.

Fair enough :)

Though technically you're not writing (flashing) to a partition, you're loading in memory, and if it doesn't like it, or even it likes it, you reboot and nothing would be changed ;)

Yes I said that, but who am I to tell those guys that what they're doing is not right?

If it is working for them, no harm done.