Unlock Bootloader using Fastboot on Android (Detailed Guide) (2022)

Having an unlocked bootloader allows you to flash factory images/stock firmware, install a custom recovery like TWRP or flash a custom ROM like LineageOS. Not only that you could even root your device using Magisk and apply modifications to the software. In this guide, we will show you how to unlock bootloader using fastboot on various Android OEM devices in a step-by-step manner.

Table of Contents
  • What is a Bootloader and Why Would You Need to Unlock it?
  • Step-by-Step Guide on How to Unlock the Bootloader using Fastboot on Android Devices
    • Step 1: Backup All Your Data
    • Step 2: Install Android SDK Platform-Tools on Your PC
    • Step 3: Enable USB Debugging and OEM Unlocking on Your Device
    • Step 4: [If Applicable] Get an Unlock Key From Your Device Manufacturer
    • Step 5: Boot Your Android Device into Bootloader/Fastboot Mode
    • Step 6: Unlock Your Android Device Bootloader Using Fastboot

What is a Bootloader and Why Would You Need to Unlock it?

A bootloader is a software that runs every time the device starts up. It tells the phone what program it has to load to make your phone run. Not only that, but it is also used to boot up the device to recovery mode. All the devices nowadays are shipped with a locked bootloader. The reason is that the manufacturers only want their authorized operating system to run on the devices, thereby preventing the installation of third-party firmware/custom ROMs.

But many of the tech enthusiasts out there are always ready to tweak their Android device’s software for enhanced performance, battery life, features, etc. In spite of the risk involved in all these, they still want to go ahead and unlock their device bootloader. This is because it opens the gateway to tons of new features. The most important among them is the ability to obtain root access on your device, to make modifications to the software. Apart from that, you could also try out various MODs and frameworks, or capture much-improved pictures by installing different ports of Google Camera.

Unlock Bootloader using Fastboot on Android (Detailed Guide) (1)

(Video) How to unlock Android Bootloader using ADB & Fastboot

Unlocking the bootloader for most Android devices is a fairly easy process, for example, Google Nexus, Pixel, Essential Phone and OnePlus devices are easily unlockable. But not all Android devices follow this straightforward method. Other OEMs like Sony, HTC, Motorola or Nokia also allow their phones’ bootloader to be unlocked, but not directly. You’d need to get a device-specific unlock code/token from the manufacturer and then only you could carry on with the process.

Some devices and carriers don’t allow unlocking of their device’s bootloader in an official manner. In such cases, the user might have to wait until independent developers find an unofficial way (You can check for your device-specific section at XDA forums). In recent times, even Huawei has taken a rather strange route. They no longer provide the unlock-key for their devices launched after April 2018. As a result, users are left with no choice but to shell out extra money and purchase the code from third party websites- with no guarantee regarding the genuineness of such codes.

With all these pieces of information in hand, read on the below guide on how to Unlock Bootloader on Android Devices using Fastboot.

Step-by-Step Guide on How to Unlock the Bootloader using Fastboot on Android Devices

For your ease and understanding, we have split this guide into six steps.

The first step involves creating a backup of all your device data as they would be erased during the unlocking process. The second step will guide you to install the ADB and Fastboot (Android SDK Platform-Tools) on your PC. The third step talks about enabling USB Debugging and OEM Unlocking on your Android device. The fourth step is optional and only required in case of some OEM devices. In this step, you obtain an unlock-token from the device’s manufacturer. The fifth step is all about booting your device to bootloader/fastboot mode. Finally, the sixth step explains the procedure of unlocking the bootloader of your Android device using fastboot.

Step 1: Backup All Your Data

Unlocking the bootloader would completely wipe all the data from the device. So before beginning with the process, it is extremely important to have a complete backup of all your data- media files, contacts, call logs, app data, and other important data. Try to copy all the possible data to your PC/laptop.

(Video) How To Unlock Bootloader On Any Android | OEM Bootloader Unlock | Fastboot

Also, make sure to turn on the ‘Backup’ option under ‘Settings’ -> ‘System’ option. Upload your photos and videos to Google Photos. Also, make sure to keep all your app data synced with your Google ID. This could be done by turning on the sync feature present under ‘Settings’ -> ‘Accounts’. It is also advisable to remove your SD card before beginning with the process. If you want further help on this, refer to our detailed guide on how to make a complete backup of the data present on your Android devices.

Step 2: Install Android SDK Platform-Tools on Your PC

