How to Unlock the Bootloader and flash Xiaomi Phones using Fastboot Mode

Posted on

WeChat Image_20190207112856.png (175.03 KB, Downloads: 101)

Download

2019-02-07 19:29:22 Upload

We decided to come up with an Official Flashing Guide that can be helpful to anyone wondering on how to flash Xiaomi Phones using Fastboot Mode, and therefore a Fastboot Rom (.tgz).

First of all, let me share with you some useful information related to Bootloader and Fastboot.

BOOTLOADER

The bootloader is the component in the operating system of a smartphone (or a computer, for that matter) that is, in general terms, instructs the operating system (Android, iOS, Linux, Windows, etc) kernel to boot normally.

As you may know, all the latest Xiaomi smartphones now come with a locked bootloader.
But, what does it mean?

If you are able to modify the bootloader of your device, then you are able to load whatever (supported) operating system you want. That means “unlocked bootloader”.

A “locked bootloader”, which is intentionally LOCKED by the manufacturer or the cell phone operator, would not allow you to modify that bootloader. Android devices come with locked bootloaders for a reason. It’s not just that carriers and manufacturers want to own your hardware and prevent you from installing custom ROMS on it – although they do – there are good security reasons.

A device with a locked bootloader will only boot the operating system currently on it. You can’t install a custom operating system – the bootloader will refuse to load it.

FASTBOOT MODE

Fastboot is a tool/protocol for writing data directly to your phone’s flash memory. In practical use, it is used to flash images such as recoveries, bootloaders, and kernels to your Android device.
On Xiaomi devices, you can access to Fastboot mode following these steps:

  • Turn OFF your Xiaomi Phone.
  • Press and hold the Volume Down and Power button.
  • The phone will now boot into Fastboot mode.
  • Once you see your Fastboot screen, you can now connect your phone to your PC and access it via the Fastboot tool.

XiaoMiFlash

To unlock the bootloader on Xiaomi devices and flash Fastboot ROMS via Fastboot Mode, you will need to use Xiaomi Official flashing tool “XiaoMiFlash”. This tool works only on unlocked bootloader devices.

I have divided this thread into two guides, one is for unlocking the bootloader and flashing a Fastboot ROM, the other one is for flashing a Fastboot ROM on already unlocked devices.

GUIDE 1 – Flashing Guide for Locked Bootloader

Note: A Windows PC/laptop will be needed for the following steps. Make sure that your device is fully charged or has enough power (70% Battery) for this process. This guide will help you update your device to the latest MIUI ROM version. All user data will be purged in this process. Please back up your data and think twice before proceeding. Follow these procedures at your own risk.

1) BOOTLOADER UNLOCK PERMISSION

The first thing to do is to unlock the Fastboot of your device. In order to do that, you will need permissions. Click here to apply to unlock your device. Remember, after you unlock the device, it will become less secure. Your personal data might be leaked or lost.

b.png (86.76 KB, Downloads: 503)

Download

2019-02-06 21:15:59 Upload

Fill the application form with your forum nickname. You will get an SMS notification when you got the permission to unlock.
You will then be able to download the Mi Unlock app on your PC.
Please note, time to get permission to unlock may vary.

a.png (175.1 KB, Downloads: 193)

Download

2019-02-06 21:15:57 Upload

2) NECESSARY FILES:

Once you received the unlock permission you will need to download 3 files:

  • Xiaomi Flashing Tool Miflash v2018.5.28.0 –  Link
  • Mi Unlock to unlock your device Bootloader – Link
  • Fastboot ROM (.tgz) for your device – Link

3) ROM File:

Make sure to download the right Fastboot ROM (.tgz). Once you downloaded it, decompress it and move its content into C: folder on your computer.

4) DEVICE IN FASTBOOT MODE:

Now we need to boot your device in Fastboot Mode, as already explained above, follow these steps:

  • Turn OFF your Xiaomi Phone.
  • Press and hold the Volume Down and Power button.
  • The phone will now boot into Fastboot mode.
  • Once you see your Fastboot screen, you can now connect your phone to your PC and access it via the Fastboot tool.

C.jpg (25.98 KB, Downloads: 78)

Download

2019-02-06 21:15:55 Upload



5) Mi Unlock:

Now that we are in Fastboot Mode we can unlock the bootloader of the device. To do so we will need Mi Unlock, that you downloaded in Step 2. Remember?
Open and run it.

1.PNG (42.84 KB, Downloads: 146)

Download

2019-02-06 21:15:53 Upload

Agree to the disclaimer if you intend to proceed.

2.PNG (25.5 KB, Downloads: 84)

Download

2019-02-06 21:15:51 Upload

Log in with your Mi Account and Password

3.jpg (82.53 KB, Downloads: 61)

Download

2019-02-06 21:15:48 Upload

Let Mi Unlock check if you Mi Account has permissions.

4.jpg (105.54 KB, Downloads: 60)

Download

2019-02-06 21:15:47 Upload

Phone Connected and ready to unlock. Click “Unlock”.

5.jpg (105.09 KB, Downloads: 55)

Download

2019-02-06 21:15:46 Upload

Click “Unlock anyway”

6 (2).jpg (49.2 KB, Downloads: 62)

Download

2019-02-06 21:15:45 Upload

7 (2).jpg (49.34 KB, Downloads: 61)

Download

