In this post you’ll find a complete tutorial on how to flash official or localized custom MIUI ROM on Xiaomi Mi 5 device without unlocking the bootloader. We will be using MiFlash Tool for this purpose. Unlike device with unlocked bootloader, the flash process of locked device is make use of EDL mode, not fastboot.

In the latest MIUI ROM’s, Xiaomi has closed the EDL (Download mode). So, to follow this tutorial you must have installed 7.2.13.0 (or previous) ROM. In case you’ve got a newer ROM version installed on your device, then you’ll need to request unlock permission and use another instruction on how to flash Xiaomi Mi5 with unlocked bootloader.

Otherwise, there’s also another method on how to enter EDL mode on Xiaomi Mi5, for this you’ll need to get Engineering Cable (or make it by yourself).

Flashing ROM on locked bootloader Xiaomi Mi 5 with MiFlash

Ok, so first you’ll need to check what ROM version is currently installed on your device. If you’ve got 7.2.13.0 or older, then continue to follow the steps below:

  1. First of all make sure you’ve got all drivers installed on your PC. On Windows 8 & 10 disable driver signature verification (here’s the tutorial).
  2. Install Xiaomi USB Drivers, XiaoMiFlash and ADB drivers and tools. It’s recommended to use the latest version of MiFlash Tool.
  3. Download required fastboot ROM (do not confuse it with the recovery ROM version) from en.miui.com, and unpack downloaded ROM.
  4. Now move the folder with unpacked ROM files to C:\ drive.
  5. Take your device and enable developer options. Go to developer options and enable “USB Debugging” (simply use search on our site if you don’t know how to enable developer options on Xiaomi phones).
  6. Boot in EDL mode. Turn off your device and connect to PC. Open folder with ADB files and open command window here (press “shift” and right mouse click on empty space, select “Open command window here”. Type “adb devices” to check if device is connected. In case everything is ok, we use another command to boot into EDL mode: “adb reboot edl”.
  7. At this point, your phone should reboot into EDL (download) mode.
  8. Let’s flash our Mi5 phone.
  9. Run MiFlash.exe as administrator and press “Refresh” button.
  10. You should some port number, COM3 or COM10 for example.
  11. In case you see a yellow signal, then update installed drivers manually.
  12. Next, in MiFlash press “Select” or “Browse” and locate the folder with unpacked ROM files.
  13. In the bottom select “clean all” or “flash all” option. This will lead to clean ROM installation and deletion of all data.
  14. Press “Flash” to start ROM installation. You should see a progress bar at this point. Flashing takes around 5-7 minutes. If everything was successful you’ll see a “The operation is completed successfully” message on the screen.
  15. That’s it. The phone doesn’t automatically reboots. Disconnect it from PC and start by pressing the “Power” button. First startup will take around 5-7 minutes.

In case you stuck with some errors:

  • You’re using old version of MiFlash, try installing a newer version.
  • Try unpacking ROM again.
  • Drivers aren’t installed.

In case of hardbricked Mi5 device you may try boot into the EDL mode through fastboot:

  1. Boot your Mi5 device in fastboot mode (turn off > press “Power” and “Volume Down” buttons and wait for fastboot logo to appear on the screen).
  2. Connect your device to PC.
  3. Open folder with ADB files and open command window here (press “shift” and right mouse click on empty space, select “Open command window here”. Type “fastboot devices” to check if device is connected.
  4. If everything is ok, you’ll see a unique device number.
  5. Now enter “fastboot oem edl“.
  6. Your device will boot into EDL mode and you can now proceed with MiFlash ROM flashing.