How to unlock the bootloader on Motorola phones (Moto X, Moto G)
First, let’s clear up all confusion around the term ‘bootloader’. Bootloader has a very literal meaning - it’s the piece of code that’s executed before even the operating system loads. The function of the bootloader is basically to instruct the device how to load the OS. To do so, it has to communicate directly with the processor and motherboard (which are different for virtually every phone), so all in all, the bootloader is a very phone- and platform-specific piece of code. That is why it differs on, say, a Motorola and a Samsung phone. Some manufacturers decide to lock the bootloader on their phones as a way to ensure that no one can change their custom Android user interfaces. Luckily, Motorola has gone the more developer-friendly way, and the company itself provides a bootloader unlock, making the whole process extremely easy.
Why would you want to unlock the bootloader, though? Installing a custom ROM is one reason, but an unlocked bootloader is also often required for getting root access to the system.
If you have already made up your mind about unlocking the bootloader, we can get started with the unlocking process now. This guide applies for the Motorola Moto X and Moto G.
First, here are the pre-requisites for it all to work:
Back up your phone first!!!The phone’s battery must be charged to at least 80%.
- USB debugging must be “ON”.
- Motorola USB drivers must be installed on a computer, you can grab them from here.
- Android SDK must be installed on your computer.
1. Connect your phone to your computer via a USB cable. You have to enable USB debugging mode on your smartphone. To do so, simply navigate to Settings > About Phone > scroll to the bottom > tap Build number seven (7) times. You'll get a short pop-up in the lower area of your display saying that you're now a developer.
2. Go back and now access the Developer options menu, check ‘USB debugging’ and click OK on the prompt.
3. Now, it’s time to open Command Prompt (terminal) and get serious. Don’t worry, all you’d need to do is copy and paste some code in it, it's not hard at all. To open the terminal in Windows 7 hit the ‘Windows’ key, type ‘cmd’, and hit Enter; in Windows 8, you’d need to navigate to the new Modern UI home panel, and just type in ‘cmd’ there.
Once you open the terminal, you need to change the folder to Platform Tools in the Android SDK. Typically, it looks something like this, but you have to find the exact path where you installed the Android SDK on your computer:
To change the folder you just copy the above path (as it is on your computer) and put ‘cd’ in front of it, so the whole command would look like so:
cd C:/Android SDK/adt-bundle-windows-x86_64-20131030/sdk/platform-tools/
4. Now, you are ready to start putting in the first commands that control your phone. In the command line type in the following:
Hit ‘Enter’, and you should see the following:
List of devices attached
The code will differ for different devices, so just make sure that something along these lines appears in the list of devices.
Next, type in:
adb reboot bootloader
This will make the phone reboot in bootloader mode. You’d need to wait a short while and see the bootloader menu.
Next, type the following in the terminal:
fastboot oem get_unlock_data
This will return you a unique string of code spread across five lines. It should look something like this:
OKAY [ 0.164s]
finished. total time: 0.164s
Congratulations, you have completed the first important part - this is your unique phone identifier. Now, you need to copy just the numbers appearing after ‘(bootloader)’, and that’s a bit tricky in the Windows Command Prompt. First, right click anywhere in the Terminal, select Mark, and mark the whole block of text. Then, hit enter. This will put all this copied text in the clipboard. Now, in an app like Notepad, simply paste the copied text and delete everything except for the numbers. Combine all numbers together so that they appear as a single string like so:
5. Copy this super-long string and head straight to Motorola’s official website, sign and skip right to step 6.
Paste the already copied super-long string and click on the “Can my device be unlocked?” button. Make sure you have removed all blank spaces from the copied string, and you should get a green light to get your bootloader unlocked.
Accept the user agreements, and head to your email, where Motorola has sent you the final instructions.
6. FINAL INSTRUCTIONS: Copy the 20-character key that Motorola sent you via email. Then, in the terminal (make sure your phone is still connected to your computer via USB), type:
To check that your phone is listed, and next:
Where instead of 'UNIQUE_KEY' you type in your own 20-character key that Motorola sent you via email.
7. Congrats! If you have entered all info correctly, your phone should be rebooting by itself, showing you the image you see on the right. And yes, now you have your bootloader unlocked!
It was a bit tedious, but not hard, was it? Let us know if this worked out for you and how the whole process went in the comments section below.
This story is part of:Android hacks, mods and tips (15 updates)
30 November How to flash a custom recovery (like CWM or TWRP) on Android
28 March How to boot into custom recovery (like CWM or TWRP) on Android
28 March Here's how to root the Samsung Galaxy S5 (SM-G900F) step by step
14 March How to enable USB debugging on Android
13 March How to unlock the bootloader on Motorola phones (Moto X, Moto G)