PDF download Download Article
Use ADB to re-lock the bootloader and protect your phone
PDF download Download Article

On Android phones, the bootloader is responsible for loading the Android operating system and interfacing with your device’s hardware. If you previously unlocked the OEM bootloader to root your Android or install custom ROMs, you can relock it using your computer. Keep reading to learn how to lock the bootloader on an Android device.

Quickly Steps to Lock the Bootloader on Android

  1. Download and install Android SDK on your computer.
  2. Open a Terminal or the Command Prompt as an administrator.
  3. Boot your Android into Recovery Mode and connect to your computer.
  4. Change directories to the “platform-tools” folder on your computer.
  5. Type “fastboot devices” and press Enter.
  6. Type “fastboot flashing lock” and press Enter.
Part 1
Part 1 of 3:

Install Android SDK Platform Tools

PDF download Download Article
  1. Go to the Android SDK download website. This is the website where you can download the Android SDK on your computer. This allows you to interface with your Android system on your computer.
    • Warning: Not every Android device has a lockable and unlockable bootloader. Many manufacturers and mobile carriers don't allow you to unlock or lock your bootloader.
    • Warning: Locking your bootloader will most likely wipe your entire Android device. Make sure you back up your Android before attempting to lock it or flash it.
  2. You can download SDK Platform Tools for Windows, Mac, and Linux. Click the download link for whichever operating system your computer uses. All three are listed below the "Downloads" header.
    Advertisement
  3. The checkbox is at the bottom next to "I have read and agree with the above terms and conditions." Scroll down and click the checkbox to continue.
  4. It's below the text and the checkbox. This downloads a zip file containing a folder called "platform-tools." This folder contains the Android SDK.
  5. Unzip the contents of the zip file. Both File Explorer for Windows and Finder on Mac can unzip zip files. Simply double-click the zip file and then drag and drop the "platform-tools" folder inside the zip file to a location that you can remember and easily access.
  6. Depending on your device, you may have to install drivers to make your computer recognize your Android. You can get these drivers from your phone or tablet manufacturer's website. The following are a few websites you can download drivers for your device from:
  7. Advertisement
Part 2
Part 2 of 3:

Enable USB Debugging

PDF download Download Article
  1. To do so, swipe down from the top of the screen and tap the Settings/Gear icon in the upper-right corner.
  2. Scroll down in the Settings menu to see if Developer Mode is already enabled. If your bootloader is unlocked, you probably already have USB debugging enabled. However, if you don’t see Developer Options in the Settings menu, use the following steps to enable it:
    • Tap About phone.
      • On some devices, it may be under System or About.
    • Tap Build number.
      • On some devices, it may be under Software information or Versions.
    • Tap the Build number 7 times. You should see a pop-up that says “You are now a developer!”.
  3. To do so, open Developer options at the bottom of the Settings menu, then tap the toggle switch next to USB debugging or ABD debugging to enable it.[1]
  4. Advertisement
Part 3
Part 3 of 3:

Lock the Bootloader

