[GUIDE]How to root Moto G4 (Moto G 2016) the right way or fix a bad attempted root

Search This thread

acejavelin

Inactive Recognized Contributor
Trying to root Nougat (Android 7)? Then read the comments at the bottom please...

I will first state I do NOT own a Moto G4, I own the G3 and the X Pure which are both 3rd Gen devices, but I was requested to write this tutorial by a few users here due to lots of failed root attempts using older "standard" methods that do not work on this device. I also do not like the "one click" root methods, because they can and do fail (KingoRoot will brick a Moto G3/4, regardless of what it's web page says), and when they do people have no idea how to fix it. The manual way is not difficult, and it teaches you how to work on, fix, and use your device on a level above that of the average smartphone user.

I will only cover rooting, the prerequisites are covered elsewhere in detail and I will link to reliable sources for the information. Specifics of the prerequisites are outside of the scope of this tutorial, but are open for discussion in this thread. Remember, I do not own this device although the methods used are the same as similar devices.

Prerequisites:

0) Be running Marshmallow (Android 6.x) stock ROM, at this time Nougat (Android 7.x) is not working via any method.

1) Device must have an unlocked bootloader. See Moto - Unlocking the Bootloader for more info.
NOTE: As of 7/18/2016, Amazon ad-subsidised Moto G 4th Gen devices cannot be bootloader unlocked, therefore they cannot be rooted. Sorry, Lollipop and newer Android security changes pretty much put an end to that.

2) You need to have TWRP installed or one-time booted via fastboot. CWM and other recoveries will NOT work at this time. See TWRP's Moto G 2016 page

3) You need a copy of the latest stable SuperSU ZIP from Chainfire's site on the internal storage or SD card of your device. SR1-SuperSU-v2.78-SR1-20160915123031.zip is the lastest version verified to work with this method.
Note: Do NOT use any 2.77 version, it was a beta intended specifically for the SG Note 7 and will not work, it does not harm but fails to root.

4) Reboot and start TWRP recovery, and PERFORM A COMPLETE BACKUP IN TWRP (Nandroid)!!!

How to do it:

Now, the procedure is the same whether you are trying to root the first time, or you did it the old way just flashing SuperSU and are now not able to boot...

In TWRP, go to Advanced and open the Terminal, in the terminal type this EXACTLY as shown:

Code:
echo SYSTEMLESS=true>>/data/.supersu

Now press enter (there is no confirmation returned), then exit and press the Home key. Go to Install and select the SuperSU zip file you downloaded from Prerequisite #3 and swipe to flash it and reboot. No need to clear caches or anything else but you are welcome to if you wish. You can install SuperSU updates normally through the app going forward (as of this posting).

Why do I have to do this???

For whatever reason, the install script for SuperSU does not recognize that this device (like many others) requires a systemless root installation. By creating /data/.supersu in the TWRP recovery environment, the SuperSU install script parses the file and sees "SYSTEMLESS=true" and ignores what it auto-detects and forces a systemless root installation.

Hope this is helpful to someone!

As always, if this is the first time you have booted TWRP or attempted root... BACKUP IN TWRP FIRST!!! Once the system is modified, it cannot be undone (easily) and you will always have a known good starting place if the worst happens.

EDIT: Photos added showing what a proper command and flash should look like. Note that in picture 1 the exit command is not needed, you can just back out. In pictures 2 and 3 a proper flash of SuperSU is shown, note that system-less mode is specified and the boot image is patched, this is what should occur. It is normal for it to loop once or twice, but that is it, first boot could take 10 minutes plus.

Notes on Nougat/Android 7... At this time this method of rooting does not work properly on the official Nougat ROM for this device, it causes WiFi issues and interface problems (settings crashes, etc) and with no complete factory image there is no work fix other than to restore your Nandroid backup to pre-root status. If you wish to play with this method and try it, your on your own, I will try to assist but as I stated earlier I do not own this device. To my knowledge as of this posting, there is no working root on stock Android 7 on this device.
 

Attachments

  • twrp_systemless.jpg
    twrp_systemless.jpg
    107.4 KB · Views: 9,209
  • SuperSU_flash1.jpg
    SuperSU_flash1.jpg
    133.8 KB · Views: 9,075
  • SuperSU_flash2.jpg
    SuperSU_flash2.jpg
    92.5 KB · Views: 9,002
Last edited:

maxawesome

Senior Member
Apr 25, 2008
448
29
Seattle
This is exactly what was missing! I rooted as normal with the latest SuperSU expecting it to just work like on other phones/tablets, but yeah. Before specifying systemless, it hung on boot. After following your instructions it booted right up. Thanks!
 

rodalpho

Senior Member
Sep 17, 2013
61
17
Also if you setup adaptable storage with your SDcard, so it works like internal storage, TWRP can't find any files on the SDcard. You will need to revert to non-adaptable storage for TWRP to find the supersu ZIP file.

And make sure you're using the latest SuperSU-- I accidentally tried a very old version which did not work!
 
  • Like
Reactions: porag07

