How to set up smartphones and PCs. Informational portal

How to unlock bootloader on android smartphone. official way

Of course, an unlocked bootloader provides a lot of advantages, but recently users have increasingly begun to notice security and performance problems caused by an open system. Interested in how to lock the Xiaomi bootloader back, what is required for this and on which smartphones is it available?

Important! Now in no case can you block the bootloader on the global firmware if the version of your phone is not global! Disobey - get a brick.

NAVIGATION

Is it possible to block the bootloader and why is it necessary

From Redmi Note 3, Redmi Note 3 pro and up, Xiaomi began to automatically block the bootloader, therefore, absolutely all new items can be found on store shelves only in this condition. This is done to close access to the kernel of the operating system, because an inexperienced user can cause significant harm to the device.

Of course, third-party Xiaomi firmware with a locked bootloader is impossible, sometimes you can’t switch to the global version, not to mention custom firmware.

But if you do not see the need for this, block the bootloader that has been unlocked for some reason.

What else can the owner of an active Bootloader face:

  • Reduced security. Such a phone becomes very vulnerable, and attackers can hack it in a couple of clicks. The password blocking the screen is removed instantly, the fingerprint and face recognition are also removed. In the event of a smartphone being stolen, you will have to try hard to find the loss, because Google Lock is turned off.
  • Lack of support for some services. For example, Android Pay, which helps to pay in stores with just a smartphone, often refuses to work, citing insufficient security and, accordingly, an unlocked bootloader. All attempts to return the application to working capacity even with end in failure.
  • Incorrect phone operation, failures in the operating system. Unfortunately, not a single device is insured against lags, even the most improved and expensive novelty. But the bootloader only increases the risk of freezes and emergency reboots.

Blocking the bootloader with data loss (the easiest way) - MiFlash

This is the easiest way, which even an inexperienced user can implement, but there is a significant disadvantage - all your data is lost. Even carried out before the operation sometimes does not save the situation. By locking the bootloader with this method, you will return the smartphone to its original appearance, factory settings, and of course, you will encounter a lack of personal data.

What do we need

The procedure is quick and easy enough, but it is still worth preparing for it.

  • Be sure to download the official firmware, custom categorically do not fit;
  • Not to be missed, of course without access to a personal computer with Windows 7 and above. Also don't forget about drivers. Mostly they are required for the correct synchronization of the PC and smartphone;
  • You need to download a special program Flash(you can learn more about the operation of this tool in the article "");
  • QualitativeUSB-cord(best factory) and clean connectors, checked for debris;
  • Battery charge should not fall below 50-40%. Since during the procedure the battery works much more actively and literally in half an hour it can be completely discharged, and this is very undesirable during system work;
  • No modifications. Be careful! If they are still present on the phone, you can get a "brick". The most at risk models of the Mi line, namely Xiaomi Mi6 and Xiaomi Mi5, so there you will have to lock the bootloader with the utmost care and caution.

Sequencing

As soon as all the above points have been done, we proceed to the beginning of the procedure.

  1. We open the MiFlash program, using the system explorer we indicate the path to the downloaded official firmware. Pay attention to the function clean& lock, it must be active.
  2. Now we connect the smartphone in fastboot mode to the computer using a USB cable.
  3. Click on the caption « Refresh» , and as soon as the name of your model appears - click « start» .
  4. That's all, we have done all the necessary actions. Now we just observe the flashing process in real time. In no case, before the end of the operation, do not do any actions with the smartphone, do not turn it off, do not reboot manually.

Blocking the bootloader without losing data (the hard way) - ADB

Of course, this is the best option, in which the files you need do not disappear, and, in general, you will not notice “innovations” in the operation of the device. Only here more care is required, because the procedure is complex and responsible.

Read important information: this method, unfortunately, does not always work, and even if you do everything right, the risk of turning your smartphone into a “brick” does not disappear anywhere. Also, the phone should not succumb to system changes (superuser mode, custom recovery, etc.). Only on the official "clean" firmware, the chances of successfully locking the bootloader are quite high.

