How to Unlock the Bootloader on Your Android Phone

The Android Fastboot tool is one easy method

Unlock Android bootloader


Unlocking your bootloader is the first step towards rooting your phone and installing custom ROMs. It’s also the place where most people run into trouble, not because it's particularly difficult, but because phone manufacturers and carriers don’t usually want you unlocking the bootloader. There are a bunch of reasons for that, but it mostly comes down to the reasons they prevent rooting. Before you start, make sure it’s even possible with your device. Some phones will require an additional unlock code from the manufacturer to complete the process.

Enable OEM unlocking

Before you can actually unlock your phone, you need to enable the OEM unlocking developer feature in Android.

  1.  Open the Settings app on your device.

  2.  Scroll down, and select the System settings.

  3.  Under the System settings, locate and tap About phone.

  4.  Near the bottom of the screen, you’ll see the Build number. Tap it seven times to enable the developer options. When you reach the seventh time, you may be prompted for your password to confirm.

    Android settings about phone
  5.  Back out one step up to the System settings again.

  6.  This time, find the Developer options, and select it.  

  7.  Find the OEM unlocking option, and flip the switch on.  

  8. Scroll down a bit more, and find Android debugging. Enable that too.

    Android OEM unlock

Install Android Tools

Enabling OEM unlocking only made it possible to unlock the device. In order to actually unlock it, you’re going to need a couple of Android developer tools from Google. These are freely available, and they’re simple to use.


  1.  Begin by downloading the latest Android tools ZIP for Windows.

  2. Unpack the ZIP file into a convenient folder. This is the folder where you’ll run the tools out of, so it should be easy to get to.

  3. Right click in the folder window containing the extracted files. When the menu pops up, select Open command window here.

 Ubuntu/Debian Linux

  1.  Open a terminal window.

  2.  Use ‘sudo’ to get root privileges, and use the following command to install the Android tools.

$ sudo apt install android-tools-adb android-tools-fastboot

Unlock With Fastboot

You’re ready to unlock your phone’s bootloader with the Fastboot tool that you just downloaded. Before you go any further, you should see if your phone requires a code from the manufacturer to unlock it. Here are the instructions for several major manufacturers:

  • LG
  • HTC
  • Motorola
  • Sony
  • Samsung – Only international Samsung phones with an Exynos processor can be unlocked.
  • Google phones can all be unlocked by default, unless you purchased them from a major carrier.
  1. Plug your phone in to your computer with its USB cable.

  2. In the terminal (or Command Prompt), run the following command to connect your phone.

    adb devices

    You’ll see a message requesting access on your phone. Check the box to always allow the connection, and confirm.

    Connect via ADB
  3. Next, run this command to reboot your phone into the bootloader.

    adb reboot bootloader 
    Reboot into the bootloader with ADB
  4. Wait for your phone to reboot. You’re now ready to unlock with Fastboot. On newer devices and Google devices run:

    fastboot flashing unlock

    On devices that require a code and some older devices run:

    fastboot oem unlock <code>

    Omit the code, if you don’t need one.

    You may be asked to confirm. Do so.

    Unlock Android bootloader with Fastboot
  5. After your see a confirmation message that your bootloader is unlocked, you can reboot it with Fastboot.

    fastboot reboot
  6. As your phone reboots, you’ll probably see a warning that your bootloader is unlocked, and that it isn't secure. Continue booting. Your bootloader is unlocked, and you’re ready to continue on to flashing custom recovery and rooting your device.