[ROOT][TWRP][BOOTLOADER UNLOCK] Moto G5s Plus [sanders]

Search This thread

shu006

Senior Member
Jul 27, 2013
87
137
Kanpur
The best way in which you can obtain the best results from a mid-range Android powered smartphone is by using a rooted system. And since the Moto G5s Plus is one of the best budget-based Android Nougat powered smartphone I strongly recommend you to root its internal system in order to unleash its true potential. So, as you can tell, during the lines from below I will show you how to easily gain root access on your new Motorola Moto G5s Plus.

Root_Moto_G5s_Plus.jpg

Code:
#include 
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */

Steps
  1. Unlocking Bootloader
  2. Flashing TWRP recovery
  3. Flashing Magisk (For Root)
Make sure your battery is over 80% before starting.

Step 1 - (Unlocking Bootloader)


Prerequisites
  • Phone (Moto G5s Plus)
  • USB Cable
  • Minimal ADB and Fastboot (See Download Section For Download Link)

Steps To Unlock Bootloader
  • Download and extract Minimal ADB and Fastboot driver on your PC
  • Enable developer option on phone ( Tap “Build number” {under About Phone} seven times to enable Developer option ).
  • Enable OEM unlock and USB debugging under developer option.
  • Boot your phone into fastboot mode ( Frist power off your phone then press Volume Down Button and Power button simultaneously and hold it for few seconds. You will be into Fastboot mode.)
  • Connect phone to PC with USB cable.
  • Now open the folder where you extracted ADB driver and hold Shift key on your keyboard and right click anywhere. Now click Open Command Prompt Here.
  • Now run this command
    Code:
    fastboot oem get_unlock_data
    The returned string will be used to retrieve your unlock key.
    Example Output:
    Code:
    On a Windows Desktop, the returned string format would be
    $ fastboot oem get_unlock_data
    (bootloader) 0A40040192024205#4C4D3556313230
    (bootloader) 30373731363031303332323239#BD00
    (bootloader) 8A672BA4746C2CE02328A2AC0C39F95
    (bootloader) 1A3E5#1F53280002000000000000000
    (bootloader) 0000000
    
    On a Mac OS Desktop, the returned string format would be
    INFO0A40040192024205#4C4D3556313230
    INFO30373731363031303332323239#BD00
    INFO8A672BA4746C2CE02328A2AC0C39F95
    INFO1A3E5#1F53280002000000000000000
    INFO0000000
  • Now visit Moto Bootloader Unlock website. Agree terms and conditions. Now create or login account.
  • On next page paste together the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. (Or Use Moto Data Scrub Tool if you can't do this simple job) Your string needs to look like this:
    Code:
    0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000
  • Paste the code obtained in Moto website.
  • Now Click on the I Agree Button a Get Unlock Code will appear on the screen. And click the button.
  • Now you will get your unlock key by email. Check your inbox and get the key.
  • Now again go to the Command Prompt screen and type this code
    Code:
    fastboot oem unlock ************
    (Replace stars with your unlock key)
  • A warning screen will appear in command just retype the same command and hit enter.
  • Type this code and your phone will reboot.
    Code:
    fastboot reboot
  • Done! Your bootloader has been unlocked.

Follow This guide if you want to remove Boot loader Unlocked Warning in startup. Remove Unlocked Bootloader Message Moto G5S Plus, G5S

Step 2- (Flashing TWRP recovery and Rooting)

Prerequisites

  • Unlocked Bootloader
  • Minimal ADB and Fastboot (Not need to download if you already downloaded while unlocking bootloader)
  • TWRP 3.1.1-0 image for Moto G5s Plus (Downlod link below)
  • Magisk 14.0 zip file (Download link below) (Magisk Hide and modules are not working in Magisk 14.0 with our G5s Plus, Superuser is working fine.)

Steps to flash TWRP Recovery.

  • Download and copy recovery image to ADB driver folder.
  • Open command promt on ADB folder.
  • Run this command
    Code:
    fastboot flash recovery twrp-3.1.1-sanders.img
  • Now run this command
    Code:
    fastboot reboot recovery
  • Now you will be booted in TWRP recovery.
  • Create a complete backup in this step. Do not do anything without taking backup
  • Now connect your phone to PC. You will see Moto Z storage. Move TWRP backup to PC from your phone. Also move music, images, video and everything to your PC.
  • Now go to wipe in TWRP and wipe data.
  • Now copy Magisk zip from PC to Phone.
  • Now go to install and select Magisk zip and flash. Now reboot to system.

Now you are rooted.

Download Section

Special Thanks


@GeneticEnginer For creating TWRP for Moto G5s Plus.

Note: This root method is founded by @GeneticEnginer and posted by me with his permission.

Extra Guides:
Appreciate my work?
It is a very hard task to work over mobile data. Please consider making a donation If this guide helped you.
Paypal https://paypal.me/shubhmishra
 
Last edited:

rivake

New member
Aug 31, 2020
1
0
The best way in which you can obtain the best results from a mid-range Android powered smartphone is by using a rooted system. And since the Moto G5s Plus is one of the best budget-based Android Nougat powered smartphone I strongly recommend you to root its internal system in order to unleash its true potential. So, as you can tell, during the lines from below I will show you how to easily gain root access on your new Motorola Moto G5s Plus.

Root_Moto_G5s_Plus.jpg

Code:
#include 
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */

Steps
  1. Unlocking Bootloader
  2. Flashing TWRP recovery
  3. Flashing Magisk (For Root)
Make sure your battery is over 80% before starting.

Step 1 - (Unlocking Bootloader)


Prerequisites
  • Phone (Moto G5s Plus)
  • USB Cable
  • Minimal ADB and Fastboot (See Download Section For Download Link)

Steps To Unlock Bootloader
  • Download and extract Minimal ADB and Fastboot driver on your PC
  • Enable developer option on phone ( Tap “Build number” {under About Phone} seven times to enable Developer option ).
  • Enable OEM unlock and USB debugging under developer option.
  • Boot your phone into fastboot mode ( Frist power off your phone then press Volume Down Button and Power button simultaneously and hold it for few seconds. You will be into Fastboot mode.)
  • Connect phone to PC with USB cable.
  • Now open the folder where you extracted ADB driver and hold Shift key on your keyboard and right click anywhere. Now click Open Command Prompt Here.
  • Now run this command
    Code:
    fastboot oem get_unlock_data
    The returned string will be used to retrieve your unlock key.
    Example Output:
    Code:
    On a Windows Desktop, the returned string format would be
    $ fastboot oem get_unlock_data
    (bootloader) 0A40040192024205#4C4D3556313230
    (bootloader) 30373731363031303332323239#BD00
    (bootloader) 8A672BA4746C2CE02328A2AC0C39F95
    (bootloader) 1A3E5#1F53280002000000000000000
    (bootloader) 0000000
    
    On a Mac OS Desktop, the returned string format would be
    INFO0A40040192024205#4C4D3556313230
    INFO30373731363031303332323239#BD00
    INFO8A672BA4746C2CE02328A2AC0C39F95
    INFO1A3E5#1F53280002000000000000000
    INFO0000000
  • Now visit Moto Bootloader Unlock website. Agree terms and conditions. Now create or login account.
  • On next page paste together the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. (Or Use Moto Data Scrub Tool if you can't do this simple job) Your string needs to look like this:
    Code:
    0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000
  • Paste the code obtained in Moto website.
  • Now Click on the I Agree Button a Get Unlock Code will appear on the screen. And click the button.
  • Now you will get your unlock key by email. Check your inbox and get the key.
  • Now again go to the Command Prompt screen and type this code
    Code:
    fastboot oem unlock ************
    (Replace stars with your unlock key)
  • A warning screen will appear in command just retype the same command and hit enter.
  • Type this code and your phone will reboot.
    Code:
    fastboot reboot
  • Done! Your bootloader has been unlocked.

Follow This guide if you want to remove Boot loader Unlocked Warning in startup. Remove Unlocked Bootloader Message Moto G5S Plus, G5S

Step 2- (Flashing TWRP recovery and Rooting)

Prerequisites

  • Unlocked Bootloader
  • Minimal ADB and Fastboot (Not need to download if you already downloaded while unlocking bootloader)
  • TWRP 3.1.1-0 image for Moto G5s Plus (Downlod link below)
  • Magisk 14.0 zip file (Download link below) (Magisk Hide and modules are not working in Magisk 14.0 with our G5s Plus, Superuser is working fine.)

Steps to flash TWRP Recovery.

  • Download and copy recovery image to ADB driver folder.
  • Open command promt on ADB folder.
  • Run this command
    Code:
    fastboot flash recovery twrp-3.1.1-sanders.img
  • Now run this command
    Code:
    fastboot reboot recovery
  • Now you will be booted in TWRP recovery.
  • Create a complete backup in this step. Do not do anything without taking backup
  • Now connect your phone to PC. You will see Moto Z storage. Move TWRP backup to PC from your phone. Also move music, images, video and everything to your PC.
  • Now go to wipe in TWRP and wipe data.
  • Now copy Magisk zip from PC to Phone.
  • Now go to install and select Magisk zip and flash. Now reboot to system.

Now you are rooted.

Download Section

Special Thanks


@GeneticEnginer For creating TWRP for Moto G5s Plus.

Note: This root method is founded by @GeneticEnginer and posted by me with his permission.

Extra Guides:
Appreciate my work?
It is a very hard task to work over mobile data. Please consider making a donation If this guide helped you.
Paypal https://paypal.me/shubhmishra

Thanks for the guide, will I be able to use stream bank apps if I have unlocked the bootloader and rooted the deivce?
 

Premkrishna

Senior Member
Jun 15, 2017
76
17
Chennai
Excellent tutorial. Great Job @GeneticEnginer.

---------- Post added at 06:21 AM ---------- Previous post was at 06:19 AM ----------

The best way in which you can obtain the best results from a mid-range Android powered smartphone is by using a rooted system. And since the Moto G5s Plus is one of the best budget-based Android Nougat powered smartphone I strongly recommend you to root its internal system in order to unleash its true potential. So, as you can tell, during the lines from below I will show you how to easily gain root access on your new Motorola Moto G5s Plus.





Steps
Unlocking Bootloader
Flashing TWRP recovery
Flashing Magisk (For Root)

Make sure your battery is over 80% before starting.

Step 1 - (Unlocking Bootloader)

Prerequisites
Phone (Moto G5s Plus)
USB Cable
Minimal ADB and Fastboot (See Download Section For Download Link)


Steps To Unlock Bootloader
Download and extract Minimal ADB and Fastboot driver on your PC
Enable developer option on phone ( Tap “Build number” {under About Phone} seven times to enable Developer option ).
Enable OEM unlock and USB debugging under developer option.
Boot your phone into fastboot mode ( Frist power off your phone then press Volume Down Button and Power button simultaneously and hold it for few seconds. You will be into Fastboot mode.)
Connect phone to PC with USB cable.
Now open the folder where you extracted ADB driver and hold Shift key on your keyboard and right click anywhere. Now click Open Command Prompt Here.
Now run this command

The returned string will be used to retrieve your unlock key.
Example Output:

Now visit Moto Bootloader Unlock website. Agree terms and conditions. Now create or login account.
On next page paste together the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. (Or Use Moto Data Scrub Tool if you can't do this simple job) Your string needs to look like this:
Paste the code obtained in Moto website.
Now Click on the I Agree Button a Get Unlock Code will appear on the screen. And click the button.
Now you will get your unlock key by email. Check your inbox and get the key.
Now again go to the Command Prompt screen and type this code

(Replace stars with your unlock key)
A warning screen will appear in command just retype the same command and hit enter.
Type this code and your phone will reboot.

Done! Your bootloader has been unlocked.


Follow This guide if you want to remove Boot loader Unlocked Warning in startup. Remove Unlocked Bootloader Message Moto G5S Plus, G5S

Step 2- (Flashing TWRP recovery and Rooting)

Prerequisites

Unlocked Bootloader
Minimal ADB and Fastboot ( Not need to download if you already downloaded while unlocking bootloader)
TWRP 3.1.1-0 image for Moto G5s Plus ( Downlod link below)
Magisk zip file ( Downlod link below)


Steps to flash TWRP Recovery.
Download and copy recovery image to ADB driver folder.
Open command promt on ADB folder.
Run this command

Now run this command

Now you will be booted in TWRP recovery.
Create a complete backup in this step. Do not do anything without taking backup
Now connect your phone to PC. You will see Moto Z storage. Move TWRP backup to to PC from your phone. Also move music, images, video and everything to your PC.
Now go to wipe in TWRP and wipe data.
Now copy Magisk zip from PC to Phone.
Now go to install and select Magisk zip and flash. Now reboot to system.


Now you are rooted.

Download Section
Minimal ADB size: 628.5KB
TWRP Recovery size: 9.99MB
Magisk zip size: 5.5MB


Special Thanks
@GeneticEnginer For creating TWRP for Moto G5s Plus.

Note: This root method is founded by @GeneticEnginer and posted by me with his permission.
Seems like you have chanhed your font? Which app do you recommend. At present i am using FONTSTER.
 

Manan44

Senior Member
Aug 15, 2016
134
37
Victoria
I'm on Windows 8 and I'm just getting 4 lines of unlock code, is that possible? I tried copying the code and pasting in the website's column, but it didn't work. Also, fastboot reboot command shows OKAY! but the phone doesn't actually reboot. Solution?
 

shu006

Senior Member
Jul 27, 2013
87
137
Kanpur
I'm on Windows 8 and I'm just getting 4 lines of unlock code, is that possible? I tried copying the code and pasting in the website's column, but it didn't work. Also, fastboot reboot command shows OKAY! but the phone doesn't actually reboot. Solution?

Lines doesn't matter. Just remove every #.
And if command dont reboot then just reboot by pressing power button. There is nothing to worry.
 

nd4spdbh

Senior Member
Jul 23, 2011
432
79
[*]Now go to install and select Magisk zip and flash. Now reboot to system.
[/LIST]



Note:
  • Magisk v12.0 modules works, but you need to install modules throught twrp only, for removing modules you need to mount /data/magisk.img to any empty folder like /oem in twrp and delete the module folder.
  • Before flashing this v12, flash the magisk uninstaller zip found on magisks official thread and then flash this v12

Note: This root method is founded by @GeneticEnginer and posted by me with his permission.



Im lost at what you are trying to say here. Which Magisks do i flash?
 

Schrotty35

Senior Member
Oct 30, 2010
4,407
616
Vienna
After i flash trwp and reboot to recovery i must enter a passwort but dont have it. I ignored and press return and i in the recovery now. Now i wipe data and reboot again in twrp but whene i make a full backup i get only a error.

Supersu also not work, can not install. get aborting.
 
Last edited:

shu006

Senior Member
Jul 27, 2013
87
137
Kanpur
After i flash trwp and reboot to recovery i must enter a passwort but dont have it. I ignored and press return and i in the recovery now. Now i wipe data and reboot again in twrp but whene i make a full backup i get only a error.

Supersu also not work, can not install. get aborting.
U missed 9th step after flashing recovery. You must have to clear data after flashing recovery. And supersu is not working with moto g5s plus.. Use magisk. All steps are clearly mentioned in op.
 

qngage12

New member
Oct 7, 2017
3
0
been following your guide in unlocking the bootloader... up until "fastboot oem get_unlock_data" the command prompt replied with nothing...

any help is appreciated :)

edit 1:
in turned out that i need a different PC to do this... dunno why... tho i've tried with some other USB in my previous laptop...

progress 1:
now the command "fastboot reboot recovery" didnt make me boot into recovery... i can boot into phone normally...
tried power + vol up = boots normally;
power + vol down = the old moto bootloader/fastboot menu;
tried power + vol down + vol up = the old moto bootloader/fastboot menu
in the old moto fastboot menu, tried the recovery option, but when i got there, no option at all

tracing back to flashing recovery:
"E:\Download\Android\G5s\ADB>fastboot flash recovery twrp-3.1.1-sanders.img
target reported max download size of 536870912 bytes
sending 'recovery' (10236 KB)...
OKAY [ 0.261s]
writing 'recovery'...
(bootloader) Image not signed or corrupt
OKAY [ 0.229s]
finished. total time: 0.491s"
is that normal?

progress 2:
tried different twrp image from other source, and tried your guide again... now i can boot to TWRP...
and rooted... thx for the guyide :)
 
Last edited:

mikenlob

New member
Mar 7, 2015
4
0
tracing back to flashing recovery:
"E:\Download\Android\G5s\ADB>fastboot flash recovery twrp-3.1.1-sanders.img
target reported max download size of 536870912 bytes
sending 'recovery' (10236 KB)...
OKAY [ 0.261s]
writing 'recovery'...
(bootloader) Image not signed or corrupt
OKAY [ 0.229s]
finished. total time: 0.491s"
is that normal?

I tried to different versions of Twrp from two sources, and I get the message about image not signed our corrupt. I even tried flashing the stock recovery and it won't let me do that. Unlocking the bootloader went fine. Any help is appreciated.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 47
    The best way in which you can obtain the best results from a mid-range Android powered smartphone is by using a rooted system. And since the Moto G5s Plus is one of the best budget-based Android Nougat powered smartphone I strongly recommend you to root its internal system in order to unleash its true potential. So, as you can tell, during the lines from below I will show you how to easily gain root access on your new Motorola Moto G5s Plus.

    Root_Moto_G5s_Plus.jpg

    Code:
    #include 
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

    Steps
    1. Unlocking Bootloader
    2. Flashing TWRP recovery
    3. Flashing Magisk (For Root)
    Make sure your battery is over 80% before starting.

    Step 1 - (Unlocking Bootloader)


    Prerequisites
    • Phone (Moto G5s Plus)
    • USB Cable
    • Minimal ADB and Fastboot (See Download Section For Download Link)

    Steps To Unlock Bootloader
    • Download and extract Minimal ADB and Fastboot driver on your PC
    • Enable developer option on phone ( Tap “Build number” {under About Phone} seven times to enable Developer option ).
    • Enable OEM unlock and USB debugging under developer option.
    • Boot your phone into fastboot mode ( Frist power off your phone then press Volume Down Button and Power button simultaneously and hold it for few seconds. You will be into Fastboot mode.)
    • Connect phone to PC with USB cable.
    • Now open the folder where you extracted ADB driver and hold Shift key on your keyboard and right click anywhere. Now click Open Command Prompt Here.
    • Now run this command
      Code:
      fastboot oem get_unlock_data
      The returned string will be used to retrieve your unlock key.
      Example Output:
      Code:
      On a Windows Desktop, the returned string format would be
      $ fastboot oem get_unlock_data
      (bootloader) 0A40040192024205#4C4D3556313230
      (bootloader) 30373731363031303332323239#BD00
      (bootloader) 8A672BA4746C2CE02328A2AC0C39F95
      (bootloader) 1A3E5#1F53280002000000000000000
      (bootloader) 0000000
      
      On a Mac OS Desktop, the returned string format would be
      INFO0A40040192024205#4C4D3556313230
      INFO30373731363031303332323239#BD00
      INFO8A672BA4746C2CE02328A2AC0C39F95
      INFO1A3E5#1F53280002000000000000000
      INFO0000000
    • Now visit Moto Bootloader Unlock website. Agree terms and conditions. Now create or login account.
    • On next page paste together the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. (Or Use Moto Data Scrub Tool if you can't do this simple job) Your string needs to look like this:
      Code:
      0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000
    • Paste the code obtained in Moto website.
    • Now Click on the I Agree Button a Get Unlock Code will appear on the screen. And click the button.
    • Now you will get your unlock key by email. Check your inbox and get the key.
    • Now again go to the Command Prompt screen and type this code
      Code:
      fastboot oem unlock ************
      (Replace stars with your unlock key)
    • A warning screen will appear in command just retype the same command and hit enter.
    • Type this code and your phone will reboot.
      Code:
      fastboot reboot
    • Done! Your bootloader has been unlocked.

    Follow This guide if you want to remove Boot loader Unlocked Warning in startup. Remove Unlocked Bootloader Message Moto G5S Plus, G5S

    Step 2- (Flashing TWRP recovery and Rooting)

    Prerequisites

    • Unlocked Bootloader
    • Minimal ADB and Fastboot (Not need to download if you already downloaded while unlocking bootloader)
    • TWRP 3.1.1-0 image for Moto G5s Plus (Downlod link below)
    • Magisk 14.0 zip file (Download link below) (Magisk Hide and modules are not working in Magisk 14.0 with our G5s Plus, Superuser is working fine.)

    Steps to flash TWRP Recovery.

    • Download and copy recovery image to ADB driver folder.
    • Open command promt on ADB folder.
    • Run this command
      Code:
      fastboot flash recovery twrp-3.1.1-sanders.img
    • Now run this command
      Code:
      fastboot reboot recovery
    • Now you will be booted in TWRP recovery.
    • Create a complete backup in this step. Do not do anything without taking backup
    • Now connect your phone to PC. You will see Moto Z storage. Move TWRP backup to PC from your phone. Also move music, images, video and everything to your PC.
    • Now go to wipe in TWRP and wipe data.
    • Now copy Magisk zip from PC to Phone.
    • Now go to install and select Magisk zip and flash. Now reboot to system.

    Now you are rooted.

    Download Section

    Special Thanks


    @GeneticEnginer For creating TWRP for Moto G5s Plus.

    Note: This root method is founded by @GeneticEnginer and posted by me with his permission.

    Extra Guides:
    Appreciate my work?
    It is a very hard task to work over mobile data. Please consider making a donation If this guide helped you.
    Paypal https://paypal.me/shubhmishra
    3
    How can i relock the bootloader?
    Flash stock rom and use this command
    fastboot oem lock
    3
    [*]TWRP 3.1.1-0 image for Moto G5s Plus (Downlod link below)
    Sir, your guide is being a source of error for many !
    The TWRP that you've provided is 3.1.1 which doesn't support 64bit flashing & persist backup.
    The efs backed up using this twrp can't be flashed from other (3.2+).
    I suggest you update the twrp to 3.2.1_r21 atleast which supports persist backup !
    Further, give an advice on backing up efs & persist, because your guide is the starting point for many, and the persist is being corrupted on installing some custom ROMs.
    2
    After i flash trwp and reboot to recovery i must enter a passwort but dont have it. I ignored and press return and i in the recovery now. Now i wipe data and reboot again in twrp but whene i make a full backup i get only a error.

    Supersu also not work, can not install. get aborting.
    U missed 9th step after flashing recovery. You must have to clear data after flashing recovery. And supersu is not working with moto g5s plus.. Use magisk. All steps are clearly mentioned in op.
    2
    I did. "unknown reboot target recovery"

    Also: "has slot: recovery: not found"???

    Recovery is getting flashed correctly, use volume key to navigate to recovery option and power key to boot.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone