How To Guide [Guide] Xiaomi Mi Pad 5 MIUI12/13 ROOT Step-by-step - Pass SafetyNet, Widevine L1

Search This thread
Everything you do, you do at your own risk. I'm not responsible for all damages, this can also lead to loss of warranty.

Hi,
Probably many of you know how to do a Magisk install without TWRP, but this guide is for people who don't know and don't want to mess things up.
I will try to show you step by step how to do it.

Many thanks to:
kdrag0n
topjohnwu
Leave them a nice feedback ;)

!!! Before we start make sure your device is unlocked, if you don't know how to do it below is link to official Xiaomi guide !!!
https://c.mi.com/thread-2262302-1-0.html

Requirement
  • Xiaomi Mi Flash ver. =>3-14-0 - Needed to install all adb drivers Download
  • ADB & Fastboot tools - Could be the one built into Mi Flash tool I'll use this to make it simple
  • Magisk =>24.2 - This software is base of our rooting process Download
  • SafetyNet Fix => 2.2.1 (Zygisk) - Needed to backdoor SafetyNet fail check, at the moment it is only working method for Mi Pad 5 Download Make sure you download the Zygisk version!
  • Boot.img - You can download from official MIUI website full flashable rom and separate boot.img file from there, or use my if your Miui version is China 13.0.5, EEA 13.0.3, Global 13.0.1
Installation
To make it easier, Green color mean what you need to do on Tablet, Orange on PC

  1. Unzip Mi Flash tool
  2. Open folder and run XiaoMiFlash.exe, if window "Driver" won't pop-up click on the Driver tab and then "Install" button and close all windows.
  3. Connect your tablet to computer, when your tablet ask how you want use USB, choose File Transfer/Android Auto
  4. Copy to internal storage Magisk-v****.apk, safetynet-fix-v****.zip and boot.img
  5. Open File Manager on your tablet find a folder where you copied all files, and install Magisk
  6. Open Magisk app, and click on Install in section Magisk, then select "Select and Path a File", after that find your boot.img file and click on it
  7. Click "LET'S GO" button on the right side and wait until process will be finished
  8. On your computer in the tablet's storage window, go to the file specified in the application probably /Download/magisk_patched-*****
  9. Copy this file to a subfolder of Mi Flash on your computer, exactly to MiFlash2020-3-14-0\Source\ThirdParty\Google\Android and change the name of this file to boot.img
  10. Open PowerShell/Windows Terminal in this folder (Hold Shift + Right click -> Open PowerShell window here)
  11. Make sure your tablet have enabled USB debugging in Developer options Setting -> Additional settings -> Developer options -> USB debugging
  12. Turn off your tablet, then hold down Power and VOL- until the screen lights up, then release power button, if Fastboot appears, everything went fine
  13. Go back to your Terminal window and type to check if your computer see your tablet
    Code:
    ./fastboot.exe devices
    If you see answer "******** fastboot" it mean there is communication between PC and Tablet
  14. Next type this command to flash patched boot image
    Code:
    ./fastboot.exe flash boot boot.img
  15. Next type this command to reboot your device
    Code:
    ./fastboot.exe reboot
  16. Restart can take a longer time than normal
  17. Open Magisk app and check status of Magisk, if you see for exaple "Installed 24.2 (24200)" everything went fine
  18. Open Settings in right corner of app and in section App click on Hide the Magisk app then type name for hidden app, it will ask to install new app so do it
  19. Open again Magisk app and open Settings in section Magisk enable Zygisk (Beta) and Enforce DenyList
  20. Click on Configure DenyList than click on three dots in right corner and uncheck Show system apps
  21. Search for all the apps in the list below and check them. It is important to click on their name to see all modules, once you have done this click on the box to activate all of them
    Code:
    Google
     Google Assistant (I have two)
     Google Pay
     Google Play services
     Google Play Store
  22. After that reboot your tablet, and open again Magisk app
  23. On the bottom click on Modules
  24. Click on Install from storage button and find file safetynet-fix-v*******.zip, than click on it
  25. After that reboot your device one more time
  26. After reboot open Android Settings go to Apps and Unhide system services than find and clear all data of Google Play services and Google Play Store
  27. Reboot tablet last time
If you have reached this point it means that everything has gone correctly, probably for about 3 hours you will still not be able to install Netflix and some banking applications but after this time everything will be back to normal, this is because Google's servers have detected that Magisk has been installed but that the application has been changed and Zygisk has been enabled so at the next check it notices that everything is Ok and gives access back.

