Contacts

How to unlock Bootloader and install custom Recovery (instructions). Download and install ADB, drivers and Fastboot Fastboot does not open

Not every owner of a mobile device in the form of a smartphone or tablet running an Android series operating system knows that any version of the OS has such a thing as Bootloader. What it is will now be discussed. Based on an understanding of the very essence of the issue, it will be possible to find out what operations can be performed when unlocking it.

Bootloader: what is it?

Let's start, so to speak, with the basics. The bootloader for Android systems is practically no different from what is available on any computer terminal, be it a PC or a Mac. Speaking in simple language Bootloader is a built-in boot tool

If we take as an example computer terminals with several installed operating systems (say, Windows and Linux), the bootloader, after turning on the stationary unit or laptop, offers the user a choice of logging in, and after confirmation loads one or another OS.

OS boot principles

Just like in stationary systems, in mobile devices it accesses initialization files in the same way as, for example, Windows does when loading parameters from the boot.ini file.

If you pay attention to exactly this data, it is not difficult to conclude that in Android systems you can easily change not only the boot method, but also the loaded OS, either manually or automatic mode. However, few people know that this tool itself only loads the system that is written for a specific model of smartphone or tablet.

Bootloader: how to unlock and why is it needed?

As for the possibilities that unlocking the bootloader suggests, the matter here is not limited to data recovery.

It is believed that in this case the user gains access to the system core, which is not possible by default. How to describe Bootloader in such a situation? What this is will become clear if you look at the lack of so-called superuser rights. It turns out that after the blocking is lifted they are not needed at any level at all. Otherwise, you often have to install special firmware and applications. If, to put it mildly, it is “clumsy”, then the whole system can fail.

Any manufacturer of mobile equipment provides for working with a component such as Bootloader. How to unlock it? This is usually done using special utilities, installed on a PC when connected to a mobile device via a USB interface. Please note that superuser rights are not required in this case.

For most devices, including, for example, Sony and HTC gadgets, the use of the Adb Run utility is implied, and for Sony you will have to additionally use special Sony Fastboot drivers, and even refer to the special Unlocker section on the official website. As you can see, the procedure, although feasible, is quite complicated.

Data recovery

On the other hand, in its standard mode of operation, restoring Bootloader after resetting the settings to factory settings is quite simple. This doesn't even require a hard reset.

You just need to reset the settings on the gadget itself, and after rebooting, the system will offer to choose an option: either use new settings on the device, or restore settings, programs and files, using account Google services. In this case you will have to enter the address Gmail with a password, and also connect to the Internet, for example, with an active Wi-Fi connection.

Installing another operating system

If we talk about the possibility of installing another OS, this issue is quite complicated, although we can solve it. The fact is that some manufacturers claim that after Android there will be no other system for the gadget. Purely a publicity stunt designed to advertise the installed system.

But the Chinese have already proven with their “left” HTC devices that both Android and Android can easily coexist on one device. Windows Phone. Moreover, such models are supplied in most cases with an already unlocked Bootloader. What is it in this case? This is a tool that allows you not only to select a bootable OS, but also to install any other one by changing parameters at the system level.

In other words, the user can even do without any firmware or additional programs to optimize the operation of the installed operating system. Moreover! This does not even require specialized utilities such as optimizers, of which there are so many today that the user himself does not understand what to choose from this huge number of programs and applications.

What should you pay attention to separately?

But when it comes to custom firmware, which have become quite popular among many owners of mobile devices, you need to be very careful with them. Of course, smart firmware or an OS update will not do any harm; on the contrary, it will only improve the operation of the device, but when you install something unofficial and not yet tested (like computer beta versions), expect trouble. Then certainly no bootloader will help.

By the way, few realize that such versions can put too much stress on the hardware components, which, in turn, can lead to their complete inoperability. But changing the processor in the same smartphone is far from the easiest thing.

In addition, unlocking the bootloader in officially released branded gadgets implies automatic loss of warranty and the possibility of free service. So you will have to think a hundred times before performing such actions and operations.

Finally, it remains to add that the issue of installing another OS on an Android device is also, in general, quite controversial. Yes, of course, the system will work, no matter what the manufacturer says. But how it will work is another question, especially since most users usually install some kind of lightweight version that has unknown source origin. But in vain. Here, as they say, you can screw up so much that you won’t end up with a sin. And in case of such changes, according to current international standards, the manufacturer itself does not bear any responsibility for the correct operation of the mobile device. Therefore, the decision on expediency must be made by the owner of the gadget himself. But it’s better not to joke with such things.