cuvtixo

Member
Jun 30, 2016
16
3
Scared Noobie

I should probably be posting this on some noobie forum, but I read Motorola's "Unlock Your Bootloader" and it scared the **** out of me. Can someone give me a ballpark figure of the chances of bricking the phone? (I know this particular phone is new, but I'm just looking for a rough estimate. How common is it generally to brick a phone just from unlocking the bootloader?)
 

acejavelin

Inactive Recognized Contributor
I should probably be posting this on some noobie forum, but I read Motorola's "Unlock Your Bootloader" and it scared the **** out of me. Can someone give me a ballpark figure of the chances of bricking the phone? (I know this particular phone is new, but I'm just looking for a rough estimate. How common is it generally to brick a phone just from unlocking the bootloader?)
It's about as common as bring bricked from performing a factory reset, because that is the only part that really does much... So extremely rare, but the possibility is always there. Remember to have patience, the resets and wipes can take what seems like forever.

The dangerous part is what you do after the bootloader is unlocked. :)

Sent from my MotoG3 using Tapatalk
 

Caltinpla

Senior Member
Sep 16, 2014
1,250
455
Garden State
I should probably be posting this on some noobie forum, but I read Motorola's "Unlock Your Bootloader" and it scared the **** out of me. Can someone give me a ballpark figure of the chances of bricking the phone? (I know this particular phone is new, but I'm just looking for a rough estimate. How common is it generally to brick a phone just from unlocking the bootloader?)


Very rare...all you need is read, read, read and follow the instructions. Good luck
 
  • Like
Reactions: cuvtixo

LinuxHippy

Senior Member
Nov 14, 2012
250
24
Philadelphia, PA
Very nice and just what I needed. Worked perfectly on my Amazon Moto G4 with ads. I got no errors or messages but booted fine-got caught in a boot loop once as the SuperSU file explains after it installs. Boots in less then a minute first time.

Marty
 
  • Like
Reactions: cuvtixo

Tomsgt

Senior Member
It's about as common as bring bricked from performing a factory reset, because that is the only part that really does much... So extremely rare, but the possibility is always there. Remember to have patience, the resets and wipes can take what seems like forever.

The dangerous part is what you do after the bootloader is unlocked. :)

Sent from my MotoG3 using Tapatalk

Hey i wiped this up based on your post it should really help. it completely automates the process check it out if you want to and you can also ad it to the OP if you want to.
DOWNLOAD TOOL HERE Root-moto-g-4th-gen
 

zipjay

New member
Jul 18, 2016
4
0
I signed up for xda just to give you props! I rooted my phone using instructions not from here and i was suck in a boot loop. your little command there fixed it! I freakin love you.. wish i could buy you dinner! Thanks a million :)
 

acejavelin

Inactive Recognized Contributor
I signed up for xda just to give you props! I rooted my phone using instructions not from here and i was suck in a boot loop. your little command there fixed it! I freakin love you.. wish i could buy you dinner! Thanks a million :)
Your welcome... Just give click thanks on the first post, but if you feel absolutely compelled to buy me dinner, there is the Donate button. :)

Sent from my MotoG3 using Tapatalk
 
  • Like
Reactions: Lukitron

mikeruss

Member
Jan 11, 2011
44
8
I rooted my G4 in the normal way using supersu 2.46, and now boot hangs on the white Moto screen. (advice from another site)

I am waiting for a SD card to update to 2.76 with the systemless command.
Is there anything else I can do in the interim, I tried deleting the contents of /supersu from Twrp and that hasnt made any difference. I have also wiped data and caches.
thanks .. Mike
 

acejavelin

Inactive Recognized Contributor
I rooted my G4 in the normal way using supersu 2.46, and now boot hangs on the white Moto screen. (advice from another site)

I am waiting for a SD card to update to 2.76 with the systemless command.
Is there anything else I can do in the interim, I tried deleting the contents of /supersu from Twrp and that hasnt made any difference. I have also wiped data and caches.
thanks .. Mike
Can't you just use MTP mode of TWRP to copy the latest SuperSU to internal storage then flash after creating the config file?

Sent from my MotoG3 using Tapatalk
 

mikeruss

Member
Jan 11, 2011
44
8
thank you, worked fine.
would I be right in thinking I need the sdk23, arm, 64 bit version of xposed ?
 
Last edited:

acejavelin

Inactive Recognized Contributor
thank you, worked fine.
would I be right in thinking I need the sdk23, arm, 64 bit version of xposed ?
I don't know... I don't own the G4 *yet* but possibly in the near future now that I know the Amazon version can have the ads striped out easily enough... I would do a nandorid and try it, if it fails, restore and use the 32-bit version.

Someone else may have a better answer for you.
 

acejavelin

