Root for xiaomi with Twrp – Magisk
Devices with Dedicated Recovery Partitions (A/B):
These devices have dedicated «recovery_a» and «recovery_b» partitions.
The custom recovery image can be flashed to «recovery_a» and «recovery_b» partitions directly.
Flashing to «recovery_ab» will flash to both «recovery_a» and «recovery_b» with a single command, if the device supports it.
The custom recovery will persist across ROM updates.
Platforms: Snapdragon 685, 4 Gen 2, 7/7s/7+/8/8+ Gen 1/2/3
Devices: aurora, cupid, diting, fuxi, garnet, houji, ingres, ishtar, manet, marble(in), mayfly, mondrian, nuwa, shennong, sky, socrates, tapas/topaz, thor, unicorn, vermeer, zeus, ziyi
Image size: 100 MiB (104,857,600 bytes)
Installation:
fastboot flash recovery_ab recovery.img
fastboot reboot recovery
Never try to «fastboot boot» these images. If you do that, you will get a «Bad Buffer Size» error and your device will be stuck in fastboot mode.
To get out of being stuck in fastboot mode, run these commands:
fastboot erase misc
fastboot set_active a
Then install the recovery correctly.
Devices with Boot as Recovery (A/B):
These devices don’t have a dedicated partition for recovery.
The recovery ramdisk resides in the «boot_a» and «boot_b» partitions.
A shared kernel is used for both the system and the recovery.
Due to that, you should never flash a custom recovery image directly to the «boot_a» and/or «boot_b» partitions. If you do that, the system will fail to boot.
Platforms: Snapdragon 678/680/695/778G/778G+/780G/870/888/888+
Devices: alioth, haydn, lisa, mona, moonstone, munch, odin, psyche, redwood(in), renoir, spes(n), star/mars, sunny, sunstone, taoyao, thyme, venus, veux/peux, vili
Image size: 192 MiB (201,326,592 bytes), or 96/128 MiB (100,663,296/134,217,728 bytes) for low-mid devices
Installation:
fastboot boot recovery.img
In the recovery interface: Advanced -> Install Recovery Ramdisk
Devices with Vendor Boot as Recovery (A/B):
These devices don’t have a dedicated partition for recovery.
The recovery ramdisk resides in the «vendor_boot_a» and «vendor_boot_b» partitions.
The recovery ramdisk includes kernel modules compiled for the specific kernel that resides in the «boot_a» and «boot_b» partitions.
Due to that, you should never flash a custom recovery image that was built for a different kernel version. If you do that, the recovery will fail to boot or malfunction.
Coincidentally, these devices don’t support the «fastboot boot» command, so the custom recovery images are built to be flashed to «vendor_boot_a» and «vendor_boot_b» partitions directly.
Flashing to «vendor_boot_ab» will flash to both «vendor_boot_a» and «vendor_boot_b» with a single command, if the device supports it.
Platforms: Dimensity 8100/8100-Ultra/9000/9000+
Devices: daumier, matisse, rubens, xaga(pro/in)
Image size: 64 MiB (67,108,864 bytes)
Installation:
fastboot flash vendor_boot_ab recovery.img
fastboot reboot recovery
Devices with a Dedicated Recovery Partition (non-A/B):
These devices have a dedicated «recovery» partition.
The custom recovery image can be flashed to «recovery» partition directly.
The custom recovery will persist across ROM updates.
Platforms: Snapdragon 662/720G/730/730G/732G/750G/765G/768G/860/865
Devices: apollo, cas, citrus, cmi, courbet, gauguin(pro), lime/lemon/pomelo, lmi(pro), monet, phoenix, picasso, surya/karna, sweet, umi, vangogh, vayu/bhima
Image size: 128 MiB (134,217,728 bytes), or 64 MiB (67,108,864 bytes) for old devices
Installation:
fastboot flash recovery recovery.img
fastboot reboot recovery
You may also «fastboot boot» these images if you don’t want to install the custom recovery.
* Older devices than these fit into «Devices with a Dedicated Recovery Partition (non-A/B)» but the image size is inconsistent.
Tutorial 1
Tutorial 2
Adicionales
- magisk.apk
- safetynet.zip
-
Disable_Dm-Verity_ForceEncrypt (flashear con twrp si deja abrir aplicaciones de bancos, mensajeria, netflix, disney ,etc)