May 192017
 

 

Moto G5 Plus unlocked

These are the steps I took in order to unlock the bootloader of my Moto G5 Plus. Ultimately I would like to install custom recovery software on it à la TWRP and root it with chainfire’s SuperSu. I’ve also included some extra notes in places that that gave me problems or I thought were tricky.  The normal caveat applies: these steps worked for me, but your mileage may vary.

IMPORTANT! Like it’s predecessor, the Moto G4, Amazon.com is selling ad subsidized versions of the Moto G5 Plus. You WILL NOT be able unlock the bootloader and root an Amazon “Special Offers” Moto G5 Plus. Amazon keeps the bootloader on these phones locked for obvious reasons. If you’ve got one then I hate to be the bearer of bad news, but you are SOL.

Prerequisites for Bootloader Unlocking

  1.  A Moto G5 Plus phone
    This should work for either the 32GB/2GB or 64GB/4GB variants but will definitely not work for, and could possibly brick, any Amazon “Special Offers” Moto G5 Plus.
  2. A PC running Windows, OS X, or Linux
    I am using an Apple PowerBook Pro running Ubuntu 16.10 Yakkety Yak.
  3. The latest Motorola drivers
    Windows (and possible OS X) users will need these, but Linux users will not.

    Download link:
    motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481

    Follow Motorola’s instructions to make sure your drivers are installed correctly.
  4. A Motorola Account
    Sign in or create an account here:
    https://accounts.motorola.com/ssoauth/login
  5. A USB B to Micro USB cable
  6. The Android Debug Bridge (ADB) and Fastboot programs
    Originally you had to download the entire Android SDK if you wanted just these two programs. Fortunately Google recently made available for download the Android Platform-Tools package containing these programs. The most recent software is available for download at:

    https://developer.android.com/studio/releases/platform-tools.html

    Download the appropriate version for your OS and install adb and fastboot according to Google’s instructions.
IMPORTANT! Unlocking your bootloader WILL void your warranty.

Moto G5 Plus Bootloader Unlocking

  1. Back up anything on your phone that you want to save: apps, user data, pictures, etc. You WILL lose it all if you follow these steps.
  2. Make sure that the Developer Options settings are activated on your phone. If they are not, and you don’t know how to turn them on, check out my post “How to Enable Developer Options in Android 7 Nougat“.
  3. With Developer Options activated, make sure that USB debugging is enabled. Go to Settings →Developer Options and scroll down until you find USB debugging. Turn it on if it is not already.
     Moto G5 Plus USB Debugging
  4. Power off your phone.
  5. Boot your phone into fastboot mode by pressing the volume down and power buttons at the same time.
     Android fastboot mode screen
  6. Plug your phone into your PC.
  7. In the terminal run fastboot oem get_unlock_data
    tpodlaski@Alabama:~$ fastboot oem get_unlock_data
    (bootloader) slot-count: not found
    (bootloader) slot-suffixes: not found
    (bootloader) slot-suffixes: not found
    ...
    (bootloader) Unlock data:
    (bootloader) 3A16580618696538#
    (bootloader) 5A5932323433504E4D46004D6F746F2047200000#
    (bootloader) A07864BA861114F6BE7B11C89E8F06FF742FC916#
    (bootloader) 839889FA000000000000000000000000
    OKAY [  0.099s]
    finished. total time: 0.099s
    

    You may find some extraneous output when you run the command, but as long as you have lines similar to the (bootloader) lines above, and the return status was OKAY, then you can move on the next step.

  8. The data on the (bootloader) lines below the initial (bootloader) Unlock data: line needs to be assembled into a single string with no line breaks or carriage return. The easiest way to do this is in a text editor so open your favorite text editor and paste the date strings one immediately after the other making sure not to include (bootloader) or any leading spaces.
     Bootloader unlock code
  9. Go to the Motorola unlock page. If you haven’t already, log in with you Motorola ID or create one if you do not have one.
  10. Read through and understand all of the risks associated with unlocking your bootloader. If you wish to continue, click the Next button at the bottom of the page.
  11. On the next page, scroll down to step #6 and in the text box paste the string you concatenated in step 7 into the textbox and then press the Can my device be unlocked? button. 
     Device unlock textbox
  12. If your phone can be unlocked, a Request Unlock Key button will appear at the bottom of the page. Click to agree to the legal agreement and click the Request Unlock Key button. The unlock key will be e-mailed to address associated with your Motorola account.
     Request unlock key
  13. Check your mail for a message from Motorola containing the code you will need to unlock your device.
  14. With your phone in fastboot mode and connected to your computer, run fastboot oem unlock UNIQUE_KEY where UNIQUE_KEY is the key sent to you by Motorola.
    tpodlaski@Alabama:~$ fastboot oem unlock 2CQRKLBXBGF545ZIN3ORP
    (bootloader) slot-count: not found
    (bootloader) slot-suffixes: not found
    (bootloader) slot-suffixes: not found
    ...
    (bootloader) Bootloader is unlocked! Rebooting phone
    OKAY [  2.695s]
    finished. total time: 2.695s
    

Congratulations! Your bootloader is unlocked (and your warranty is void). Motorola won’t ever let you forget that you’ve unlocked your bootloader as every time you boot your phone you will be greeted with a screen like:

Bootloader warning screen

If you haven’t installed twrp yet, your warning screen might display “bad key” instead of “N/A” for the ID. Don’t worry about it. Nothing is wrong. I wasted a lot of time thinking this was a problem, but after doing some research I learned this was normal.

It is possible to get rid of this warning screen if it bothers you. It is my plan to write about it in a future post.

Unlocking your bootloader is just the first step toward totally taking control of your phone. Next comes installing a custom recovery like twrp which will allow you to root your phone and do tons of other cool things with it. I’ve already done both and will cover in detail how I did it in my next post. Until then …

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)