FORUMS
Remove All Ads from XDA

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

5,960 posts
Thanks Meter: 2,770
 
By acejavelin, Recognized Contributor on 13th July 2016, 03:45 PM
Post Reply Email Thread
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.
Attached Thumbnails
Click image for larger version

Name:	twrp_systemless.jpg
Views:	6646
Size:	107.4 KB
ID:	3892725   Click image for larger version

Name:	SuperSU_flash1.jpg
Views:	6544
Size:	133.8 KB
ID:	3892726   Click image for larger version

Name:	SuperSU_flash2.jpg
Views:	6484
Size:	92.5 KB
ID:	3892727  
The Following 37 Users Say Thank You to acejavelin For This Useful Post: [ View ] Gift acejavelin Ad-Free
 
 
14th July 2016, 12:44 AM |#2  
Member
Thanks Meter: 13
 
More
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.
The Following 2 Users Say Thank You to rodalpho For This Useful Post: [ View ] Gift rodalpho Ad-Free
14th July 2016, 03:36 PM |#3  
maxawesome's Avatar
Senior Member
Flag Seattle
Thanks Meter: 28
 
More
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!
14th July 2016, 05:00 PM |#4  
Member
Thanks Meter: 13
 
More
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!
The Following User Says Thank You to rodalpho For This Useful Post: [ View ] Gift rodalpho Ad-Free
16th July 2016, 03:10 AM |#5  
Junior Member
Thanks Meter: 1
 
More
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?)
16th July 2016, 04:53 AM |#6  
Senior Member
Thanks Meter: 18
 
More
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.
The Following User Says Thank You to MustangLife03 For This Useful Post: [ View ] Gift MustangLife03 Ad-Free
16th July 2016, 11:41 AM |#7  
acejavelin's Avatar
OP Recognized Contributor
Flag Bismarck, ND
Thanks Meter: 2,770
 
Donate to Me
More
Quote:
Originally Posted by cuvtixo

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
16th July 2016, 01:42 PM |#8  
Senior Member
Thanks Meter: 75
 
More
Quote:
Originally Posted by cuvtixo

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
The Following User Says Thank You to Caltinpla For This Useful Post: [ View ] Gift Caltinpla Ad-Free
17th July 2016, 10:42 PM |#9  
LinuxHippy's Avatar
Senior Member
Flag Philadelphia, PA
Thanks Meter: 23
 
More
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
The Following User Says Thank You to LinuxHippy For This Useful Post: [ View ] Gift LinuxHippy Ad-Free
18th July 2016, 03:34 AM |#10  
Quote:
Originally Posted by acejavelin

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
The Following 9 Users Say Thank You to Tomsgt For This Useful Post: [ View ] Gift Tomsgt Ad-Free
18th July 2016, 09:23 AM |#11  
Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by Tomsgt

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

cheers mate
Post Reply Subscribe to Thread

Tags
moto g 2016, root, supersu, systemless, twrp

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes