• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[TOOLKIT] [WIN | LINUX | MAC] Moto G5 Plus Toolkit | Root | Unlock | Backup | Unbrick

Search This thread

drtechie

Member
Nov 22, 2012
24
128
Gurgaon
Moto G5 Plus Toolkit

This is a desktop app that allows you to unlock the bootloader and root a Motorola G5 Plus smartphone with a few button clicks. It's built with Electron and hence will work on Windows, macOS and Linux operating systems.

The toolkit follows the unlocking and rooting procedure for Motorola G5 Plus mentioned here.


Features
* No need of installing ADB and Fastboot binaries
* Works on Windows , Linux, and macOS
* Get bootloader unlock data from device
* Send bootloader unique key to device for unlocking
* Flash TWRP Recovery
* Flash SuperSU
* Commonly used ADB and Fastboot commands
* Bundled drivers for Windows
* Create and Restore backups with button clicks
* Flash any TWRP compatible ZIP
* Flash stock firmware / un-brick

teEZPG1.png


About the Project

I bought this phone two weeks back and as a web developer, had this idea of combining JavaScript and device communication. The project is built on Electron. The basic UI is adapted from Electron API Demos.
The source is available on Github.

Porting it to another device

Porting the toolkit to another device is easy. Change a few strings, variables and necessary files like recovery image and you are done. After all every phone can communicate with your computer with ADB or Fastboot.

Credits

This project bundles the work of many other devs.

*@vache for potter TWRP, boot.img and WiFi patch.
*@chainfire for SuperSU.

Downloads
Moto.G5.Toolkit-win32-ia32.zip (92.4MB)
Moto.G5.Toolkit-darwin-x64.zip (98MB)
Moto.G5.Toolkit-linux-x64.zip (87.3MB)


Issues
1. TWRP backups saved to computer might fail to restore. The ones saved to phone work fine.
2. TWRP gets stuck on logo if booted instead of flashed.

If the toolkit helped you, don't forget to click the thanks button!
Buy me lager!

Thanks to all lagers received :)
- Curtis Bullock



XDA:DevDB Information
Moto G5 Plus Toolkit, Tool/Utility for the Moto G5 Plus

Contributors
drtechie
Source Code: https://github.com/drtechie/moto-g5p-toolkit


Version Information
Status: Stable
Current Stable Version: 1.1.0
Stable Release Date: 2017-06-03

Created 2017-05-11
Last Updated 2017-06-03
 

cpthornman

Senior Member
Dec 13, 2014
72
24
Google Pixel 4a
You'll learn the most by doing things manually! Being spoon fed is easy, but not always necessarily the safest way. (someone might give you 'bad food'). I always like to know what command I give!

Nevertheless: nice scripts!

Send from my Motorola Moto G5 Plus (XT1685) using Tapatalk
Agreed. But after a while having to not go through all the steps is pretty nice.

Sent from my Moto G (5) Plus using XDA-Developers Legacy app
 

andynx1

Senior Member
Sep 1, 2010
443
130
Carlisle
Redmi Note 10 Pro
Hi all,

In case anybody is interested, I just used this on my (un-messed with) phone. Mine was a UK, 32/2 gig, dual sim moto 5-plus. Worked perfectly, flawlessly, fantastically! It just worked... Used on Ubuntu linux.

Thanks DrTechie, you're a star dev.

I had been worried about installing TRWP after reading other threads, but this works. And because it's a gui with scripts, there aren't any real instructions to follow - that you could get wrong. Very well designed.

For what it's worth, I chose not to install su. This means it's not truly rooted, and such things as Android Pay should still work. But, with the bootloader unlocked, and a good functioning custom recovery - I can flash any rom I need. And, I can flash su anytime.

:) Thanks!!!
 
  • Like
Reactions: imightbesomeone

drtechie

Member
Nov 22, 2012
24
128
Gurgaon
Porting to another device


1. Clone the git repo
https://github.com/drtechie/moto-g5p-toolkit

2. You will need NodeJS installed and build tools.
Refer to https://electron.atom.io/docs/ build env instructions
Setting up the build enviroment is easiest in Linux.
macOS will need XCode tools and Windows will need Visual Studio etc.
Do npm install to get all Node dependencies.
Build Electron-usb (This checks for usb attach-detach events)

3. In the file main.js L19 you will see global.strings.deviceName = 'potter'
Change 'potter' to your device name.

4. Fire up the app with 'npm start' or 'gulp'
Subsequent ADB and Fastboot requests will check for the new device name.
Hopefully your device should be detected.

5. Then the files - TWRP, SuperSU etc
check main-process/common/files.js
Change the name of the twrp recovery to your new file name twrp-<device>.img or whatever.
Copy the same to files folder.
Now try flashing the recovery.

Now you get the idea, I hope.

6. There are main-process/common/adb.js and fastboot.js which carry out core ADB and Fastboot commands.
File names for SuperSU will have to be changed if you change them.
Some methods are named checkMoto etc. You can change them if you feel so.
 

drtechie