2019-02-06 21:15:44 Upload

8.jpg (66.2 KB, Downloads: 58)

Download

2019-02-06 21:15:44 Upload

You just successfully unlocked your device.

6) FLASHING:

You don’t need to reboot your device after the unlock. However, if you reboot your device, make sure you then follow Step 4 again to go into Fastboot Mode.

Decompress Xiaomi Flashing Tool Miflash v2018.5.28.0 downloaded in Step 2, and double click on it to install it (if there is security warning, select ‘Run’).
After the installation is completed, open MiFlash.exe

This is how the app looks like:

qq.PNG (16.85 KB, Downloads: 86)

Download

2019-02-06 21:15:43 Upload

Now you need to copy the directory of the Fastboot ROM from Step 3 and paste it in the top address bar as in the picture below. Alternatively, you can click select and browse the Fastboot ROM, make sure you select all images.

ww.PNG (18.43 KB, Downloads: 58)

Download

2019-02-06 21:15:42 Upload

As your device should be in Fastboot Mode and connected to the computer already, click Refresh to refresh the app and detect the device.
If your device is correctly set in Fastboot Mode, with bootloader unlocked and connected to the computer, MiFlash should automatically recognise the device as in the image below.
If this doesn’t happen, go back and make sure you followed all the steps correctly.

ee.PNG (19.55 KB, Downloads: 63)

Download

2019-02-06 21:15:41 Upload

At the bottom of the window, select the type of flash option that you prefer.

Clean all will erase all the data present in your phone leaving your bootloader unlocked.

Save user data will erase all the data present in your phone without wiping the data partition, leaving your bootloader unlocked.

Clean all and lock will erase all the data present in your phone and lock your bootloader.


Now click “Flash” to Flash the ROM file into the device.

rr.PNG (21.85 KB, Downloads: 61)

Download

2019-02-06 21:15:41 Upload

jnm.PNG (21.13 KB, Downloads: 53)

Download

2019-02-06 21:15:39 Upload

gh.PNG (20.96 KB, Downloads: 52)

Download

2019-02-06 21:15:39 Upload

Your device will now automatically reboot running the new ROM.

GUIDE 2 – Flashing Guide for Unlocked Bootloader

Note: A Windows PC/laptop will be needed for the following steps. Make sure that your device is fully charged or has enough power (70% Battery) for this process. This guide will help you update your device to the latest MIUI ROM version. All user data will be purged in this process. Please back up your data and think twice before proceeding. Follow these procedures at your own risk.

1) NECESSARY FILES

You will need to download 2 files only:

  • Xiaomi Flashing Tool Miflash v2018.5.28.0 –  Link
  • Fastboot ROM (.tgz) for your device – Link

2) ROM File

Make sure to download the right Fastboot ROM (.tgz). Once you downloaded it, decompress it and move its content into C: folder on your computer.

3) DEVICE IN FASTBOOT MODE

Now we need to boot your device in Fastboot Mode, as already explained above, follow these steps:

  • Turn OFF your Xiaomi Phone.
  • Press and hold the Volume Down and Power button.
  • The phone will now boot into Fastboot mode.
  • Once you see your Fastboot screen, you can now connect your phone to your PC and access to it via the Fastboot tool.

C2.jpg (25.98 KB, Downloads: 57)

Download

2019-02-07 19:35:17 Upload

4) FLASHING

Decompress Xiaomi Flashing Tool Miflash v2018.5.28.0 downloaded in Step1, and double click on it to install it (if there is security warning, select ‘Run’).
After the installation is completed, open MiFlash.exe

This is how the app looks like:

qq2.PNG (16.85 KB, Downloads: 58)

Download

2019-02-07 19:35:16 Upload

Now you need to copy the directory of the Fastboot ROM from Step 2 and paste it in the top address bar as in the picture below. Alternatively, you can click select and browse the Fastboot ROM, make sure you select all images.

ww2.PNG (18.43 KB, Downloads: 57)

Download

2019-02-07 19:35:15 Upload

As your device should be in Fastboot Mode and connected to the computer already, click Refresh to refresh the app and detect the device.
If your device is correctly set in Fastboot Mode, with bootloader unlocked and connected to the computer, MiFlash should automatically recognise the device as in the image below.
If this doesn’t happen, go back and make sure you followed all the steps correctly.

ee2.PNG (19.55 KB, Downloads: 53)

Download

2019-02-07 19:35:14 Upload

At the bottom of the window, select the type of flash option that you prefer.

Clean all will erase all the data present in your phone leaving your bootloader unlocked.

Save user data will erase all the data present in your phone without wiping the data partition, leaving your bootloader unlocked.

Clean all and lock will erase all the data present in your phone and lock your bootloader.

Now click “Flash” to Flash the ROM file into the device.

rr2.PNG (21.85 KB, Downloads: 57)

Download

2019-02-07 19:35:13 Upload

jnm2.PNG (21.13 KB, Downloads: 51)

Download

2019-02-07 19:35:13 Upload

gh2.PNG (20.96 KB, Downloads: 50)

Download

2019-02-07 19:35:12 Upload

Your device will now automatically reboot running the new ROM.

I hope you will find this guide useful.

Source:
All credits go to msalauddins, en.miui BD Community Moderator who wrote this fantastic guide.

https://c.mi.com/thread-1815303-1-0.html