In order to follow the instructions below, you must first install the Android SDK Platform-Tools on your PC. We already have a detailed tutorial on how to install them on Windows, macOS, or Linux. Alternatively, you can also use Minimal ADB and Fastboot Tool for this.

During this guide, we will refer to “C:\adb”, which would be the folder where the ADB and Fastboot tools are installed, if you’d have followed our tutorial. If the installation folder/directory is different in your case, then make sure to proceed accordingly.

Step 3: Enable USB Debugging and OEM Unlocking on Your Device

‘USB Debugging’ and ‘OEM Unlocking’ are two of the most widely used options we talk about while unlocking a bootloader or rooting an Android device. But what exactly are they and what role do they explicitly perform?

Well, as far as ‘USB Debugging’ is concerned, it is used to establish an ADB connection between your Android device and PC. ADB stands for “Android Debugging Bridge” and as the name suggests it creates a bridge (virtual link) between your Android device and the PC. This is used not only for effective communication between the device and the PC but also for executing various commands.

Whereas ‘OEM Unlocking’ is exclusively used for bootloader unlocking purposes. If you want to tweak with your device software, root your device or flash MODs then the first requirement is to have an unlocked bootloader. And this is where OEM Unlocking comes into play. Until and unless you enable this option, you won’t be able to carry on with the unlocking process.