Inactive Recognized Contributor
Well, I was planning on joining all of you with your Moto G4's soon, or possibly the G4 Plus... but since the Amazon version can't be unlocked anymore I got cold feet, and today Best Buy was running a special on the Moto X Pure 32GB edition for $249 (My Best Buy Elite members only), I pulled the trigger on that one instead. No change in helping though, I didn't have the device to begin with so I will continue to assist with this thread as I can.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 37
    Trying to root Nougat (Android 7)? Then read the comments at the bottom please...

    I will first state I do NOT own a Moto G4, I own the G3 and the X Pure which are both 3rd Gen devices, but I was requested to write this tutorial by a few users here due to lots of failed root attempts using older "standard" methods that do not work on this device. I also do not like the "one click" root methods, because they can and do fail (KingoRoot will brick a Moto G3/4, regardless of what it's web page says), and when they do people have no idea how to fix it. The manual way is not difficult, and it teaches you how to work on, fix, and use your device on a level above that of the average smartphone user.

    I will only cover rooting, the prerequisites are covered elsewhere in detail and I will link to reliable sources for the information. Specifics of the prerequisites are outside of the scope of this tutorial, but are open for discussion in this thread. Remember, I do not own this device although the methods used are the same as similar devices.

    Prerequisites:

    0) Be running Marshmallow (Android 6.x) stock ROM, at this time Nougat (Android 7.x) is not working via any method.

    1) Device must have an unlocked bootloader. See Moto - Unlocking the Bootloader for more info.
    NOTE: As of 7/18/2016, Amazon ad-subsidised Moto G 4th Gen devices cannot be bootloader unlocked, therefore they cannot be rooted. Sorry, Lollipop and newer Android security changes pretty much put an end to that.

    2) You need to have TWRP installed or one-time booted via fastboot. CWM and other recoveries will NOT work at this time. See TWRP's Moto G 2016 page

    3) You need a copy of the latest stable SuperSU ZIP from Chainfire's site on the internal storage or SD card of your device. SR1-SuperSU-v2.78-SR1-20160915123031.zip is the lastest version verified to work with this method.
    Note: Do NOT use any 2.77 version, it was a beta intended specifically for the SG Note 7 and will not work, it does not harm but fails to root.

    4) Reboot and start TWRP recovery, and PERFORM A COMPLETE BACKUP IN TWRP (Nandroid)!!!

    How to do it:

    Now, the procedure is the same whether you are trying to root the first time, or you did it the old way just flashing SuperSU and are now not able to boot...

    In TWRP, go to Advanced and open the Terminal, in the terminal type this EXACTLY as shown:

    Code:
    echo SYSTEMLESS=true>>/data/.supersu

    Now press enter (there is no confirmation returned), then exit and press the Home key. Go to Install and select the SuperSU zip file you downloaded from Prerequisite #3 and swipe to flash it and reboot. No need to clear caches or anything else but you are welcome to if you wish. You can install SuperSU updates normally through the app going forward (as of this posting).

    Why do I have to do this???

    For whatever reason, the install script for SuperSU does not recognize that this device (like many others) requires a systemless root installation. By creating /data/.supersu in the TWRP recovery environment, the SuperSU install script parses the file and sees "SYSTEMLESS=true" and ignores what it auto-detects and forces a systemless root installation.

    Hope this is helpful to someone!

    As always, if this is the first time you have booted TWRP or attempted root... BACKUP IN TWRP FIRST!!! Once the system is modified, it cannot be undone (easily) and you will always have a known good starting place if the worst happens.

    EDIT: Photos added showing what a proper command and flash should look like. Note that in picture 1 the exit command is not needed, you can just back out. In pictures 2 and 3 a proper flash of SuperSU is shown, note that system-less mode is specified and the boot image is patched, this is what should occur. It is normal for it to loop once or twice, but that is it, first boot could take 10 minutes plus.

    Notes on Nougat/Android 7... At this time this method of rooting does not work properly on the official Nougat ROM for this device, it causes WiFi issues and interface problems (settings crashes, etc) and with no complete factory image there is no work fix other than to restore your Nandroid backup to pre-root status. If you wish to play with this method and try it, your on your own, I will try to assist but as I stated earlier I do not own this device. To my knowledge as of this posting, there is no working root on stock Android 7 on this device.
    9
    It's about as common as bring bricked from performing a factory reset, because that is the only part that really does much... So extremely rare, but the possibility is always there. Remember to have patience, the resets and wipes can take what seems like forever.

    The dangerous part is what you do after the bootloader is unlocked. :)

    Sent from my MotoG3 using Tapatalk

    Hey i wiped this up based on your post it should really help. it completely automates the process check it out if you want to and you can also ad it to the OP if you want to.
    DOWNLOAD TOOL HERE Root-moto-g-4th-gen
    2
    I can confirm this worked on my formerly-amazon XT1625 16GB G4. You will get an error about not being able to mount /data, but it proceeds and works anyway.
    2
    Found a solution. It seems crazy but while the "official" link is dead, the links for the separate countries do work. So for me this worked:

    https://motorola-global-portal-de.custhelp.com/app/standalone/bootloader/unlock-your-device-a

    Mind the "-de" in the url...
    2
    Appreciate this. I miss the old days where it was all simple. Everything was flashable. Never had to flash back to something or re flash.