Member
Nov 22, 2012
24
128
Gurgaon
Hi all,

In case anybody is interested, I just used this on my (un-messed with) phone. Mine was a UK, 32/2 gig, dual sim moto 5-plus. Worked perfectly, flawlessly, fantastically! It just worked... Used on Ubuntu linux.

Thanks DrTechie, you're a star dev.

I had been worried about installing TRWP after reading other threads, but this works. And because it's a gui with scripts, there aren't any real instructions to follow - that you could get wrong. Very well designed.

For what it's worth, I chose not to install su. This means it's not truly rooted, and such things as Android Pay should still work. But, with the bootloader unlocked, and a good functioning custom recovery - I can flash any rom I need. And, I can flash su anytime.

:) Thanks!!!

Glad I could help.
I have nothing to do with TWRP. I just copy pasted the file. :) It was developed by @vache.
 

rubiicon59

Senior Member
Mar 8, 2015
854
273
Liverpool
@drtechie re: post #16

Thanks for your time, it's really appreciated.
I'm not a Dev by any means, but I'll have a look through the info you've provided. Maybe, just maybe, I'll be able to understand how to accomplish it.
Wish me luck :D
 

milav

Senior Member
Dec 5, 2010
587
53
Ahmedabad
what is the purpose of flashing custom bootloader? i dont seem to get it. i am yet to receive my mobile but still curiosity. anyone who has experience please elaborate along with hurdles new one might face like me.
thank you
 

Top Liked Posts

  • There are no posts matching your filters.
  • 112
    Moto G5 Plus Toolkit

    This is a desktop app that allows you to unlock the bootloader and root a Motorola G5 Plus smartphone with a few button clicks. It's built with Electron and hence will work on Windows, macOS and Linux operating systems.

    The toolkit follows the unlocking and rooting procedure for Motorola G5 Plus mentioned here.


    Features
    * No need of installing ADB and Fastboot binaries
    * Works on Windows , Linux, and macOS
    * Get bootloader unlock data from device
    * Send bootloader unique key to device for unlocking
    * Flash TWRP Recovery
    * Flash SuperSU
    * Commonly used ADB and Fastboot commands
    * Bundled drivers for Windows
    * Create and Restore backups with button clicks
    * Flash any TWRP compatible ZIP
    * Flash stock firmware / un-brick

    teEZPG1.png


    About the Project

    I bought this phone two weeks back and as a web developer, had this idea of combining JavaScript and device communication. The project is built on Electron. The basic UI is adapted from Electron API Demos.
    The source is available on Github.

    Porting it to another device

    Porting the toolkit to another device is easy. Change a few strings, variables and necessary files like recovery image and you are done. After all every phone can communicate with your computer with ADB or Fastboot.

    Credits

    This project bundles the work of many other devs.

    *@vache for potter TWRP, boot.img and WiFi patch.
    *@chainfire for SuperSU.

    Downloads
    Moto.G5.Toolkit-win32-ia32.zip (92.4MB)
    Moto.G5.Toolkit-darwin-x64.zip (98MB)
    Moto.G5.Toolkit-linux-x64.zip (87.3MB)


    Issues
    1. TWRP backups saved to computer might fail to restore. The ones saved to phone work fine.
    2. TWRP gets stuck on logo if booted instead of flashed.

    If the toolkit helped you, don't forget to click the thanks button!
    Buy me lager!

    Thanks to all lagers received :)
    - Curtis Bullock



    XDA:DevDB Information
    Moto G5 Plus Toolkit, Tool/Utility for the Moto G5 Plus

    Contributors
    drtechie
    Source Code: https://github.com/drtechie/moto-g5p-toolkit


    Version Information
    Status: Stable
    Current Stable Version: 1.1.0
    Stable Release Date: 2017-06-03

    Created 2017-05-11
    Last Updated 2017-06-03
    10
    But how are the newbies supposed to brick their phones now?
    2
    Day late, dollar short... Seriously, nice toolkit. Will there be an update soon now that @vache just released a new TWRP that supports sd mount?
    2
    Once the bootloader is unlocked, there will be a warning when you boot the phone.
    The toolkit runs the fastboot unlock command twice (as required by Motorola) to unlock the bootloader.
    You just click a button instead of running the command. That's all.

    I had received the same warning with and without the toolkit.
    You can go ahead and flash the rest.

    TWRP Recovery is custom recovery.
    SuperSU is for root
    The other 2 files are flashed after unlocking the bootloader.
    wlan_custom is to fix the WiFi after flashing the boot image.

    The toolkit just follows this method described here. Please refer to this thread for more info.

    I used your toolkit to unlock bootloader. When it went into fastboot mode, and then got out, it said "Your device is unlocked, and now cannot be trusted. ID:bad key"

    What is the ID:bad key thing?

    How have I messed up? (or is it your code that has messed up?)

    EDIT: Potter started up BTW. I just want to know if I have done something that will hurt me down the line.

    Also, why do I have to flash TWRP recovery, boot_image, WLAN custom, and then SuperSU? Please explain.

    Thank you.