Quick explaination what happend here:
  1. Magisk has been installed and device is Rooted
  2. The application has been changed and hidden
  3. Zygisk has been activated and hidden from Google services
  4. SafetyNet-fix was installed, which restores the functionality of SafetyNet and Widevine L1, which is blocked after the installation of Magisk and unlocked Bootloader
 
Last edited:

Nux01

Member
Mar 9, 2022
12
0
Hello,

(I use google translate).

Thanks for your method. Before using it, I would like to ask you a few questions.

I have already rooted a few devices (mipad 1, mi phone, htc...) with my macbook and twrp.
The adb files are already installed on my mac.

1) once the pad 5 is rooted, should I, like on my phone, patch the new boot.img file with each update?

2) Could I install the twrp application afterwards to be able to do a complete backup of the system and possibly install a version of lineageos later?

3) Is there a version of miflash unlock tool for mac os x?

4) Should I register or register on the xioami site before unlocking the boot?

Thank you in advance for your method and your answers.

Nux01
 
Hello,

(I use google translate).

Thanks for your method. Before using it, I would like to ask you a few questions.

I have already rooted a few devices (mipad 1, mi phone, htc...) with my macbook and twrp.
The adb files are already installed on my mac.

1) once the pad 5 is rooted, should I, like on my phone, patch the new boot.img file with each update?

2) Could I install the twrp application afterwards to be able to do a complete backup of the system and possibly install a version of lineageos later?

3) Is there a version of miflash unlock tool for mac os x?

4) Should I register or register on the xioami site before unlocking the boot?

Thank you in advance for your method and your answers.

Nux01
Hi Nux01,
1. Unfortunately yes, TWRP isn't supported for Pad 5 yet.
2. It won't work, TWRP app is only making a request to TWRP custom recovery, until it doesn't exist you can't even install custom ROM
3. It is, but i didn't test it yet on Pad 5, and I don't know if it will work with new decides because last release is from 20.07.2020.
https://github.com/francescotescari/XiaoMiToolV2/releases
4. Yes, you need Xiaomi account, also your device has to be logged in, and registered to unlock, Xiaomi made complete guide how to do this, link is on the top of this post.
 

Nux01

Member
Mar 9, 2022
12
0
Hello,

Thank you for your quick reply.

The latest version of Mitool does not work. On the other hand, with regard to version 20.7.21, it's OK.

What does it mean: "I do not know if it will work with new decides".

And to unlock the bootloader, I have to use the Xiaomitool V2 application?

Thanks again.

NUX01
 
Hello,

Thank you for your quick reply.

The latest version of Mitool does not work. On the other hand, with regard to version 20.7.21, it's OK.

What does it mean: "I do not know if it will work with new decides".

And to unlock the bootloader, I have to use the Xiaomitool V2 application?

Thanks again.

NUX01
I mean it's quite old release so it may not work with current unlock bootloader process on new devices like a Xiaomi 12, Xiaomi Pad 5 etc. I can't promise it won't brick your device, only confirmed method is by official Xiaomi tool.
 

fIex0

New member
Followed the instruction, worked like a charm. Although I had unknown "chinese sings" errors with the driver install it worked. By the way there is a newer version of the flashing tool.

Thanks for the effort of writing this down!
 

Nux01

Member
Mar 9, 2022
12
0
Hello,
I just managed to unlock the bootloader of my tablet "Pad 5".
I tried under Mac and Linux with Xiaomitool V2 without success (error 20036 and 20045).
I also tried with VirtualBox who did not recognize the tablet.
I succeeded with VMware and Windows 7 by testing different drivers and it worked.

I just root the tablet with Magisk.

On the other hand, is there the equivalent of TWRP to make a complete system backup. Apart from Titanium and MyBackup.

Thanks for your help.
 

arik100

Senior Member
Apr 6, 2012
236
15
thanks dude.
didn't try this yet, just wondering.
can't i just flash recovery and then flash magisk.apk?
thanks
 

Thomas Brown 99

New member
May 3, 2022
2
1
How to get the boot.img 13.0.2? I checked the 3GB Firmware and only found vendor_boot.img. Is it the same thing?
 

cysmaster

New member
Jun 21, 2022
2
0
Hey there.
I have done everything above and i MIGHT have some problem. The problem with my problem is that its not really reproducable easily even for me.... Weird, I know!

Lets go into details:
Issue description: When I reboot my tablet it goes into "MIUI Recovery" window, on which I am offered to reboot the device or clean.... And when I reboot it goes back to the recovery screen again. Like a loop-hole.
....
But then if I leave it untouched for several minutes it reboots itself and launches the system properly finally...