Most of the articles in the X-Mobile section are devoted to hacks and tweaks that require obtaining root rights, modifying the firmware, or replacing it with a custom one. However, not every reader is ready to subject their smartphone to such operations, fearing that they can turn the device into a brick or lead to instability in operation. Today I will debunk these myths and show that even in the most stalemate situation, bringing a smartphone back to life is not so difficult.

Destroying myths

Let's talk about what it really means to “turn a smartphone into a brick” and what other pitfalls can await the user on the way to changing the system and installing custom firmware. What glitches can be caught in this case and is it possible to kill a smartphone by reflashing it incorrectly? Will you lose the warranty forever or can the smartphone be returned to its previous condition? Can custom firmware really fail a smartphone owner at the most inopportune moment and are they worth it?

Myth 1. Incorrect flashing can kill a smartphone

A fall from the fifth floor can kill a smartphone, but not flashing it. The main problem that anyone who wants to reflash a smartphone faces is that during the installation of the firmware, a failure may occur, which will lead to its inoperability, and the smartphone will actually turn into a brick.

All this is true, but only on paper. To understand why, it’s enough to understand how the process of flashing a smartphone works and what system components are used. To be able to install third-party firmware on a smartphone, you need to unlock the bootloader (not in all cases), get root and install a custom recovery console (ClockworkMod or TWRP), capable of installing firmware with any digital signature.

The recovery console is stored in a separate partition of the internal NAND memory and is in no way connected with the installed operating system. After installing a modified version of the console, it will be possible to flash custom firmware or even another OS (Firefox OS, for example). If a failure occurs during the installation of the firmware, the smartphone will not be able to boot it, but the recovery console will remain in place, and all you need to do is boot into recovery again and reinstall the firmware.

In addition, any custom recovery console contains a backup/restore function, which allows you to make a backup copy of the main firmware and restore it unchanged (with all applications, settings and data) in the event that something goes wrong. In fact, the smartphone can be returned to its original state.


You may ask: what happens if the installation of the Recovery Console itself fails? Nothing, in this case the situation will be the opposite, when the operating system itself will remain in place, and the console will be lost. To deal with it, you just need to re-flash recovery directly from Android.

Hypothetically, one can imagine a situation where both the firmware and the recovery console are killed (although this is quite difficult to do), but even in this case, the primary bootloader, flashed into the permanent memory of the smartphone, will always remain in place.

Conclusion: it is impossible to kill a smartphone by installing third-party firmware through a custom recovery console. Either the recovery or the primary bootloader will always remain in place.

Myth 2. Custom firmware is unreliable

Firmware is different from firmware. In the vastness world wide web You can find a huge number of Android builds for every taste and color, and most of them are really slag, which can lead to instability in the operation of the smartphone and loss of some functionality. Therefore, the first thing to remember is that you should only deal with serious custom firmware developed by large teams of experienced developers. First of all, these are CyanogenMod, Paranoid Android, AOKP, OmniROM and MIUI.

Second. There are two types of firmware: officially supported and ported by third-party developers. The same CyanogenMod, for example, has an official version for the Nexus 4 smartphone, but does not have one for the Motorola Defy. But for Defy there is an unofficial port of CyanogenMod 11 from a developer with the nickname Quarx. The difference between them is that the CyanogenMod team is responsible for the support and proper operation of the first, while the second is personally handled by Quarx. Official firmware versions are usually fully functional, but the correct operation of the latter depends on the third-party developer.

Well, third. There are stable and development versions of the firmware. Stable versions of CyanogenMod have the index M (CyanogenMod 11.0 M7, for example). This firmware version usually does not contain bugs. Development versions (in the case of CyanogenMod these are daily nightly builds) may contain bugs and are therefore not recommended for everyday use.

Conclusion: if you install a stable official version of the “normal” firmware on your smartphone, the risk of encountering bugs is minimal. Everything else is for experimenters.

Myth 3. Software that requires root rights can brick a smartphone

In theory, an application with root rights can do anything with the smartphone's firmware, including erasing it completely. Therefore, you need to be extremely careful with such software. The software we talk about on the pages of the magazine is completely safe and tested in our own skin. In addition, for all the time I have been using smartphones on Android (and this is starting from version 1.5), I never I haven’t encountered a situation where software with root support killed a smartphone.

Software distributed through Google Play, usually fully corresponds to the stated characteristics, and if it led to a brick or left a backdoor in the depths of the smartphone, it would not last even a week in the store. In any case, you need to follow the “trust but verify” rule and carefully read the instructions for using root applications.

Myth 4. Root rights make a smartphone vulnerable to viruses

What makes a smartphone vulnerable to viruses is not root rights, but the bugs used to obtain them. Rooting tools and viruses can exploit the same Android vulnerabilities to gain root privileges, so the fact that the device is rooted does not change anything. A well-written virus will not ask for permissions in a standard way, giving away his presence, he will instead take advantage of the same vulnerability to obtain them covertly.