(Video) How to Unlock Bootloader on Android! [Android Root 101 #1]

Do note that both of these options (i.e. USB Debugging and OEM Unlocking) are present under Developer Options, which is hidden by default. So first you need to enable ‘Developer Options’ before enabling these two. Follow the below steps for the same:

  1. Go to ‘Settings’.
  2. Select ‘About Phone’,
  3. Tap on ‘Build Number’ 7 times until you see the ‘You’re now a developer!’ message on the screen.
  4. Again go back to the ‘Settings’ menu.
  5. Next, go to ‘Developer Options’.
  6. Enable ‘USB Debugging’ and ‘OEM Unlocking’ from there.

You could also follow our separate guides on how to enable USB Debugging and OEM Unlocking.

Step 4: [If Applicable] Get an Unlock Key From Your Device Manufacturer

As mentioned before, not all devices’ bootloader could be unlocked directly via the fastboot. Some vendors like Sony, Motorola, HTC, Nokia, etc require you to get an unlock-token/key from them before you could proceed further.

So, below are the links to bootloader unlocking pages for various OEMs:

Once you have fetched the unlock key/code/token for your OEM Android device, follow the steps below to unlock the bootloader using fastboot.

Step 5: Boot Your Android Device into Bootloader/Fastboot Mode

Before entering the fastboot commands for unlocking the bootloader, you need to boot your device to bootloader/fastboot mode.

(Video) [Samsung] Unlock Bootloader, Install TWRP (Universal Guide)

Different devices have different hardware key combinations for booting into bootloader mode. For example, OnePlus device requires you to press the Power and Volume Up button together for a few seconds whereas for Xiaomi devices it is Power and Volume Down. The hardware key combination for booting to fastboot for various Google Pixel/Nexus devices could be found on this page.

If you are unsure about your device, either Google it or follow the below procedure:

  1. Go to the folder where ADB and Fastboot binaries are installed.
  2. While holding the SHIFT, right-click in an empty location inside the folder.
  3. Select ‘Open command window here’ or ‘Open PowerShell Window here’.
  4. Connect your device to PC via USB Cable.
  5. Type in the below code:
    adb devices
  6. A device code indicates that a successful connection is established between your device and the PC. Otherwise, make sure that the USB drivers are properly installed.
  7. Now type the below command to boot your device to Bootloader/Fastboot Mode:
    adb reboot bootloader

Your device will successfully boot into bootloader/fastboot mode. Now just follow the below steps in order to finally unlock your device’s bootloader.

Step 6: Unlock Your Android Device Bootloader Using Fastboot

  1. Make sure your device is in bootloader/fastboot mode and connected to PC.
  2. In order to unlock the bootloader of Google Nexus/Pixel devices or other OEM devices launched in 2015 or later, type the below command:
    fastboot flashing unlock
  3. For all other devices and the Nexus devices launched prior to 2015, type the following code to unlock the bootloader:
    fastboot oem unlock
  4. As soon as the command is executed, you should see a confirmation message on your Android device’s screen, seeking your response on unlocking the bootloader.
  5. Use the Volume buttons to highlight ‘Unlock the Bootloader’, ‘Yes’ or similar options. Then press the Power button to confirm the selection.
  6. Once the bootloader is unlocked, the phone will reboot back into Fastboot Mode. Simply enter the command below to boot it into the PC:
    fastboot reboot

That’s it. You have successfully unlocked the bootloader on your Android device. Note that when your device boots up for the first time, it might take up a little more time than usual. This is completely normal. Also, you will have to set up your device all over again as all the data on your device would have been wiped off.

With your bootloader unlocked, you could now install install a custom recovery like TWRP to flash custom ROMs/kernels, root your device via Magisk or even tweak your device software with the help of various mods like ViPER4Android.

(Video) Universal Bootloader Unlock Guide For Xiaomi Phones (2022)

Also, if you have any doubts with regards to unlocking the bootloader on your device, do ask in the comments section below.


Can I unlock bootloader in fastboot mode? ›

To unlock the bootloader and enable partitions to be reflashed, run the fastboot flashing unlock command on the device. After setting, the unlock mode persists across reboots. Devices should deny the fastboot flashing unlock command unless the get_unlock_ability is set to 1 .

Can you unlock bootloader with ADB? ›

To unlock bootloader via Fastboot you'll need a PC and ADB with Fastboot setup, which can be tricky for some, but we'll guide you through. Also, make sure your device is at-least 20% charged before you attempt to unlock bootloader. Note: Unlocking the bootloader will completely wipe/delete all data on your device.

How do I flash a device in fastboot mode? ›

To flash a device:
  1. Place the device in fastboot mode by holding the appropriate key combination at boot or using the following command: adb reboot bootloader.
  2. After the device is in fastboot mode, run: fastboot flashall -w.
Aug 2, 2022

Which bootloader is easiest to unlock? ›

Pixel for less

Google also makes it very straightforward to unlock the bootloader and install custom ROMs.

Can I root without OEM unlock? ›

Senior Member. You do not need to unlock the bootloader to root. The locked bootloader only protects the kernel and recovery partitions. Do not run "fastboot oem unlock" and do not run "fastboot flash recovery recovery.

Do I need Internet to unlock bootloader? ›

Yes. It need internet to check your account permission.

How do I boot into recovery mode from fastboot? ›

In fastboot mode,toggle to recovery mode,and then press & hold the Power button & then the same volume button. Power + Volume Down,release it once you see screen then once again continue to hold. Volume Up + Power,toggle to recovery mode.

What is OEM unlocking on Android phone? ›

OEM Unlock simply gives you the ability to unlock the bootloader. While rooting is a process that gives you complete access to your device's OS, including the ability to break things. Once you unlock the bootloader, only then can you go ahead and root your device.

How do I change my device from state lock? ›

To change a device's state, use the fastboot flashing [unlock | lock] command. To protect user data, all state transitions wipe the data partitions and ask for user confirmation before data is deleted. The UNLOCKED to LOCKED transition is anticipated when a user buys a used development device.

What are fastboot commands? ›

Important Fastboot Commands
Fastboot commandsUses
fastboot rebootReboot the Android devices into the recovery mode
fastboot oem unlockUnlock the bootloader on with fastboot OEM unlock
fastboot oem lockAfter unlocking the command, relock it using this command
fastboot reboot recoveryReboot the device into recovery
6 more rows
Jun 14, 2021

What can I do in fastboot mode? ›

Fastboot mode can do many things like allowing you to install custom files, install stock files, unlock your bootloader, relock your bootloader, flash a custom recovery, and install various files of the core Android system.

What does fastboot boot do? ›

What is Fastboot? In Android, fastboot is a protocol or a diagnostic tool that is a part of the Android SDK Platform Tools collection. Fastboot helps to renew the flash files on your Android devices directly. Fastboot mode is also an alternative to the recovery mode that helps you with the installations and updates.

What will happen if I unlock bootloader? ›

Vulnerabilities are typically caused when the device's bootloader is unlocked, as an unlocked bootloader enables the user to make many different changes to the device that the OEM would not typically allow. This can include flashing custom ROMs, sideloading programs, flashing recoveries and modifying system elements.

Why should I unlock bootloader? ›

Unlocking the Bootloader allows you to install custom firmware on your Android phone and gives you full access privileges to make modifications to the phone. Such modifications could involve changing some of the pre-loaded software, or could even include replacing the entire operating system.

Which brands unlock bootloader? ›

Apart from that all the major brands like Samsung, LG, Motorola, Xiaomi, Pixel, One Plus, HTC, Sony etc. provide you the option to unlock the bootloader. If you are looking for any specific model or brand please mention in the comments and I will confirm if its bootloader can be unlocked or not.

Can we flash fastboot ROM with locked bootloader? ›

Yes, but for some redmi phones like Redmi Note 3 or note 4 which supports edl mode. Then your device will enter into edl mode. Then you can simply flash the custom rom via MIFlash Tool.

Can you root a phone with a locked bootloader? ›

No, it's not necessary to unlock bootloader for rooting. But flashing custom ROM or recovery is not possible without unlocking the bootloader because locked bootloader verify the ROM or recovery being flashed for company's official signature and custom ROM doesn't contain the official signature.

Is it possible to root Android without unlocking bootloader? ›

It's not possible to add any binary or user or rooting app without unlocking your bootloader.

What means OEM unlock? ›

It unlocks access to administrative settings and bootloader, allowing you to download custom ROMs, custom kernels, etc. It allows you to install apps blocked by the administrator. It allows users to manage partitions and remove pre-installed bloatware.

How do I put my phone in bootloader mode? ›

Follow these steps:
  1. Ensure the phone is turned off.
  2. Press and hold the VOLUME DOWN button.
  3. Press the POWER button.
  4. Continue to hold VOLUME DOWN until the Download mode is displayed.
  5. Press VOLUME DOWN to go to Reboot to bootloader.
  6. Press the POWER button.

What does bootloader Cannot be unlocked mean? ›

It is this encryption that most reports are referring to when using the term “locked.” If a bootloader is encrypted, users can't unlock it to load custom software of any sort. The device will be restricted to running software ROMs provided by the manufacturer.

How do I use fastboot mode on Android? ›

Enter Fastboot Mode On Samsung Devices:

Turn off your device. Press & hold the “Power + Volume Down + Home” keys for 5-6 seconds and then release. In a while, the device will enter into fastboot mode.

How do I fix my Android it wont boot into recovery? ›

Here are some things you can do in the Android recovery mode:
  1. Help to fix an Android telephone that is frozen because of some unacceptable setup.
  2. Wipe stored caches to fix temporary system glitches.
  3. Reset your Android phone.
  4. Install system updates from ADB or SD card.
  5. Run hardware tests.
  6. Reboot to bootloader.
  7. Enter fast boot.
Aug 10, 2021

How do I get to custom recovery mode? ›

You need to power off your phone first. Then, after it's shut down, hold simultaneously the 'Power' button and the 'Volume down' button for a few seconds (if this does not work out, try with Power and Volume Up - the combination might vary across devices). Then, release them and you should see a list with options.

What is Fastboot mode in xiaomi? ›

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.

How do I exit Fastboot mode? ›

Rebooting most phones is as easy as pressing and holding down the Power button. When your phone powers off, press and hold down the Power key again and your phone will turn on. You should now be out of Fastboot mode.

What is OEM locked? ›

OEM is the acronym for “Original Equipment Manufacturer”. It is also called “Jailbreaking” sometimes. OEM unlocking is the process in which the unlock ability flag is set to 1 instead of 0, of your device. Generally, this is locked by the original manufacturing company, so the name given to it is OEM Unlocking.

What is device state locked? ›

The device state indicates how freely software can be flashed to a device and whether verification is enforced. Device states are LOCKED and UNLOCKED . LOCKED devices prevent you from flashing new software to the device, whereas UNLOCKED devices allow modification.


1. Unlock Bootloader and Install Custom recovery on any Android phone Without pc or root | Bugjaegar
2. How to unlock Bootloader using cmd
3. How to UNLOCK Xiaomi MI A2 Bootloader with Fastboot in 2 Mins
(Absolutely Techie)
4. HOW TO ANDROID: Unlock Your Bootloader & Install Custom Recovery (TWRP) with Mac OS X - BEST Method
(How To Tech)
5. How to Unlock the Bootloader on (most) Android Phones
(Nicholas Henkey)
6. How To Unlock Bootloader On Any Android
(TechX Tutorials)

Top Articles

Latest Posts

Article information

Author: Jerrold Considine

Last Updated: 10/28/2022

Views: 5922

Rating: 4.8 / 5 (58 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Jerrold Considine

Birthday: 1993-11-03

Address: Suite 447 3463 Marybelle Circles, New Marlin, AL 20765

Phone: +5816749283868

Job: Sales Executive

Hobby: Air sports, Sand art, Electronics, LARPing, Baseball, Book restoration, Puzzles

Introduction: My name is Jerrold Considine, I am a combative, cheerful, encouraging, happy, enthusiastic, funny, kind person who loves writing and wants to share my knowledge and understanding with you.