PDF download Download Article
  1. Boot your Android into recovery mode. On most Android models, you can boot into Recovery Mode by powering your device off and then pressing and holding the Power + Volume Down buttons at the same time. Once you are in the Fastboot menu, use the Volume Up and Volume Down keys to navigate the menu. Highlight Recovery mode and press the Power button to select it.[2]
    • On Samsung Galaxy devices and some other devices, press and hold the Power or Bixby button and Volume Up to boot into Recovery Mode.
  2. If you don’t have the same USB cable that came with your device, make sure you’re using a safe, compatible version.
  3. If you are using a Mac or Linux computer, you will need to use the Terminal. If you are using Windows, you will need to open the Command Prompt as an administrator. Use the following steps to open the Command Prompt or Terminal:
    • Windows: Click the Windows Start menu and type "CMD." Right-click the Command Prompt icon and click Run as Administrator, then click Yes.[3]
    • Mac: Click the magnifying glass icon in the upper-right corner. Type "Terminal" in the search bar. Click the Terminal to launch it.[4]
    • Linux: Press Ctrl + Alt + T to open the Terminal.[5]
  4. To navigate to the platform-tools folder, type "cd" followed by the path of the platform-tools folder (i.e., "cd C:\Users\username\Desktop\platform-tools") and press Enter or Return.
    • To find the path for the platform-tools folder on Windows, open the platform-tools folder in File Explorer. Then right-click the path in the address bar at the top and click Copy address as text. You can press Ctrl + V to paste the address into Command Prompt.
    • To find the path for the platform-tools folder on Mac, right-click the platform-tools folder, and click Get Info. Highlight and copy the address next to "Where." You can press Command + V to paste the address into Terminal.
    • If you saved the platform-tools folder to another folder, such as a D: drive, you will need to switch to that drive before you can navigate to the path. To switch to a different drive, type the drive letter followed by a colon in Command Prompt or Terminal (i.e., "D:") and press Enter or Return.
  5. This checks to make sure your system recognizes your device. It should return your device model.
    • If it does recognize your device, make sure your Android device is in recovery/fastboot mode. If it is not, you can type "adb reboot bootloader" and press Enter to boot your phone into Fastboot mode.
  6. The command will run and lock the bootloader. If you see an error message, try one of the following commands instead:[6]
    • fastboot oem lock
    • oem relock
  7. Check your device. There should be a message on the screen asking you to confirm that you want to lock the bootloader. If need be, use the Volume Up and Volume Down keys to navigate the menu. Press the Power button to make your selection. Select the option to lock your bootloader or confirm that you want to lock your bootloader. Then wait for the process to finish.
    • Warning: Do not disconnect your device until this process is complete. Any interruptions during this process may permanently damage your Android device.
  8. Advertisement

Community Q&A

Search
Add New Question
  • Question
    What if my cell phone is not recognized?
    Community Answer
    Community Answer
    Try unplugging it from the computer and plugging it back in on another port. Also, make sure the device is unlocked and you have made sure it can download from unknown sources, and have the computer set in MTP mode as a trusted device.
  • Question
    Does this format my device?
    Community Answer
    Community Answer
    It shouldn't, but backing up your device is recommended. I recommend using Titanium Backup, which you can get from the Google Play Store for free.
  • Question
    What do I do if a CMD keeps saying waiting for any device?
    Community Answer
    Community Answer
    Make sure that you have all the drivers installed on the PC. If not, search your device model on internet and the word "drivers". Also, if you don't found them, you could install "ADB Drivers". This should work.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Install a Custom ROM on AndroidInstall Custom ROMs on Any Android Phone with Our Step-by-Step Guide
Root an Android TabletRoot an Android Tablet
Root an Android Without a PC Root Your Android Device Without a PC
Root a Samsung Galaxy S5Root a Samsung Galaxy S5
Unlock Android Phone Password Without Factory Reset5 Ways to Unlock an Android Phone Without Factory Reset
Jailbreak Your PhoneJailbreak Your Phone
Turn Off Your Android Phone Without the Power ButtonTurn Off Your Android Phone Without the Power Button
Break Into Your Locked Android Device Get Into a Locked Android Phone If You Forgot the Password
Root the Samsung Galaxy Tab 3Root the Samsung Galaxy Tab 3
Flash an Android TabletFlash an Android Tablet
Install Android on Kindle FireInstall Android on Kindle Fire
Delete Apps on AndroidDelete Apps on Android
Manually Upgrade an Android Device Operating SystemManually Upgrade an Android Device Operating System
Reset Your Android Phone3 Easy Ways to Reset an Android Phone to Factory Settings
Advertisement

About This Article

Luigi Oppido
Reviewed by:
Computer & Tech Specialist
This article was reviewed by Luigi Oppido and by wikiHow staff writer, Travis Boylls. Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years. This article has been viewed 258,766 times.
How helpful is this?
Co-authors: 11
Updated: November 7, 2025
Views: 258,766
Categories: Android
Thanks to all authors for creating a page that has been read 258,766 times.

Is this article up to date?

Advertisement