Moreover, having root, you get the opportunity to install the latest Android version(in the form of custom firmware), in which these bugs have already been fixed. Also, do not forget that most custom firmware allows you to disable root or create white lists of applications that can use these rights.

Myth 5. A rooted smartphone may fail

Software designed to obtain root does four simple things: launches an exploit that allows you to gain root rights in the system, mounts the /system partition in write mode, copies the su binary required to obtain root rights in the future to the /system/xbin directory, and installs the SuperSU or SuperUser application, which will take control whenever any application requests root privileges using su.

None of these steps can crash or kill the smartphone. The only thing that can happen is that the exploit will cause a segmentation fault and the smartphone will reboot, after which it will continue to work normally.


Myth 6. By getting root and installing custom firmware, I will lose the warranty

The guarantee is lost not from the fact of obtaining root, but due to its detection by the service center. Most devices can be unrooted using the Universal Unroot application or by reinstalling the stock firmware using the official application from the manufacturer.

There are, however, two exceptions to this rule. The first is the Knox system, pre-installed on new smartphones and samsung tablets, such as Galaxy S4, S5, Note 3 and Note 10.1. Knox provides an increased level of Android security by responding to any firmware modifications and installation of third-party kernels and firmware. If the user performs these actions, the system sets a trigger that confirms the fact of the modification. The trigger is implemented in hardware (eFuse chip), so it cannot be reset to its initial position. On the other hand, it is not entirely clear whether it will refuse service center on this basis, repair the device. Second: the eFuse chip is installed on some other devices (for example, smartphones from LG), and it also allows you to accurately determine whether the smartphone has been rooted or flashed.

If we talk about custom firmware, everything is more complicated. Typically, the flashing operation requires unlocking the bootloader, and this can be done either using special exploits or using the smartphone manufacturer's web service. In any case, the unlocked bootloader will definitely indicate that the smartphone did not belong to a blonde.

On some smartphones, it is possible to lock the bootloader back, but you should learn about this separately, and also keep in mind that the newly locked bootloader will most likely receive the status Re-locked, and not Locked, as it was originally (this happens on HTC smartphones, For example). The only exceptions here are smartphones and tablets of the Nexus line, the bootloader of which can be locked and unlocked in three clicks without any dancing with a tambourine, and no one will find fault with anything.

INFO

On Linux, ADB and Fastboot can be installed separately from the Android SDK. On Ubuntu: sudo apt-get install android-tools-fastboot. On Fedora: sudo yum install android-tools.

To prevent Knox from interfering with root applications, you can disable it using the following command from the terminal: su pm disable com.sec.knox.seandroid.

conclusions

Getting root and flashing a smartphone are absolutely safe operations that cannot brick the smartphone for purely technical reasons. The only exception is an attempt to hack the bootloader in order to unlock it. In this case, the eFuse chip (if the smartphone has one) may work and block the ability to turn on the smartphone.

Fortunately, today smartphone manufacturers either prefer not to block the ability to turn on a smartphone with a hacked bootloader (by setting a trigger indicating the fact of such an action, as Knox does), or implement a special web service that allows you to painlessly unlock the bootloader with loss of warranty on the smartphone. which saves users from having to risk breaking the bootloader.

Problems that may arise during flashing

So, now let's talk about what problems can arise when getting root and flashing and how to deal with them.

Scenario one: after an unsuccessful flashing, the smartphone stopped booting

Unsuccessful flashing can be caused by several factors: the battery died and the firmware was only half filled; the firmware turned out to be faulty or intended for a different smartphone model. In the end, there was simply not enough space on the smartphone, which can happen when trying to install the latest version of Android on a smartphone that is three or four years old.

Outwardly, all these problems usually manifest themselves either in endless resets of the smartphone to the initial manufacturer logo, or in the so-called boot loop, when the boot animation plays on the screen for more than five to ten minutes. There may also be problems with the screen (multi-colored ripples) and a non-working touch screen, which also prevent the use of the smartphone.

In all these cases, it is enough to do one simple thing: turn off the smartphone by long pressing the power button, then turn it on while holding down the volume down button (some smartphones use a different combination), and after you get into recovery, reinstall the firmware (Install zip from sdcard - > Chooze zip from sdcard) or restore backup ( Backup and restore -> Restore). Everything is easy and simple.

Scenario two: the firmware works, but recovery is not available

This can happen after a failed installation or update of the Recovery Console. The problem is that after rebooting the smartphone and turning it on while holding down the volume down button, a black screen appears, after which the smartphone either resets or freezes.