Before you start, we strongly recommend that you check the availability of the necessary drivers on your computer, namely adb and fastboot. By default, they are located on the system drive C in the "adb" folder. If not, download them from w3bsit3-dns.com or XDA and see the instructions for proper installation.

And finally, let's start blocking:

  1. First, put the phone in the mode fastboot, as in the previous version, by holding the power key and the volume rocker down. We hold until a hare in an earflap and the corresponding inscription appears.
  2. We connect the phone to the computer. Don't forget to turn it on first. "Debug byUSB» . It is possible only when the developer mode is activated.
  3. On the PC, go to the folder where the above drivers are installed: adb and fastboot, and click on the free area with the right mouse button. Click "Open command window".
  4. In the window that appears, type in fastboot devices, after which it gives us the phone's ID address.
  5. Not sure how to find out if the bootloader is definitely blocked? The next step is just for that. We enter the command "fastboot oem device info". Several entries appear in English, and if « false» alternates with true, so the bootloader is still unlocked.
  6. The most important step is to write the command directly to the lock fastboot oem lock.
  7. If everything is entered correctly, the next window should contain the word OKAY.
  8. Again, check the status of the bootloader. We only see false? So, it's ready, the operation is completed, and the bootloader is successfully locked.
  9. And the last small action: we reboot the operating system using the command « fastboot reboot» .
    Made. Enjoy stability and security without data loss.

Please note that by locking the Xiaomi bootloader back as described above, after unlocking it twice, you risk getting a "brick". About,

Not so long ago, the Android operating system began to curtail the capabilities of users with an unlocked bootloader. So, for example, Android Pay may refuse to work based on the status of the downloader. Also, an unlocked bootloader is a potential security risk for user data. Learn how to lock bootloader on Android!

Post navigation:

Why lock the Android bootloader

Initially, all smartphones are delivered to store shelves with a locked bootloader, and this is not just. A locked bootloader does not allow you to install potentially dangerous software that can affect the system.

With an unlocked bootloader, all system security measures are meaningless. The lock screen password can be removed with a single command, and the fingerprint lock can also be easily reset. And even Google FRP Lock won't help your smartphone if you lose it. So, if you care about the security of your smartphone and the data on it, you need to know how to lock the bootloader.

How to lock the bootloader on most Android smartphones

On most Android tablets and phones, you can lock the bootloader using the command line, in much the same way as unlocking.

So, what do we need to lock the bootloader:

  • Computer with Windows 7+ operating system
  • Phone drivers installed
  • Full battery charge
  • Reliable USB cable to connect phone to PC
  • Completely stock firmware of the phone, without modifications (if there are modifications, most likely you will get a “brick” at the output!)

After preparing the above, you can proceed to lock the bootloader.

ATTENTION! On some devices, re-locking the bootloader can lead to a factory reset! Make sure all important files and data are backed up!

  • Download and unzip the ADB&Fastboot archive on your computer
  • On your phone, go to and activate "USB Debugging"
  • Connect the phone to the computer (the first time you connect with debugging, the phone will ask you to allow debugging from this PC, confirm it)
  • In the adb folder, right-click with the Shift key pressed, select "Open command window"
  • Enter the adb reboot fastboot command (if the phone just rebooted, the adb reboot bootloader command may work for you)
  • After booting into fastboot mode, type fastboot oem lock command and press Enter
  • Enter fastboot reboot command

Ready! Now you know how to lock the bootloader via the command line!

How to lock Xiaomi bootloader

The meaning of the method is to completely flash the smartphone, with the removal of all data. Using this method, you can block the bootloader of other smartphones, the main thing is to choose the right firmware and instructions.

How to lock Xiaomi bootloader:

  • Download the official firmware for installation via MiFlash
  • Download MiFlash
  • Run MiFlash and specify the path to the downloaded firmware
  • Make sure the Clean&Lock option is enabled at the bottom of the window
  • Connect Xiaomi smartphone in firmware mode to PC
  • Click Refresh and after your device appears in the list, click Start
  • At the end of the firmware, all data will be deleted, and the bootloader will be locked

