Stock image dump for running Magisk necessary? In the offitical installation instructions for Magisk it says: “However, you MUST have a stock boot image dump beforehand, and you also have to be able to flash the patched boot image, either through fastboot/download mode or ODIN”

What’s the rationale for having the stock boot image dump beforehand?

If the rationale is to have a backup when something goes wrong, then strictly having a stock boot image dump is not necessary for running Magisk.

Furthermore, it is unclear to me how to create that dump.

PS: My plan is to root the Xiaomi A2, to be able to directly interface with USB OTG devices from within Termux. The Xiaomi A2 is an Android One device.
Stock image dump for running Magisk necessary?

No. Far more easier is to use the flashable ZIP that does all- That performs all the steps: backing up the boot image, creating a patched version, flashing that, installing Magisk Manager (thanks to Izzy in comments)
But to clarify on the instructions

What’s the rationale for having the stock boot image dump beforehand?

For devices that don't have custom recovery but you would want to root
Magisk needs the stock boot image for two things

To be able to patch it so that Magisk can be installed.

If you wish to uninstall Magisk, it replaces the patched boot image with stock boot image



Furthermore, it is unclear to me how to create that dump

For MiA1 you can see the details on this XDA thread. In essence:

You need to have fastboot image of the stock ROM (for MiA1 they are released every month)

Extract boot.img and store it on your device

Install Magisk Manager .Tap on Install on the prompt and then &quot;Patch Boot Image File&quot;. Select the untouched boot.img through your File Explorer. Wait for it to do its thing.
The patched_boot.img was created and it should be located at /storage/emulated/0/MagiskManager/patched_boot.img.

Copy the patched boot.img to your PC and fastboot into it (fastboot boot patched_boot.img)

From Magisk manager Direct Install and you are done


If that is too much work, you can wait for somebody at XDA to provide patched boot images
Edit : See this for more How do you root a device with Magisk when it doesn&#39;t have a custom recovery