When did it start: It first started after I performed this step:

24. Click on Install from storage button and find file safetynet-fix-v*******.zip, than click on it
25. After that reboot your device one more time

When I finally landed in the system I of course continued and performed further steps. After another reboot in step 27 the same thing happened but much, much longer.
I thought it somehow self fixed and works - once I am in the system. Right? So I did a reboot to test it. And no... recovery screen again for another 20 or so minutes until finally MIUI loaded fully.

Now I am afraid to turn off / reboot my tablet... I am afraid it might never finish booting next time.
Any ideas whats wrong and how to fix this weird and irregular behaviour?


My details:
Device: Xiaomi Pad 5 6/256gb
Original system was Chinese. I have reinstalled to Global one a version ago.
MIUI version currently running: 13.0.3(RKXMIXM)
Android version: 11 RKQ1.200826.002
Magisk version: 25.1 (25100) (32)
Magisk Modules: Universal SafetyNet Fix v2.2.1 (yes I made sure to download around Zygisk section)

Anything else I shall provide?
 
Last edited:
Hey there.
I have done everything above and i MIGHT have some problem. The problem with my problem is that its not really reproducable easily even for me.... Weird, I know!

Lets go into details:
Issue description: When I reboot my tablet it goes into "MIUI Recovery" window, on which I am offered to reboot the device or clean.... And when I reboot it goes back to the recovery screen again. Like a loop-hole.
....
But then if I leave it untouched for several minutes it reboots itself and launches the system properly finally...

When did it start: It first started after I performed this step:



When I finally landed in the system I of course continued and performed further steps. After another reboot in step 27 the same thing happened but much, much longer.
I thought it somehow self fixed and works - once I am in the system. Right? So I did a reboot to test it. And no... recovery screen again for another 20 or so minutes until finally MIUI loaded fully.

Now I am afraid to turn off / reboot my tablet... I am afraid it might never finish booting next time.
Any ideas whats wrong and how to fix this weird and irregular behaviour?


My details:
Device: Xiaomi Pad 5 6/256gb
Original system was Chinese. I have reinstalled to Global one a version ago.
MIUI version currently running: 13.0.3(RKXMIXM)
Android version: 11 RKQ1.200826.002
Magisk version: 25.1 (25100) (32)
Magisk Modules: Universal SafetyNet Fix v2.2.1 (yes I made sure to download around Zygisk section)