Ready! Now you know how to lock Xiaomi bootloader!

* Recommended to upload a 720*312 image as the cover image

Article Description

Hello everyone! This topic will be useful for those who want to block the bootloader. It's not a secret for anyone (but for many it's a discovery) that Android Pay works with an NFC module, on stable firmware, without root and with a locked bootloader. You can check the status of the bootloader in the "For Developers" settings, it looks like this: A small digression Unfortunately, most Mi phones in the so-called "official" Russian stores come with an unlocked bootloader. Why is that? No one can give a specific answer. I’ll say from my own experience that I live in China and went to 2 official Xiaomi stores, checked the bootloader on the exposed phones (Mi Mix 1/2, Mi 6, Mi Max2 and some from Note, I don’t remember exactly). And you know what? It's blocked for everyone! And when I asked what condition it was in from the factory, after calling the hotline they said that it was blocked. And it is obvious that in order to unlock it, you need to manipulate the phone. And another small fact, my friend and I ordered phones through an online platform for friends, 3 pieces of Mi 6 and one Note 4x, and later I ordered Mi Mix for myself, and on all phones the bootloader was blocked, I had to unlock it to put the global))) So, if you need to lock the bootloader, there are two options. One with data loss and the other without data loss (But this is not accurate). I'll tell you first about the one without data loss) 1. We block the bootloader without losing data (on some models, the data is erased, it's not clear what it depends on) Before you start, you need to know about some points. First: it does not work on all phones. But it works on most recent phones. And judging by the comments on the forum, it works for a lot of people. Secondly: it works correctly on official firmware, if they have not undergone changes to system files (root access, recovery patch, TWRP, etc.) Otherwise, the command will not work or you will get a bootlap ( Eternal loading). Thirdly: The command does not work on almost all unofficial firmware, get a bootlap (eternal loading). Attention: You do everything at your own peril and risk, backup is required. Let's start! 1. Check if the adb and fastboot drivers are installed on the PC. Usually they lie on the "C" drive in the "adb" folder. If not installed, type in Google or Yandex "how to install adb and fastboot" and follow the instructions.2. We enter the phone into fastboot mode (in the off state, hold down the power button and volume down button at the same time until you see a hare and the inscription fastboot) and connect it to the computer. 3. We go to the folder with adb and fastboot installed (usually in the adb folder on drive C), hold down Shift and right-click on the free space in the folder and select "Open command window" or who has Power Shell, respectively, "Open via Power Shell "four. We begin to register: fastboot devices After that, it should give out the phone ID5. Next, we check the status of the bootloader with the command: fastboot oem device-info If the bootloader is unlocked, the answer will be: 6. Next, we write a command to lock: fastboot oem lock And if everything is fine, we get OKAY7. We check the status of the bootloader again with the command: fastboot oem device-info If everything went correctly, it will be false on all counts: Reboot into the system with the command: fastboot reboot That's it, you're done!2. We block the bootloader with data loss. This method erases all data from the phone since this is a regular flashing with the choice of the bootloader lock function, so before doing it, check that everything is synchronized (contacts, calendar, notes, etc.; applications are backed up and thrown on the computer ; photo, music, important documents on your computer).1. Download and install the program Mi Flash2. Download your firmware from the official site (the firmware must be for fastboot) and throw it into a new folder on the "C" drive (the folder name should not have Russian letters and symbols)3. Enter the phone in fastboot mode (it says how at the top) and connect the phone to the computer.4. Open the program, press select or open (depending on the version of the program) and select the folder in which the firmware files are located, this is very important, because as I remember the firmware is in a folder that is in another folder.5. Click refresh, phone information should be displayed6. The most important step that should not be missed, otherwise you did everything in vain;) select "clean all and lock" at the bottom of the program7. Press flash and wait for the phone to load. That's all. Next, you are waiting for the first setup and recovery from backups. That's all, good luck everyone! Leave questions in the comments!