Solving this problem is not easy, but very simple. You can install the recovery console on the vast majority of smartphones using the TWRP Manager, ROM Manager or ROM Installer applications. They themselves determine the smartphone model, download and flash the required recovery, without requiring a reboot. If you can’t restore the console with their help, just find instructions on the Internet for installing recovery on your device.

Scenario three: neither firmware nor recovery is available

To be honest, it is difficult for me to imagine such a scenario, but, as practice confirms, it is quite real. There are two ways to get out of this situation: use fastboot to upload recovery to your smartphone, or use a tool from the manufacturer to install stock firmware. We'll look at the second method in more detail in the next section, and I'll talk about fastboot here.

Fastboot is a tool that works directly with the device’s primary bootloader and allows you to upload firmware to your smartphone, recovery, and unlock the bootloader (in Nexus devices). Fastboot support is available in many smartphones and tablets, but some manufacturers block the ability to use it. So you will have to consult the Internet about its availability.

To access fastboot, you will need drivers and the Android SDK. When they are installed, open the command line, go to the SDK installation directory, then to the platform-tools directory, turn off the smartphone, turn it on with the volume buttons pressed (both) and connect it with via USB-cable to PC. Next, you need to find the recovery image in .img format for your device and run the command:

$ fastboot flash recovery image.img

Or even force the smartphone to boot recovery without actually installing it:

$ fastboot boot image.img

In the same way you can flash official firmware update:

$ fastboot update update-file.zip

You can find a recovery suitable for your device either on the TWRP website or in the XDA-Developers and 4PDA forums.

We return the smartphone to its original state

In this section, I will talk about ways to return your smartphone to clean stock, no matter what state it is in. These instructions can be used both to unbrick your smartphone and to remove traces of rooting and flashing. Unfortunately, I can’t talk about all possible models, so I’ll focus on the four most popular flagships: Nexus 5 (I call this sample the control one), Galaxy S5, LG G2 and Sony Xperia Z2.

Nexus 5 and other Google phones

Restoring Nexus devices to their original state is easier than any other smartphone or tablet. In fact, it is so simple that there is not even anything to talk about. In fact, all you need to do is install the ADB/fastboot drivers (on Linux you don’t even need them), download the archive with the firmware and run the script. The whole operation looks like this step by step:

  1. from here.
  2. Download and install Android SDK.
  3. Download the archive with the firmware for the desired device from the Google website.
  4. Turn off the device, turn it on with the volume buttons pressed (both) and connect using a USB cable.
  5. Unpack the archive with the firmware and run the flash-all.bat (Windows) or flash-all.sh (Linux) script and wait for the operation to complete.
  6. We launch the command line, go to the directory with the Android SDK, then platfrom-tools and execute the fastboot oem lock command to lock the bootloader.

For those who are interested in what the script does, here is a list of commands:

Fastboot flash bootloader bootloader-DEVICE-NAME-VERSION.img fastboot reboot-bootloader fastboot flash radio radio-DEVICE-NAME-VERSION.img fastboot reboot-bootloader fastboot flash system system.img fastboot reboot-bootloader fastboot flash userdata userdata.img fastboot flash recovery recovery.img fastboot flash boot boot.img fastboot erase cache fastboot flash cache cache.img

Galaxy S5

Co Galaxy smartphone S5 is a little more complicated, but overall quite simple. This time you will need the Samsung Odin application, which will be used to flash the smartphone’s firmware. Sequencing:

  1. Download and install latest version Samsung USB drivers from here.
  2. Download and install the latest version of Odin from here.
  3. Go to the website samfirmware.com, enter the SM-G900F model in the search, find the firmware marked Russia, download and unpack.
  4. Turn off the smartphone and turn it on with the Volume Down and Home buttons pressed, wait five seconds until a warning message appears.
  5. Press the volume up button to put the smartphone into Odin mode.
  6. We connect the smartphone using a USB cable.
  7. Launch Odin, press the PDA button and select the file with the extension tar.md5 inside the directory with the unpacked firmware.
  8. Click the Start button in Odin and wait until the firmware process is completed.

As I already said, this operation will return the smartphone to its original state, but will not reset the trigger, installed by the system Knox (if it was in the standard firmware). Therefore, the service center may refuse to repair.

LG G2

Restoring the LG G2 to factory condition will also not cause special problems. The number of steps in this process is somewhat larger, but they themselves do not require special preparation and knowledge. So, what to do to return the G2 to factory firmware:

  1. Download and install ADB Driver Installer from here.
  2. Download official firmware(Europe Open 32G or Europe Open) from here.
  3. Download and install LG Mobile Support Tool, as well as FlashTool (goo.gl/NE26IQ).
  4. Turn off the smartphone, hold down the volume up button and insert the USB cable.
  5. Expand the FlashTool archive and run the UpTestEX.exe file.
  6. In the window that opens, select Select Type -> 3GQCT, Phone Mode -> DIAG, in the Select KDZ file option select the firmware downloaded in the second step.
  7. Click the CSE Flash button at the bottom of the screen.
  8. In the window that opens, click Start.
  9. In the next window, select the country and language and click Ok.
  10. We wait for the firmware to finish, and then turn off and turn on the smartphone.