Anything else I shall provide?
I also have this module installed without problems, as there is no recovey for Pad5, it is a good idea to install in magisk the module Magisk Bootloop Protector, which serves exactly to prevent what you are afraid that happen with your tablet
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Is the same tutorial for MIUI 14 ?
    I want to upgrade to MIUI 14 and then root it

    Regards
    1
    Wait for miui14 root .
  • 21
    Everything you do, you do at your own risk. I'm not responsible for all damages, this can also lead to loss of warranty.

    Hi,
    Probably many of you know how to do a Magisk install without TWRP, but this guide is for people who don't know and don't want to mess things up.
    I will try to show you step by step how to do it.

    Many thanks to:
    kdrag0n
    topjohnwu
    Leave them a nice feedback ;)

    !!! Before we start make sure your device is unlocked, if you don't know how to do it below is link to official Xiaomi guide !!!
    https://c.mi.com/thread-2262302-1-0.html

    Requirement
    • Xiaomi Mi Flash ver. =>3-14-0 - Needed to install all adb drivers Download
    • ADB & Fastboot tools - Could be the one built into Mi Flash tool I'll use this to make it simple
    • Magisk =>24.2 - This software is base of our rooting process Download
    • SafetyNet Fix => 2.2.1 (Zygisk) - Needed to backdoor SafetyNet fail check, at the moment it is only working method for Mi Pad 5 Download Make sure you download the Zygisk version!
    • Boot.img - You can download from official MIUI website full flashable rom and separate boot.img file from there, or use my if your Miui version is China 13.0.5, EEA 13.0.3, Global 13.0.1
    Installation
    To make it easier, Green color mean what you need to do on Tablet, Orange on PC

    1. Unzip Mi Flash tool
    2. Open folder and run XiaoMiFlash.exe, if window "Driver" won't pop-up click on the Driver tab and then "Install" button and close all windows.
    3. Connect your tablet to computer, when your tablet ask how you want use USB, choose File Transfer/Android Auto
    4. Copy to internal storage Magisk-v****.apk, safetynet-fix-v****.zip and boot.img
    5. Open File Manager on your tablet find a folder where you copied all files, and install Magisk
    6. Open Magisk app, and click on Install in section Magisk, then select "Select and Path a File", after that find your boot.img file and click on it
    7. Click "LET'S GO" button on the right side and wait until process will be finished
    8. On your computer in the tablet's storage window, go to the file specified in the application probably /Download/magisk_patched-*****
    9. Copy this file to a subfolder of Mi Flash on your computer, exactly to MiFlash2020-3-14-0\Source\ThirdParty\Google\Android and change the name of this file to boot.img
    10. Open PowerShell/Windows Terminal in this folder (Hold Shift + Right click -> Open PowerShell window here)
    11. Make sure your tablet have enabled USB debugging in Developer options Setting -> Additional settings -> Developer options -> USB debugging
    12. Turn off your tablet, then hold down Power and VOL- until the screen lights up, then release power button, if Fastboot appears, everything went fine
    13. Go back to your Terminal window and type to check if your computer see your tablet
      Code:
      ./fastboot.exe devices
      If you see answer "******** fastboot" it mean there is communication between PC and Tablet
    14. Next type this command to flash patched boot image
      Code:
      ./fastboot.exe flash boot boot.img
    15. Next type this command to reboot your device
      Code:
      ./fastboot.exe reboot
    16. Restart can take a longer time than normal
    17. Open Magisk app and check status of Magisk, if you see for exaple "Installed 24.2 (24200)" everything went fine
    18. Open Settings in right corner of app and in section App click on Hide the Magisk app then type name for hidden app, it will ask to install new app so do it
    19. Open again Magisk app and open Settings in section Magisk enable Zygisk (Beta) and Enforce DenyList
    20. Click on Configure DenyList than click on three dots in right corner and uncheck Show system apps
    21. Search for all the apps in the list below and check them. It is important to click on their name to see all modules, once you have done this click on the box to activate all of them
      Code:
      Google
       Google Assistant (I have two)
       Google Pay
       Google Play services
       Google Play Store
    22. After that reboot your tablet, and open again Magisk app
    23. On the bottom click on Modules
    24. Click on Install from storage button and find file safetynet-fix-v*******.zip, than click on it
    25. After that reboot your device one more time
    26. After reboot open Android Settings go to Apps and Unhide system services than find and clear all data of Google Play services and Google Play Store
    27. Reboot tablet last time
    If you have reached this point it means that everything has gone correctly, probably for about 3 hours you will still not be able to install Netflix and some banking applications but after this time everything will be back to normal, this is because Google's servers have detected that Magisk has been installed but that the application has been changed and Zygisk has been enabled so at the next check it notices that everything is Ok and gives access back.

    Quick explaination what happend here:
    1. Magisk has been installed and device is Rooted
    2. The application has been changed and hidden
    3. Zygisk has been activated and hidden from Google services
    4. SafetyNet-fix was installed, which restores the functionality of SafetyNet and Widevine L1, which is blocked after the installation of Magisk and unlocked Bootloader
    1
    1
    That link is down unfortunately. Can someone provide a working link? Or is it a generic process for every xiaomi device?
    Same as other Xiaomi devices. If you have problems adding your account in the developer options, try doing it while connected to USA through a VPN, that's what I had to do. Also had to update my Windows drivers through Windows update while the pad was connected to my laptop to get fastboot to work, even though adb was ok
    1
    Thank you for the guild! It works great for me! Netflix is also not available in play store in my case as well
    Use this modified SafetyNet fix module (just install it over original one):
    Original module is not yet updated.
    As always, don't forget to clear data for Google Play and Google Services.
    It will fix device integrity check and all apps in store, which require this check, will be available again.

    Also, there is no need for that many steps and reboots, and no need to use enforce or DenyList (unless some your specific apps detects root and won't work because of that).
    Just patch file in Magisk on tablet, flash it on PC, after first boot hide Magisk by changing name, turn on Zygisk, install modified SafetyNet fix module, clear data and reboot.
    1
    Unfortunately the procedure didn't work for me on EEA ROM. Once I flashed patched boot.img and rebooted, device stays stuck with MI logo and three blinking dots and doesn't boot. I let it in this state for one hour hoping that first boot just will take more time.

    I tried to reboot and re-flash patched image again, but there is no difference.
    Too bad!
    Maybe you need the boot.img to be the same version as the current one on your tablet. Or just flash into Global ROM, I believe after unlocking your bootloader you can do that by using MiFlash.