MIUI Flashing Guide: Unbrick, EDL Method / Locked Bootloader, Bootloader Unlock, More

[Guide] [All in One] MIUI Flashing Guide: Unbrick, EDL Method / Locked Bootloader, Bootloader Unlock, More



how to unbrick miui device
how to unbrick miui device

Hello MIUIers,

Today I will share the guides for,

  • How to Unbrick any Xiaomi Device with Locked Bootloader
  • How to get rid of Fake Global Rom/Custom MIUI Rom, Fake Unlock
  • How to Unlock Bootloader
  • How to Flash Fastboot Rom with unlocked bootloader
  • How to Install TWRP Recovery and Root Any Xioami device
  • How to Install Google Play in China MIUI Rom
  • Anti Roll Back Issue


Requirments:

  • A Working Brain
  • Patience
  • A Working PC
  • USB Cable for Connecting Phone with PC
  • Internet Connection
Necessary Files:
  • Download Stock rom For Your device from here.
  • Install Usb Drivers Read Here

Watch this video for more information about how to install adb and fastboot in pc




Now Let's Get Started.

Part One - How to Unbrick any Xiaomi Device with Locked Bootloader

At first download all the files mentioned up, Now remove your device's back shell and Find EDL Pins. It should be there somehere upside battery. Check the picture so that you will understand what is EDL Pins.

Now disconnect your battery from motherboard. We don't need the battery connected in EDL Mode. Then short that two EDL Pins with forceps and connect USB Cable with Phone at the same time (make sure the cable is connected with pc and pc is turned on). Check the picture
Now open Device Manager and you'll see something like this

Now open Mi Flash Tool and refresh it, you'll see your device


Now Download Fastboot Rom for your Device from here .

For Downloading Fastboot Rom you've to check these things that if your device is Global Variant then you've to download Latest Global Beta Rom, if your device is Chinese Variant then you've to download Latest China Beta Rom . If you flash Global Rom in Chinese variant it won't boot with locked bootloader. So make sure your device variant and then download rom.

Now extract the Rom (check if the ROM file suffix is '.tgz'. If it is '.gz', please rename it to '.tgz'). Select the Rom Folder in Mi Flash Tool (Make sure there is no space in the rom address if there rename all folders with an underspace (_). The address should like this, C:\Users\Akib\Desktop\whyred_global_images_8.7.12_20180712.0000.00_8.1_global

After doing this check the option 'clean all' at bottom of the tool. Then Flash it. When it will successfully flashed, connect your battery, cover the back shell and power on device. It should boot up. :)

Part Two - How to get rid of Fake Global Rom/Custom MIUI Rom, Fake Unlock

How to check if your device has fake global rom? Go to About Phone Rom Version. If you see the version is something like this xx.xx.xx.xx.xx.xx then your device has fake global rom. Official Rom should like this xx.xx.xx.xx That means in official rom version there is only four section of numbers and three dots. Also do search in Google and check that version is official or fake! In Fake Rom you will not recieve any OTA Updates. Or even you cannot unlock your bootloader, because there is a fake unlock installed. To check go to Developer Options of your device and see Mi Unlock Status, it will see Unlocked, but if you check through fastboot command 'fastboot oem device-info'. it will say locked.


So how to get rid of it? Do what is said in Part One carefully. Now you have official rom installed. You can recieve OTA updates and also unlock your bootloader now!

Part Three How to Unlock Bootloader

Also Read- How to unlock Bootloader

Part Four - How to Flash Fastboot Rom with Unlocked bootloader

You can use any (China/Global:Beta/Stable) Fastboot Rom when your bootloader is unlocked.
  • Download Fastboot Rom from here
  • On device go to bootloader/fastboot mode (press the Power button and Volume - button at the same time to enter bootloader mode).
  • Connect device with PC using USB Cable
  • Open Xiaomi Flash Tool, Extract downloaded Rom. Select Rom folder. Make sure there is no space in the rom address if there rename all folders with an underspace (_). The address should like this, C:\Users\Akib\Desktop\whyred_global_images_8.7.12_20180712.0000.00_8.1_global
  • Refresh, You'll see your device. Select 'Clean all' at bottom then flash. If you select 'Clean all and lock' then your bootloader will be locked again.

Part Five - How to Install TWRP Recovery and Root Your Device


  • Download Latest TWRP Recovery for your device from here. Rename the img file to twrp.img
  • On device go to developer options and enable USB Debugging. Then go to bootloader/fastboot mode (press the Power button and Volume - button at the same time to enter bootloader mode).
  • Connect device with PC using USB Cable.
  • Open NoNameTool Folder (mentioned up)
  • Copy the twrp.img into that folder.
  • Now Press Shift and Right Click Open Command Prompt/ Powershell.
  • Enter following codes

fastboot devices


  • It will show that your device is connected.
  • Now Enter following codes

fastboot flash recovery twrp.img


fastboot boot recovery twrp.img


  • Device will boot into TWRP recovery.
  • If you want to Root your device. Download Latest Magisk from here
  • Copy Magisk.zip into your phone.
  • Boot into TWRP Recovery. Go to Install and Flash Magisk.zip. Then Reboot!
  • Enjoy! Your Device is now rooted.

Part Six - How to install Google Play Store into China MIUI ROM

If you are on China Rom and Can't Find Google Play Store then don't Panic. Google is restricted in China. So there is no Google services. But You can install it manually. (Internet Connection Required, Around 100mb)Simply download this

. Install it. Open it. Tap on chinese words at bottom. Now the download process will run. It will ask for installing Google some apps. Allow them, Install them. After All Done, Reboot Your Device. Enjoy Google Play Store in China Rom.

Part Seven - Anti-RollBack Issue

Don't afraid of Anti-RollBack issue. It is nothing but a simple issue. It means that, you cannot flash older roms on your device.
Suppose, If you are on MIUI 8.7.6, if you flash 8.7.5 it will hard-brick but if you flash 8.7.7 it will flash succesfully. So please make sure what rom version are you using and what version you are going to install.

If you want to go to China Rom from Global Rom. Don't afraid, you can do it. Just Remember the ROM VERSION MUST BE SAME or LATEST. If you are on Global beta 8.7.16 then Flash China beta 8.7.16 or latest.

Be aware! If your device got bricked for Anti-RollBack issue, We have no solution. Go to nearest Mi Service Center! 

By the way, You can do almost everything with Anti-RollBack.

  • You can flash TWRP again
  • You can Root Anti ROMs with Magisk or Disable Encryption
  • You can switch from CN builds to Global builds or vise versa
  • You can switch between all anti 4 builds just fine, like from 8.7.12 to 9.5.19.0 or anything with anti 4
  • You can flash any AOSP/LOS based ROM
  • You can flash anti 4 fastboot ROMs


If there is any other problem you are facing with flashing Roms. You can reply in comments or pm me. I am also available Contact Us Form.

Comments