• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] [ROOT] [MAGISK] How to Root Mi A3 with MAGISK without TWRP

Search This thread

Typhus_

Senior Member
Hello!

There's a guide already on XDA that covers this matter but in a general way and for all devices. That guide was based on the general info you may find on the original installation guide by @topjohnwu. So, all credits go to him.

Anyway, since there ins't a TWRP Recovery for Mi A3 (yet) and since I believe that many of you don't know about this, Iv'e decided to share here the steps I've done in order to root Mi A3.

NOTE: Now that we already have a working TWRP available for Mi A3, to root it you can now simply follow THESE steps after unlocking the bootloader.​
The guide present on this thread, of course, works as well, so I'll leave it here for those of you who don't want to permanently install TWRP to your device.​

1 - Unlock the bootloader (if you haven't done it already...beware that this will erase all of your user data). To do so, you must:
  • Enable developer options
  • Enable the "OEM unlocking" option
  • Enable USB debugging
  • Have both adb and fastboot, from SDK Platform Tools available on your PC
  • Connect your phone to your PC using the USB cable and run the following commands:
Code:
adb devices
(just to make sure that your phone is, in fact, recognized by your PC and that you're able to run adb commands)​
Code:
adb reboot bootloader
(so your phone will reboot into fastboot mode)​
Code:
fastboot flashing unlock
(after rebooting, boot the phone again into fastboot mode)​
Code:
fastboot flashing unlock_critical
(for full unlock)​

2 - Download Mi A3 stock boot.img that you may find later on this post, that matches your current build.
  • Copy the boot.img to your phone internal (or external) memory
  • Leave a copy of it on your PC (on the same folder you have adb and fastboot...we never know if we don't need to use it again in the future...you know, to restore the stock boot.img, aka revert to stock...)
If, for your current build, there isn't a stock boot.img released yet, you may get one yourselves. How? READ THIS.​
EU Build boot images:

---Android 9---
For all of you currently on 10.3.7.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 10.3.8.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 10.3.9.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 10.3.11.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 10.3.12.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 10.3.14.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 10.3.15.0 (EU) build, you may download stock boot.img HERE.​
---Android 10---
For all of you currently on 11.0.1.0 (EU) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
For all of you currently on 11.0.2.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 11.0.3.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 11.0.5.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 11.0.6.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 11.0.8.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 11.0.9.0 (EU) build, you may download stock boot.img HERE.​
---Android 11---

For all of you currently on 12.0.2.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 12.0.3.0 (EU) build, you may download stock boot.img HERE. (thanks to @lucoz )​
For all of you currently on 12.0.5.0 (EU) build, you may download stock boot.img HERE.​
For all of you currently on 12.0.6.0 (EU) build, you may download stock boot.img HERE.​

Global Build boot images:

---Android 9---
For all of you currently on 10.3.8.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
For all of you currently on 10.3.14.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
---Android 10---
For all of you currently on 11.0.7.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
For all of you currently on 11.0.11.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
For all of you currently on 11.0.14.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
For all of you currently on 11.0.15.0 (Global) build, you may download stock boot.img HERE.​
For all of you currently on 11.0.22.0 (Global) build, you may download stock boot.img HERE.​
---Android 11---
For all of you currently on 12.0.3.0 (Global) build, you may download stock boot.img HERE.​
For all of you currently on 12.0.4.0 (Global) build, you may download stock boot.img HERE.​
For all of you currently on 12.0.6.0 (Global) build, you may download stock boot.img HERE.​
For all of you currently on 12.0.7.0 (Global) build, you may download stock boot.img HERE.​
For all of you currently on 12.0.8.0 (Global) build, you may download stock boot.img HERE.​
For all of you currently on 12.0.9.0 (Global) build, you may download stock boot.img HERE.​
For all of you currently on 12.0.11.0 (Global) build, you may download stock boot.img HERE.​

3 - Download latest Magisk Manager from HERE and install it on your phone

4 - Open Magisk Manager App and press:
  • Install
  • Install (again)
  • Select and Patch a File
  • Browse to the path where you saved stock boot.img and select it
Magisk Manager will now patch the boot image and store it in [Internal Storage]/Download/magisk_patched.img

5 - Copy the patched boot image from your device to your PC
  • Store it on the same folder where you have adb and fastboot
  • If you can’t find it via MTP, you can pull the file with ADB
Code:
adb pull /sdcard/Download/magisk_patched.img

6 - Uninstall Magisk Manager App from your phone (I'm not sure if this is really needed but I've done it anyway...)

7 - Flash the patched boot image to your phone by running these commands (remember, you must have patched boot image on the same folder you have adb and fastboot and, of course, your device must be connected to your PC...)
Code:
adb reboot bootloader
Code:
fastboot erase boot
Code:
fastboot flash boot magisk_patched.img
Code:
fastboot continue
(THIS IS IMPORTANT! USE CONTINUE INSTEAD OF REBOOT! You have been warned!!!)

8 - After the phone boots up, hopefully with a normal boot (almost feels like nothing happened....), install/open Magisk Manager App again and watch Magisk doing it's magic!

9 - Enjoy!


All credits goes to topjohnwu and it's incredible work with Magisk.

I cannot be responsible if you turn your phone into a brick. Your phone, your choices, your responsibility!
 

Attachments

  • Screenshot_20190817-231422.png
    Screenshot_20190817-231422.png
    96.8 KB · Views: 14,249
  • Screenshot_20190817-231458.png
    Screenshot_20190817-231458.png
    75.2 KB · Views: 14,095
Last edited:

sirzarmo

Member
Aug 11, 2019
5
3
Thanks!

Been waiting for someone to create a cannonical guide of how to root this phone.
Saw someone with magisk who had WiFi problems, WiFi works ok you?
Also one would assume it disables the OTA update feature, probably better write it.
 

Displax

Senior Member
Jan 19, 2015
250
739
25
Kyiv

Typhus_

Senior Member
Saw someone with magisk who had WiFi problems, WiFi works ok you?

That someone was me. But, I believe that happened because I've used boot.img from 10.3.4.0 branch on GitHub (instead of using boot.img from 10.3.5.0 branch) and, also, I've used "fastboot reboot" command instead of "fastboot continue". As soon as the 10.3.5.0 branch appeared online I've decided to test this method again and it worked, that's why I've decided to share this with all community.

Also one would assume it disables the OTA update feature, probably better write it.

I don't think it will disable OTA feature. Probably, as soon as a new OTA comes out it will be installed on Slot A (because up until now there's only been one update and it was installed on slot B...so everyone should now be on firmware V10.3.5.0 running on Slot B). So, if I'm not mistaken, the "worst" thing that could happen is to lose root (since the update will be installed on Slot A and boot.img on that Slot is still the stock one).

Cheers!
 

Typhus_

Senior Member
Tried it already. It ain't possible because of 2 reasons:

1 - The supposly boot.img backup doesn't exist. Probably Magisk only does it if installed through TWRP and not by patching boot.img

2 - The OTA package fails to install. "A problem has occurred"...while trying to initiate the install.

Enviado do meu Mi A3 através do Tapatalk
 
  • Like
Reactions: sirzarmo

drozo8o8

Senior Member
Mar 2, 2018
95
17
okay so I installed FDE magisk module now my phone is stuck at the bootscreen. Someone got a stock rom for me ?
 
Last edited:

Typhus_

Senior Member
You can change slot through fastboot. It will erase all user data (factory reset) but it's better than the phone not booting.

The other possible solution, I've sent you a PM (because external link).

fastboot --set-active=a (or b if you're now on a)

Enviado do meu Mi A3 através do Tapatalk
 
Last edited:

drozo8o8

Senior Member
Mar 2, 2018
95
17
An offcial stock rom wouldve fixed my problem in no time. I changed the partition and got to a menu where I could chosse to factory reset but its been sitting on formatting data for like half hour...
 

Typhus_

Senior Member
An offcial stock rom wouldve fixed my problem in no time. I changed the partition and got to a menu where I could chosse to factory reset but its been sitting on formatting data for like half hour...
It should be quite fast...guess you're out of luck for the time being my friend.

By the way, you've used fastboot reboot or fastboot continue after changing slot?

It should be fastboot reboot

Enviado do meu Mi A3 através do Tapatalk
 

Patrici0

New member
Oct 27, 2014
2
0
hello, install v10.3.5.0 over v10.3.7.0, now I don't have wifi and the sound does not work, instructions to fix it please ?, I am using the google translator to write here, thanks
 

Typhus_

Senior Member
You'll have to change slot and boot on that slot. You'll lose all your user data but the phone will boot ok and receive latest OTA. Either that or you have to wait for someone to dump you a stock 10.3.7.0 boot.img in order to fix those issues. On GitHub there isn't a boot.img for latest build yet.

Enviado do meu Mi A3 através do Tapatalk
 
  • Like
Reactions: Patrici0

Patrici0

New member
Oct 27, 2014
2
0
You'll have to change slot and boot on that slot. You'll lose all your user data but the phone will boot ok and receive latest OTA. Either that or you have to wait for someone to dump you a stock 10.3.7.0 boot.img in order to fix those issues. On GitHub there isn't a boot.img for latest build yet.

Enviado do meu Mi A3 através do Tapatalk


Fixed, THANKS YOU very much
 

Top Liked Posts

  • There are no posts matching your filters.
  • 40
    Hello!

    There's a guide already on XDA that covers this matter but in a general way and for all devices. That guide was based on the general info you may find on the original installation guide by @topjohnwu. So, all credits go to him.

    Anyway, since there ins't a TWRP Recovery for Mi A3 (yet) and since I believe that many of you don't know about this, Iv'e decided to share here the steps I've done in order to root Mi A3.

    NOTE: Now that we already have a working TWRP available for Mi A3, to root it you can now simply follow THESE steps after unlocking the bootloader.​
    The guide present on this thread, of course, works as well, so I'll leave it here for those of you who don't want to permanently install TWRP to your device.​

    1 - Unlock the bootloader (if you haven't done it already...beware that this will erase all of your user data). To do so, you must:
    • Enable developer options
    • Enable the "OEM unlocking" option
    • Enable USB debugging
    • Have both adb and fastboot, from SDK Platform Tools available on your PC
    • Connect your phone to your PC using the USB cable and run the following commands:
    Code:
    adb devices
    (just to make sure that your phone is, in fact, recognized by your PC and that you're able to run adb commands)​
    Code:
    adb reboot bootloader
    (so your phone will reboot into fastboot mode)​
    Code:
    fastboot flashing unlock
    (after rebooting, boot the phone again into fastboot mode)​
    Code:
    fastboot flashing unlock_critical
    (for full unlock)​

    2 - Download Mi A3 stock boot.img that you may find later on this post, that matches your current build.
    • Copy the boot.img to your phone internal (or external) memory
    • Leave a copy of it on your PC (on the same folder you have adb and fastboot...we never know if we don't need to use it again in the future...you know, to restore the stock boot.img, aka revert to stock...)
    If, for your current build, there isn't a stock boot.img released yet, you may get one yourselves. How? READ THIS.​
    EU Build boot images:

    ---Android 9---
    For all of you currently on 10.3.7.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 10.3.8.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 10.3.9.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 10.3.11.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 10.3.12.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 10.3.14.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 10.3.15.0 (EU) build, you may download stock boot.img HERE.​
    ---Android 10---
    For all of you currently on 11.0.1.0 (EU) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
    For all of you currently on 11.0.2.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 11.0.3.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 11.0.5.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 11.0.6.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 11.0.8.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 11.0.9.0 (EU) build, you may download stock boot.img HERE.​
    ---Android 11---

    For all of you currently on 12.0.2.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 12.0.3.0 (EU) build, you may download stock boot.img HERE. (thanks to @lucoz )​
    For all of you currently on 12.0.5.0 (EU) build, you may download stock boot.img HERE.​
    For all of you currently on 12.0.6.0 (EU) build, you may download stock boot.img HERE.​

    Global Build boot images:

    ---Android 9---
    For all of you currently on 10.3.8.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
    For all of you currently on 10.3.14.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
    ---Android 10---
    For all of you currently on 11.0.7.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
    For all of you currently on 11.0.11.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
    For all of you currently on 11.0.14.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)​
    For all of you currently on 11.0.15.0 (Global) build, you may download stock boot.img HERE.​
    For all of you currently on 11.0.22.0 (Global) build, you may download stock boot.img HERE.​
    ---Android 11---
    For all of you currently on 12.0.3.0 (Global) build, you may download stock boot.img HERE.​
    For all of you currently on 12.0.4.0 (Global) build, you may download stock boot.img HERE.​
    For all of you currently on 12.0.6.0 (Global) build, you may download stock boot.img HERE.​
    For all of you currently on 12.0.7.0 (Global) build, you may download stock boot.img HERE.​
    For all of you currently on 12.0.8.0 (Global) build, you may download stock boot.img HERE.​
    For all of you currently on 12.0.9.0 (Global) build, you may download stock boot.img HERE.​
    For all of you currently on 12.0.11.0 (Global) build, you may download stock boot.img HERE.​

    3 - Download latest Magisk Manager from HERE and install it on your phone

    4 - Open Magisk Manager App and press:
    • Install
    • Install (again)
    • Select and Patch a File
    • Browse to the path where you saved stock boot.img and select it
    Magisk Manager will now patch the boot image and store it in [Internal Storage]/Download/magisk_patched.img

    5 - Copy the patched boot image from your device to your PC
    • Store it on the same folder where you have adb and fastboot
    • If you can’t find it via MTP, you can pull the file with ADB
    Code:
    adb pull /sdcard/Download/magisk_patched.img

    6 - Uninstall Magisk Manager App from your phone (I'm not sure if this is really needed but I've done it anyway...)

    7 - Flash the patched boot image to your phone by running these commands (remember, you must have patched boot image on the same folder you have adb and fastboot and, of course, your device must be connected to your PC...)
    Code:
    adb reboot bootloader
    Code:
    fastboot erase boot
    Code:
    fastboot flash boot magisk_patched.img
    Code:
    fastboot continue
    (THIS IS IMPORTANT! USE CONTINUE INSTEAD OF REBOOT! You have been warned!!!)

    8 - After the phone boots up, hopefully with a normal boot (almost feels like nothing happened....), install/open Magisk Manager App again and watch Magisk doing it's magic!

    9 - Enjoy!


    All credits goes to topjohnwu and it's incredible work with Magisk.

    I cannot be responsible if you turn your phone into a brick. Your phone, your choices, your responsibility!
    5
    boot.img from 11.0.15.0 Global build

    Hello!

    Attached on this post are both stock and Magisk patched boot.img from 11.0.15.0 Global build.

    Code:
    ro.system.build.fingerprint=Xiaomi/laurel_sprout/laurel_sprout:10/QKQ1.190910.002/V11.0.15.0.QFQMIXM:user/release-keys


    Cheers!
    5
    boot.img from 12.0.5.0 EU build

    Hello!

    Attached on this post are the stock and Magisk Patched boot.img from 12.0.5.0 EU build (Android 11).

    Used Magisk 22.0 to patch it.


    Cheers!
    4
    boot.img from 10.3.15.0 EU build

    Hello!

    Attached on this post is the stock boot.img from 10.3.15.0 build.

    Code:
    ro.bootimage.build.fingerprint=Xiaomi/laurel_sprout_eea/laurel_sprout:9/PKQ1.190416.001/V10.3.15.0.PFQEUXM:user/release-keys

    You may now use it to patch with Magisk.


    Cheers!
    4
    How to dump a stock boot.img from Mi A3

    Hello!

    Mi A3 important partitions (thought of sharing this to all of you):


    boot_a -> /dev/block/sde11
    boot_b -> /dev/block/sde32

    modem_a -> /dev/block/sde4
    modem_b -> /dev/block/sde25

    system_a -> /dev/block/sda12
    system_b -> /dev/block/sda13

    vendor_a -> /dev/block/sde16
    vendor_b -> /dev/block/sde37

    As you know Mi A3 is an A/B device, so you have always 2 slots (with 2 systems, 2 vendors, 2 boot partitions, etc.).

    In the next steps you'll know how to dump your boot.img from latest OTA without losing any userdata (userdata partition is shared between both slots).

    This must be done after OTA has been installed and your phone is already running it (without Magisk nor TWRP).

    1 - Reboot to bootloader

    Code:
    adb reboot bootloader

    2 - Check your current active slot
    Code:
    fastboot getvar current-slot

    3 - Change to the currently inactive slot
    Code:
    fastboot set_active [B]a[/B]

    (or b if your currently active slot is a...remember, the objective is to change to the currently inactive slot)

    4 - Erase your boot partition from the previously inactive slot (previously because, now, it's already the active one)

    Code:
    fastboot erase boot

    5 - Flash TWRP into your currently active boot partition

    Code:
    fastboot flash boot twrp-3.3.1-17-laurel_sprout-Q-mauronofrio.img

    6 - Reboot to TWRP

    Code:
    fastboot reboot

    (Keep pressing Vol+ button before hitting ENTER and until you see Android One logo to force booting into TWRP)

    7 - While on TWRP, change to the other slot (the one active at the beginning of these steps)

    8 - Perform a TWRP backup choosing only "Boot"

    9 - You'll end up with a Backup of your boot.img on your internal storage inside TWRP->BACKUPS->"NAME OF THE BACKUP" folder

    10 - Copy boot.emmc.win file to your PC

    11 - Rename it to new_boot.img

    There. A stock boot.img (named "new_boot.img") is now stored on your PC.

    You can use it to be patched with magisk (as instructed on the OP) as soon as you boot up your device.

    BUT FIRST, you must revert the changes made to the initially inactive slot (the one where you flashed TWRP):

    1 - While on TWRP change to the other slot (the one where TWRP was flashed)

    2 - Reboot to Bootloader

    3 - Erase your boot partition from the current slot

    Code:
    fastboot erase boot

    4 - Flash a stock boot.img into your currently active boot partition (preferably the stock boot.img that matches the build that's on that slot)

    Code:
    fastboot flash boot boot.img

    5 - Change to the other slot (the one that was active in the beginning)
    Code:
    fastboot set_active [B]b[/B]

    (or a if your currently active slot is b...)

    6 - Erase boot partition
    Code:
    fastboot erase boot

    7 - Flash the new boot.img
    Code:
    fastboot flash boot new_boot.img

    8 - Reboot to system
    Code:
    fastboot [B]continue[/B]

    Note that it's "continue" and not "reboot"!

    There, your phone is now booting up to the latest build received by OTA and you can now use the new_boot.img to be patched with Magisk and Root it (as explained on the OP).


    GUIDE WITHOUT USING TWRP (more complicated and you need to have boot.img, system.img and vendor.img correct build versions or it won't work...):
    0 - Please take note of your current build version number, as well as, if it's EU or Global.

    1 - Download your Stock Rom from HERE (you will need this in order to obtain boot.img, system.img and vendor.img from your previously build...the one that should be installed on your currently inactive slot).

    2 - Save boot.img, system.img and vendor.img on the same folder you have adb and fastboot

    3 - Connect your phone to your PC with the USB cable

    4 - Reboot to bootloader

    Code:
    adb reboot bootloader

    or​
    Turn your phone off and power it on while pressing "Power + Vol-" keys simultaneously until you see the Android One logo.​

    5 - Check your current active slot
    Code:
    fastboot getvar current-slot

    6 - Change to the currently inactive slot
    Code:
    fastboot set_active [B]a[/B]

    (or b if your currently active slot is a...remember, the objective is to change to the currently inactive slot)

    7 - Erase your boot, system and vendor partitions from the previously inactive slot (previously because, now, it's already the active one)

    Code:
    fastboot erase boot
    Code:
    fastboot erase system
    Code:
    fastboot erase vendor

    6 - Flash vendor.img, system.img and boot.img taken from Stock ROM

    Code:
    fastboot flash vendor vendor.img
    Code:
    fastboot flash system system.img
    Code:
    fastboot flash boot boot.img

    7 - Reboot to system
    Code:
    fastboot reboot

    Your phone will now boot to the previous build version (10.3.3.0 or 10.3.5.0 or 10.3.7.0, etc...).

    With any of those builds you'll be able to root it, since a stock boot.img is already available online.

    You can now dump the stock boot.img from the slot where you have the latest build installed.

    To do so, you cannot let the phone update to latest version and, also, you must root the boot.img that's currently active following the instructions provided on the OP.

    As soon as you're rooted you'll be able to run adb shell, as root, and dump the stock boot.img from the other slot (where the latest boot.img is stored):

    Code:
    adb shell
    Code:
    su
    Code:
    dd if=/dev/block/[B]sde11[/B] of=/sdcard/new_boot.img
    OR
    Code:
    dd if=/dev/block/[B]sde32[/B] of=/sdcard/new_boot.img

    It depends if you want to dump slot a boot.img or slot b boot.img (respectively)

    There. A stock boot.img (named "new_boot.img") will be dumped to your "sdcard" (internal memory).

    You can now use it to be patched with magisk (as instructed on the OP).

    Save your new_boot.img and magisk_patched.img files on your PC, on the same folder you have adb and fastboot.

    Now It's time to get back to your latest build.


    1 - Open Magisk Manager App and choose Uninstall (completely uninstall)

    Magisk will completely be uninstalled and reboot your device. You'll end up on stock Recovery with the "No Command" image.

    2 - Long press the power button and, after, press Vol+

    Now you'll see the recovery commands

    3 - Choose Reboot to Bootloader

    4 - Change to the currently inactive slot (the one that was active on the beginning of these steps)
    Code:
    fastboot set_active [B]b[/B]

    (or a if your currently active slot is b)

    5 - Erase boot partition
    Code:
    fastboot erase boot

    6 - Flash the new boot.img
    Code:
    fastboot flash boot new_boot.img
    OR, if you wish, you can already boot the new magisk patched boot image that you've just patched.
    Code:
    fastboot flash boot magisk_patched.img

    5 - Reboot to system
    Code:
    fastboot [B]continue[/B]

    Note that it's "continue" and not "reboot"!


    There, your phone is now booting up to the latest build received by OTA and you can now use it as Root.

    OLD GUIDE (less complicated but you'll lose all your userdata...):


    1 - adb reboot bootloader
    2 - fastboot getvar current-slot (for you to know which slot is currently the active one)
    3 - fastboot --set-active=a (or b if your currently active slot is a...remember, the objective is to change to the currently inactive slot)
    4 - fastboot reboot

    Your phone will now boot to recovery and force you to erase all user data, afterwards, it will boot to the previous build version (10.3.3.0 or 10.3.5.0, etc...).

    With any of those builds you'll be able to root it, since a stock boot.img is already available online.

    You can now dump the stock boot.img from the slot where you have the latest build installed.

    To do so, you cannot let the phone update to latest version and, also, you must root (if you weren't rooted before) the boot.img that's currently active.

    As soon as you're rooted you'll be able to run adb shell as root and dump the stock boot.img from the other slot (where the latest boot.img is now stored):

    1 - adb shell
    2 - su
    3 - dd if=/dev/block/sde11 of=/sdcard/boot.img
    OR
    3 - dd if=/dev/block/sde32 of=/sdcard/boot.img

    It depends if you want to dump slot a boot.img or slot b boot.img (respectively)

    There. A stock boot.img will be dumped on your "sdcard" (internal memory)

    You can now use it to be patched with magisk.

    OK?

    Ok.



    Cheers!