This is all. But keep in mind that, as in the case of Samsung, the smartphone will still have Rooted status, and this cannot be fixed.

Sony Xperia Z2

Now about how to return to factory condition Sony smartphone Xperia Z2. As in the previous two cases, this will require stock firmware and the official utility for firmware. You launch the utility on your PC, connect your smartphone using a USB cable and start the update process. Step by step it all looks like this:

  1. Download and install ADB Driver Installer from here.
  2. Reset your smartphone to factory settings.
  3. Download and install Flash Tool from the official Sony website and latest firmware from here.
  4. Copy the firmware file to the C:/Flashtool/Firmwares directory.
  5. Turn off the smartphone and turn it on while holding down the Volume Down and Home keys.
  6. We connect the smartphone to the PC using a USB cable and launch the Flash Tool.
  7. Click the button with the lightning icon in the Flash Tool. In the window that opens, select Flashmode, double-click on the firmware in the list that opens.

WARNING

In many smartphones, an unlocked bootloader will not allow an over-the-air update.

In 90% of cases, unlocking the bootloader will entail deleting all data from the smartphone, including the memory card.

conclusions

Flashing a smartphone, and even more so gaining root access, is not at all such a scary and dangerous operation as it may seem at first glance. If you do everything correctly and do not resort to tools that unlock the smartphone’s bootloader, bypassing the manufacturer’s tools, you will not be able to brick your smartphone. Yes, in some cases you will have to tinker to get everything back in place, but what is better - to use a locked smartphone that does not allow you to do even half of the things that it is capable of, or to gain complete control over the device? In the end, reinstalling Windows on PC it doesn't scare anyone.

Unlocking the bootloader on your smartphone is the first step to speed it up and install custom firmware. And, contrary to popular belief, this feature is supported on most devices. Below is the official method to unlock the bootloader operating system.

Not every phone will allow you to do this.

There are two types of phones in this world: Those that allow you to unlock the bootloader and those that do not.

The ability to unlock the bootloader depends on your smartphone manufacturer, model, and even your operator. All Nexus smartphones allow you to unlock the bootloader, and many phones from Motorola and HTC will allow you to unlock the bootloader in the same way as on the Nexus.

Other smartphones, as well as operators, do not provide the ability to unlock the bootloader in an official way. In this case, you will have to wait until the developers find vulnerabilities with which you can get root rights and download custom firmware to your phone. If you have such a smartphone, then, alas, this article will not help you.

The best way to find out which category your smartphone belongs to is to look at a specialized website. If you have HTC smartphone or Motorola, then you can also check the possibility of unlocking on the HTC and Motorola websites. If the bootloader of your smartphone cannot be unlocked using the official method, then only the unofficial unlocking or root method, which can usually be found on the XDA Developers forum, will help you.

Step 0: Back up everything you want to keep

Before you begin, it should be noted that this process will erase all of your data. Therefore, if you have any Important files, be it photos, music, videos or anything else, then now is the time to save everything to your computer. In addition, if you have any application settings that you want to save, then use the function Reserve copy to create a backup of your settings, and also save it on your computer.

Here's another tip: since I know I'll want to root my smartphone, I always unlock the bootloader as soon as I buy a new device. This way I don't waste time customizing the phone to suit myself only to delete all the data after a couple of days.

Once you have saved all your important files, you can begin.

Step 1: Android installation SDK and drivers for your phone

You will need two things for this process: Android Debug Bridge, which is a command line for PC that you can use to communicate with your phone, and a USB driver for your device. If you installed them earlier, then you need to update them to the latest version.

Let's give brief instructions for installation:

  • 1. Go to the Android SDK download page and scroll down to “SDK Tools Only”. Download ZIP file for your OS and unpack the archive.
  • 2. Launch SDK Manager and uncheck all items except “Android SDK Platform-tools”. If you are using a Nexus phone, you can also select “Google USB Driver” to download Google drivers.
  • 3. After installation is complete, you can close the SDK manager.
  • 4. Install USB drivers for your phone. You can find them on the website of the smartphone manufacturer (eg Motorola or HTC)
  • 5. Restart your computer if necessary.

Turn on your phone and connect it to your computer using a USB cable. Open the tools folder in your Android SDK installation folder and Shift+Right Click on an empty area. Select “Open a Command Prompt Here” and run the following command:
adb devices
If it appears serial number, then your phone is detected and you can continue further. Otherwise, make sure you follow all the given steps correctly.

