How To Guide [ROOT]ing Xiaomi 12 with Magisk

Search This thread

C0rn3j

Senior Member
Jan 22, 2016
102
49
Xiaomi 12
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):
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
 

lucascm08

Senior Member
Jun 29, 2011
223
48
was anyone able to install viper 4 android in xiaomi 12 or xiaomi 12 pro? it aways ask me to install driver when i open the apk. im using v4a in poco f2 pro with android 12/miui 13 without issues
 

ydd0ras

Senior Member
Dec 28, 2014
1,828
907
Xiaomi Mi 11 Lite 5G
If you are on a custom ROM, for example LOS 19.1 with LOS recovery (and vendor_boot, dtbo and recovery), following step necessary:
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
Otherwise LOS may not boot, after flashing the patched boot.img.
Happened here yesterday!
 

geraldine

Member
Jan 5, 2006
31
14
hi all,
i have a xiaomi 12 miui 13.0.18.0(SLCEUXM) android version 12 SKQ1.211006.001 security 2022-05-01
i have unlocked with official software and rooted with magisk 25.1, the root passed without error.
when i check with root checker i have congrats the device is rooted.
but i think it's a partial root, because impossible to change permissions on files on phone storage and the copy/paste files to /system/xbin/ in "root explorer" "ES explorer" "root browser pro" say same thing PERMISSION DENIED (all this soft are checked ON superUser in magisk).
i have change name of magisk and activate Zygisk.
i have try with adb and adb shell to copy/paste and the result is "read only files"
can you help me?
 

geraldine

Member
Jan 5, 2006
31
14
hi, what difference with this differents fastboot?
the blue one appear with the command "adb reboot fastboot" on platform-tools
and the orange one is with vol- + power
 

Attachments

  • WIN_20220719_00_57_47_Pro.jpg
    WIN_20220719_00_57_47_Pro.jpg
    43.1 KB · Views: 13
  • WIN_20220719_00_59_47_Pro.jpg
    WIN_20220719_00_59_47_Pro.jpg
    43.2 KB · Views: 14

andersonbless

New member
Oct 29, 2008
1
0
Belém/PA
Xiaomi 12
Can't patch the boot.img of my xiaomi 12 Pro in magisk, shows me an Error.

- Unable to unpack Boot Image
- Installation Failed

someone can help me?
Hello, good night, I'm having the same problem with Xiaomi 12, the only file that I believe to be the boot image is with the following name "payload.bin". I've been looking for a method here on the web for three days to root my xiaomi. Help please!
 

dir05dp

Member
Apr 9, 2015
11
0
35
Indonesia
Sumber yang digunakan: https://www.getdroidtips.com/root-xiaomi-12-and-12-pro/

1. Buka kunci bootloader Anda terlebih dahulu. Utas ini tidak mencakup ini. Saya sarankan Anda tidak mencoba mengutak-atik gerbang waktu 1 minggu~ yang akan Anda temui jika tidak, mungkin akan lebih lama jika Anda gagal.

2. Aktifkan mode Pengembang dan adb dari pengaturan Pengembang lagi.

3. Unduh file Fastboot yang sesuai untuk perangkat Anda . Lihat bagian Tentang di pengaturan ponsel Anda untuk mengetahui apa yang sedang Anda jalankan.

4. Unduh Magisk-vXX.Y.apk terbaru dan instal di perangkat Anda. Pengembang Magisk hanya menyediakan file dari Github, tidak mengunduhnya dari tempat lain.

5. Ekstrak (Instal 7-zip jika perlu) arsip fastboot .tgz dan salin boot.img darinya ke kartu sd ponsel Anda melalui adb (atau cara lain):
Code:
adb push cupid_eea_global_images_V13.0.16.0.SLCEUXM_20220408.0000.00_12.0_eea/images/boot.img /sdcard/

6. Buka Magisk di ponsel Anda, tekan Instal dan gunakan opsi patch untuk menavigasi ke boot.img yang baru saja Anda salin. Pilih itu, berikutnya berikutnya berikutnya.

7. Baca output untuk melihat di mana boot.img yang ditambal disimpan. Tarik itu.
Code:
adb pull /sdcard/Download/magisk_patched-24300_D2K9V.img

8. Reboot ponsel ke fastboot.
Code:
adb reboot fastboot

9. Flash image boot yang dimodifikasi ke partisi A dan B
[KODE]fastboot flash boot_a magisk_patched-24300_D2K9V.img
fastboot flash boot_b magisk_patched-24300_D2K9V.img[/CODE]

10. Ucapkan doa Anda dan reboot, perangkat Anda sekarang harus memiliki root fungsional dengan Magisk
Code:
reboot fastboot
this method is work, I'm using magisk v25.2, android 12 Miui 13.0.5.0
 
Last edited:

Top Liked Posts