2

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.

3

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 "Patch Boot Image File". 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

  • 1
    I never did that. Instead, I've used a flashable ZIP to get Magisk installed. That was available from XDA (inside the spoiler section), including instructions (which basically just say: from recovery, load it via "install from ZIP"). That performs all the steps: backing up the boot image, creating a patched version, flashing that, installing Magisk Manager. – Izzy Aug 9 '18 at 12:11
  • 1
    @Izzy; That's what I do too :-). Since OP specifically was asking with reference to Magisk instructions clarified that. Anyway, added your point also in the answer, with credits – beeshyams Aug 9 '18 at 12:15
  • @Izzy: Where this comes in useful is on A/B devices, where you use the patched boot image to start with, and when you get monthly updates, switch slots (from Magisk) and install OTA , retaining Magisk and it's modules as mentioned here – beeshyams Aug 9 '18 at 12:27
  • That's a different procedure, as in that case Magisk manager performs the required steps itself. That cannot be done if it wasn't installed before, so it would be a chicken-egg issue :) – Izzy Aug 9 '18 at 14:15
  • 1
    As Izzy said you should post an answer either to make it clear and helpful to others :) & accept that if you wish – beeshyams Aug 14 '18 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.