Step 2: Enable USB Debugging

Next, you will need to enable several options on your phone. Go to your phone settings and select "About phone". Scroll down to Build Number and click on this item 7 times. A message should appear indicating that you are logged into developer mode.

Return to home page settings, you should have a new item “For Developers”. Enable “OEM Unlocking” if this option exists (if it doesn't, don't worry - only some phones have this option).

Then enable “USB Debugging”. Enter a password or PIN if required.

Once you do this, connect your phone to your computer. You will see a window on your phone asking “Do you want to enable USB debugging?” Check the “Always allow this computer” checkbox and click OK.

Step 3: Obtain an unlock key (not for Nexus phones)

If you have a Nexus smartphone, then proceed to the next step.

Go to the smartphone manufacturer's website to obtain an unlock key (for example, for Motorola, open this page or this one for HTC), select your device (if required) and drive or create a new account.

Further in this step there may be differences for different phones, but there should be instructions on the steps on the manufacturer’s website. It will be as follows: first, turn off the phone and boot into fastboot mode. On different phones there are different ways, but most often you need to press and hold the power button and volume down key for 10 seconds. Release the buttons and you should be in fastboot mode ( HTC users You will have to use the volume down key to get to the Fastboot item and use the power key to select this item).

Connect your phone and PC using a USB cable. Your phone must somehow notify you of the connection. Open the tools folder in your Android SDK installation folder and Shift+Right Click on an empty area. Select “Open a Command Prompt Here” and enter the unlock command provided by the manufacturer (for Motorola this is fastboot oem get_unlock_data command , for HTC fastboot oem get_identifier_token).

The command line will appear long lines characters. Copy these characters and make one line of them without spaces and on the website, paste the resulting text into the appropriate field. If your smartphone can be unlocked, you will receive an email with a key or file, which we will use in the next step. If your device cannot be unlocked, you will also be notified about this. If you still want to go all the way and use the unofficial method, then you will need the developers' website.

Step 4: Unlock

Now you are ready to unlock. If your phone is still in fastboot mode, run the command below. If not, then turn off your phone and boot into fastboot mode. There are different methods on different phones, but most often you need to press and hold the power button and volume down key for 10 seconds. Release the buttons and you should be in fastboot mode (HTC users will have to use the volume down key to get to the Fastboot item and use the power key to select this item). Connect your phone and PC with a USB cable.

Open the tools folder in your Android SDK installation folder and Shift+Right Click on an empty area. Select “Open a Command Prompt Here”.

To unlock your device, you will need to run one simple command. For most Nexus devices, this command is:
fastboot oem unlock
If you have a new version Nexus, for example, Nexus 5X or 6P, then the command will be slightly different:
fastboot flashing unlock
If you do not have a Nexus smartphone, then the manufacturer’s website will indicate the command you need. For Motorola devices this is the command fastboot oem unlock UNIQUE_KEY, where UNIQUE_KEY is the code sent to you by email. For HTC, this is the command fastboot oem unlocktoken Unlock_code.bin, where Unlock_code.bin is a file received from the HTC manufacturer.

After running the command, the phone may ask if you really want to unlock. use Volume key to confirm.

When unlocking is complete, use the OSD menu to reboot your phone (or run the fastboot reboot command on your computer). If everything is done correctly, then when you boot the phone you will see a message that the bootloader is unlocked, and then the Android OS will load. It is important to boot Android first before doing anything like installing a custom recovery.

Congratulations on being unlocked! While you won't notice any differences, you can now install a custom recovery, get root access or install a custom firmware.

Hi all! Today we will look at the simplest and most convenient methods for flashing your smartphone (or tablet).

The article is divided into the following sections:


Why is flashing needed?

Everything here is clear: either you have problems with your device, or you want something new, but the developers have stopped introducing new versions of the OS.

What are the firmware methods?

There are only two of them, but each in turn is divided into several more.

  1. Firmware via phone.
  2. Firmware using a computer.

Now we will look at several methods of flashing firmware using a PC.

Necessary preparation before the stitching process

All this needs to be done so that there are no disruptions to the installation of the new OS.

  • Fully charge your device and your computer;
  • Make a backup of your old OS;
  • Check if the USB cable is working properly.

Making a backup

The example shows Android 5.0 OS, but all the steps described below are almost the same in any version. Therefore, just carefully review these instructions.

  1. Go to your device's settings.

2. Select “System Information” and the “Memory” section. 3. Now click on the “Backup” button.

4. Now everything is simple: make a backup by selecting the items you need to save, as shown in the pictures.

5. Everything backup copy ready. You can copy it to another device or use it.

Firmware using FASTBOOT

