Sources used: https://www.getdroidtips.com/root-xiaomi-12-and-12-pro/
1. First unlock your bootloader. This thread does not cover this. I suggest you do not try to tamper with the 1week~ time gate you will encounter else it may get longer should you fail.
2. Enable Developer mode and adb from Developer settings again.
3. Download the appropriate Fastboot files for your device. See the About section in your phone's settings to know what you are currently running.
4. Download latest Magisk-vXX.Y.apk and install it on your device. Magisk developer only provides files from Github, do not download it from anywhere else.
5. Extract(Install 7-zip if needed) the fastboot .tgz archive and copy the boot.img from it to your phone's sdcard through adb (or other means):
6. Open up Magisk on your phone, press Install and use the patch option to navigate to the boot.img you just copied. Select that, next next next.
7. Read the output to see where the patched boot.img got saved. Pull that.
8. Reboot phone to fastboot.
9. Flash the modified boot image to both A and B partitions
10. Say your prayers and reboot, your device should now have functional root with Magisk
1. First unlock your bootloader. This thread does not cover this. I suggest you do not try to tamper with the 1week~ time gate you will encounter else it may get longer should you fail.
2. Enable Developer mode and adb from Developer settings again.
3. Download the appropriate Fastboot files for your device. See the About section in your phone's settings to know what you are currently running.
4. Download latest Magisk-vXX.Y.apk and install it on your device. Magisk developer only provides files from Github, do not download it from anywhere else.
5. Extract(Install 7-zip if needed) the fastboot .tgz archive and copy the boot.img from it to your phone's sdcard through adb (or other means):
Code:
adb push cupid_eea_global_images_V13.0.16.0.SLCEUXM_20220408.0000.00_12.0_eea/images/boot.img /sdcard/
6. Open up Magisk on your phone, press Install and use the patch option to navigate to the boot.img you just copied. Select that, next next next.
7. Read the output to see where the patched boot.img got saved. Pull that.
Code:
adb pull /sdcard/Download/magisk_patched-24300_D2K9V.img
8. Reboot phone to fastboot.
Code:
adb reboot fastboot
9. Flash the modified boot image to both A and B partitions
Code:
fastboot flash boot_a magisk_patched-24300_D2K9V.img
fastboot flash boot_b magisk_patched-24300_D2K9V.img
10. Say your prayers and reboot, your device should now have functional root with Magisk
Code:
fastboot reboot