Owners of Android smartphones and tablets are often looking for ways to unlock the bootloader (bootloader). However, now the reverse trend is gaining momentum, people want to lock the bootloader to restore the warranty. In fact, the problem of unlocking / locking the bootloader is relevant, for the most part, for smartphones and tablets from the following manufacturers: Xiaomi, HTC, Sony, and so on.

What problems

With an unlocked bootloader, there may be problems not only with the warranty, but also with access to some services. The story is that Google a few months ago released a patch for the SafetyNet protection system, which checks the status of the bootloader when the application starts. If the “test” is positive (for unlocking), then access, for example, to Android Pay, may be disabled.

How to block bootloader

So, in order to lock the bootloader, you need to execute some fastboot commands, they will reboot the bootloader into locked mode.


  • Set up ADB and Fastboot on your PC.
  • Connect the device to the PC via USB and open a command window on the PC.
  • Run the following command to boot the device in bootloader mode:

    adb reboot bootloader

  • Now run any command to reboot the bootloader. You do not need to use all of the options below, just one that works for your device is enough. Did you find her? Go to the next step

    fastboot oem lock
    fastboot flash lock
    fastboot oem relock

  • Once the bootloader is locked. Restart your device with the following command:

Bootloader (Hboot) is a program that controls the kernel of your device's operating system so that it boots normally. And this applies not only to Android, but also to other devices with an OS, such as a PC, laptop, and even an old push-button phone. In addition, it is the bootloader that gives permission to install any programs and firmware. For this reason, users are interested in factory unlocking the bootloader on an android phone.

Hboot is activated when the device is turned on, and is an analogue of Bios in a computer. It prepares all the data for the kernel, loads it into memory, after which the system starts directly. If its integrity is broken or something interferes, thanks to the bootloader, you can get into recovery mode to clear the data, or reset to factory settings. To do this, before turning on the device, hold down the power and volume down keys, and do not release them until the boot time (in some cases, the button combination may differ).

Why is the bootloader locked

Manufacturers block for two reasons:

1. Oblige the owner to use the operating system that was developed for his device.

2. Security. Many smartphones and tablets are sold through the Internet or retail network. In both cases, the seller or intermediary may, at its discretion, add software of an advertising or malicious nature, which should not be. For the same reason, Xiaomi began to block the bootloader of devices released after 2016, due to numerous complaints about the presence of viruses in their firmware (which were not originally there).

Benefits of an unlocked bootloader

An unlocked bootloader opens up exactly the same opportunities for the user as on a PC, namely:

  1. Flash any operating system (available for your device).
  2. Installation of individual modules, OS kernels, applications, patches.
  3. Freely migrate between stock roms, especially if they are based on a different version of Android.
  4. Easily create backup copies of the current OS and / or applications, as well as restore them without using a PC.
  5. Use Dual-Boot and install two or more operating systems, both in internal memory and on an external SD card.
  6. Wider recovery options in case of unsuccessful firmware.

And this is not the whole list of features after the factory unlock android.

How to unlock

Each device has its own version of the bootloader, which means that the unlock method will differ depending on the model and manufacturer. When applying, the company itself can remove the block (especially if you are an Android developer), but most often, this happens by hacking previously found vulnerabilities in the system.

Risks and consequences

Unauthorized unlocking of the bootloader will void your warranty. In addition, your device becomes less secure and vulnerable to hacker attacks. An open bootloader allows you to bypass set passwords, access personal information, or erase everything and install another firmware.


Conclusion

You should not worry much about problems with the bootloader, especially when it comes to personal information. In found or stolen devices, data is most often erased, and rarely anyone will restore something. An open bootloader is more needed for advanced users who know what to do with it, regularly flash something and experiment.

Leave your questions in the comments to the article below - we will try to answer.

Was the article helpful to you?

Rate - support the project!

Top Related Articles