Now that all possible security measures have been taken, you can proceed with the firmware.
First, download Fastboot to your computer. Make the program boot folder in the root directory of drive C. For example, C:\fastboot. In this case, it will be easier for you to register the location of the firmware in the future.

The installation file can be downloaded from the link (Android debugging utility).

First let's unlock Bootloader
Bootloader is a program outside the Android system that provides access to the kernel of the device. It can be compared to the BIOS on a computer.
By unlocking it, we will get root rights - open access to the system. On devices from different manufacturers this is done using different software. But there is only one algorithm, and it’s like this:

  1. You download and install the unlocking program in accordance with the device manufacturer.
  2. Then connect your smartphone via USB cable in debugging mode.
  3. Open the downloaded program, select your device and click “Unlock”.

Unlock example
Here is an example of unlocking a device manufactured by HTC.
1. Download and install HTC Bootloader Unlock.
2. Then connect the device to the computer in debug mode. Everything is quite simple here: go to the “For Developers” settings section and select “USB Debugging”.

3. Now open the downloaded program and confirm debugging (on your Android device).

4. All that remains is to simply unlock it by pressing the “Unlock” button. In fact, the process can be done through the command line Windows string. This program only automates the unlocking process.

5. To exit HTC Bootloader Unlock click “Finish” after completing the botloader unlocking process.

Note: There are unlocking programs for a smartphone or tablet from any manufacturer. For example:
Nexus – Nexus Root Toolkit;
Samsung - Kies;
Sony – Sony Bootloader Unlock.
If your device is from another manufacturer, just search the Internet for the appropriate utility.

Firmware process

  1. The first thing you need to do is connect to your computer in USB debugging mode. How exactly to do this is described a little earlier.
  2. First move new firmware to the C:\fastboot directory

3. Now put your device in fastboot mode. At the command prompt, enter the commands as shown in the screenshot.

4. In order for flashing to be successful, you need to format all directories on your device. Enter these commands in the command line one by one (after each - “Enter”):

  • fastboot erase boot
  • fastboot erase userdata
  • fastboot erase system
  • fastboot erase recovery
  • fastboot erase cache

5. Now you can start flashing the firmware. From the folder with the firmware (the “fastboot” folder), run the flash-all bat file. This is what it looks like on the command line:


6. After the successful flashing process, you will see a message about this.
That's all, the device has been reflashed. And after rebooting it, you can verify this.

Reflashing using the ODIN MULTI DOWNLOADER program

1. First, you need to connect your phone to your computer using USB cable, in debug mode. After this, be sure to run the Odin Multi Downloader program as an administrator.

2. Then specify the location of the firmware you want to install. Here's what you need to do: click on BOOT button and select the firmware file.

Note: if your firmware consists of several files (mostly there are three), then the path must be specified accordingly:
PDA file – in the “PDA” field;
file Phone – in the “Phone” field;
CSC file – in the “CSC” field;
3. Now you need to restart your phone. This can be done using key combinations (volume up + screen lock button + center button). As a result, the computer should recognize the phone, thereby a yellow field with the name of the COM port will appear on the screen.

4. After you click the “Start” button, the system update will begin. During this time, do not disconnect the phone from the computer. During the installation process, the smartphone will reboot several times, but you should not pay attention to this. After successful firmware installation (which takes about 10 minutes) the word “PASS” will appear on the computer screen.

Having completed all the steps according to these instructions, you will be able to use any version of the operating system. Android systems. In addition, it is worth noting that this program Suitable for flashing Android devices from any manufacturer.

Flashing an LG Android device using the KDZ UPDATER program

If you have a phone or tablet from the manufacturer LG, then it will be easier and more correct to flash it using the KDZ Updater program. How exactly to do this?
1. First download the KDZ Updater program. Actually, this is an archive that needs to be unpacked into a folder located in the root system disk From your computer.

2. Add the firmware you need to the same root folder. Here is the executable file of the program, this is the only way the firmware will be visible to the program.

3. Be sure to install the action policy file called msxml.msi
4. Now enable USB debugging mode. Exactly how to do this is described above.
5. Switch the device to S/W Upgrade mode. Namely:

  • turn it off;
  • take out the battery;
  • hold down the volume down key and insert the USB cable.
  • the corresponding inscription “S/W Upgrade” will appear.

Notes:
if you were unable to enter the S/W Upgrade mode, then try doing all the steps described above without removing the battery;
also try pressing both “sound rockers” instead of the volume down key;
In order for the firmware to become possible, you need to disable the LGE Mobile USB Modem program in Device Manager.

6. Now it's time to start flashing. Run the executable program KDZ_FW_UPD.exe from the root folder on drive C as an administrator.
Note: hover over the program icon and right-click. Select "Run as administrator".

