Xiaomi phones are very easy to unlock to bootloader.

Unlock bootloader

  • You need Windows and to wait 168 hours

Get root access with Magisk

  • Download stock firmware (you need the fastboot version) here
  • Extract the stock firmware and find boot.img, move it to the device
  • Install the Magisk Manager apk
  • Open Magisk and patch boot.img
  • Move back this boot.img to a PC and flash boot.img with fastboot
  • Reboot and open Magisk to see if you have root

Pass safety net

  • Install YASNAC to check the SafetyNet status

Cool functionalities enabled by root

  • De bloater. Remove system packages systemless-ly.
    • Best feature? In case something bad happens and your phone bootloops (happened to me when I tried to remove the MIUI updater), just boot a recovery via fastboot, open a shell there and remove /data/adb/modules/De-bloater.
  • Adaway
  • AFWall+, fine tune the network access for every app, even in Whitelist mode.
  • FF Updater, install and update free browsers (ungoogled chromium, bromite, firefox)
  • Battery Charge Limit, stop charging the battery on the set limit
  • FreezeYou, freeze apps

Enable USB debugging (Security settings) without a Mi Account

This is needed e.g. for simulating input via USB debugging and it won’t work from the UI if you don’t have a Mi account and network connection.

Open a shell (adb shell -> su works too) and:

# This is the normal "USB Debugging"
setprop persist.security.adbinstall 1
setprop persist.security.adbinput 1
# Shut up the MIUI security center
sed -i 's,"perm_adb_install_notify" value="true","perm_adb_install_notify" value="false",' /data/data/com.miui.securitycenter/shared_prefs/remote_provider_preferences.xml


To get access to a root shell via adb, enable com.android.shell in the Superuser tab of Magisk.