7. Set all parameters as shown in the screenshot and click “Launch software update”.

8. After some time (about 10 minutes), the firmware will be completed. Just reboot your device and enjoy the new interface.

Firmware for smartphones and tablets from Lenovo

Why did I also bring up this topic separately? Because for Lenovo devices There are some nuances that create certain difficulties. However, there is also a program that compensates for them. What exactly? Ease of use and its intuitive interface.
So, let's begin.
1. You need a program for flashing SP Flash Tools. Download it.
2. To continue the firmware, you need to install drivers on the device. As a rule, they are not automatically installed upon connection. Therefore you need to do it manually.
download drivers according to your device model;
enter into the device manager on your computer (the above shows how to do this);
turn off the device;
connect the device via USB cable to the computer;
right-click on the device that appears (unidentified) and select “Install driver from a specified location”;
select driver.

3. Now launch SP Flash Tool. And specify the path to the firmware executable file (scatter file). Click on "Scatter Loading".

5. And only now connect the device to the computer.
6. Once the flashing is completed, you will be notified of this by the appearance of a bright green ring on the computer screen.

When you turn on the device, the first boot of the system will take quite a long time (5-10 minutes). That's how it should be, don't worry.

Brief summary

As you can already see, for Android devices from some manufacturers there is a special software, which facilitates the firmware process. So use it first.
However, there are many methods for flashing an Android device using a computer. There are so many utilities that make this process easier. But the above methods, in my humble opinion, are among the most convenient and easiest. So read, understand and go ahead!


  1. c:\android\adb
  2. Let's go to StartExecute(or press on the keyboard Win+R, as convenient for you) and type the following:
    cmd
  3. Opened command line. We write in it:
    cd c:\android\adb
    Where c:\android\adb
    *Helpful advice: TAB

  1. Install ADB and fastboot on PC (see above)
  2. We go to the folder where we installed our adb and fastboot. I have this
    /home/myuser/nexus/adb/
  3. We go to the terminal and write there:
    cd /home/myuser/nexus/adb/
    Where /home/myuser/nexus/adb/- path to the folder with adb and fastboot. It may be different for you
    *Helpful advice: to avoid typing everything manually, you can type part of the folder name and click on TAB
  4. Connecting our nexus device to the PC
  5. Execute the necessary commands (see below)

  1. Install ADB and fastboot on PC (see above)
  2. We go to the folder where we installed our adb and fastboot. I have this
    /home/myuser/nexus/adb/
  3. We go to the terminal and write there:
    cd /home/myuser/nexus/adb/
    Where /home/myuser/nexus/adb/- path to the folder with adb and fastboot. It may be different for you
    *Helpful advice: to avoid typing everything manually, you can type part of the folder name and click on TAB
  4. Connecting our nexus device to the PC
  5. Execute the necessary commands (see below)


ADB - Android Development Bridge. Simply put, this is a thing for developing and debugging applications for our beloved Android. But we are not programmers at all (for the most part), but regular users! Why do we need it? Let's figure it out.
adb, from the point of view of a simple user, includes the following features:
-Editing files on the device itself via PC
-Ability to install applications, firmware, kernels, radios, bootloaders and recovery
-Ability to “Download” the files we need from the phone

To work with adb you must first install them on your computer (as - see above)

ADB commands:
ADB push (writes a file to your device) -- adb push c:\example.apk /sdcard/example.apk
ADB pull (extracts a file from the device to the computer) -- adb pull /system/app/example.apk c:\example.apk
ADB install (installation of the program on the device) -- adb install c:\example.apk
adb reboot (device reboot)
adb reboot recovery (reboot the device and then boot into recovery)
adb reboot bootloader (reboot the device and then load it into the bootloader)
adb remount (unmount and mount the /system partition)

ADB-Shell commands:
adb shell (launches a Linux shell to run on the device)
cd (navigation through device directories) -- cd /system/app
ls (analogous to the "dir" command in DOS, shows the contents of the directory) -- ls /system/app
rm (deleting a file from the directory) -- rm /system/app/example.apk
cp (copies the file from the directory to the directory on the device) -- cp /system/app/example.apk /sdcard/example.apk
exit (exit ADB-Shell) -- exit

Fastboot utility commands:
fastboot devices - list of devices connected to the computer (used to check the connection)
fastboot reboot - reboot the device
fastboot reboot-recovery - reboot the device into recovery
fastboot reboot-bootloader - reboot the device into the bootloader
fastboot flash boot filename.img - kernel firmware
flashboot flash radio filename.img - radio firmware
fastboot oem lock - close the bootloader.
fastboot oem unlock - open the bootloader (erases all user data)

This is far from full list teams!

Did you like the article? Share it