FORUMS
Remove All Ads from XDA

[GUIDE] [clark] How to root Pure/Style on Marshmallow or correct a bad root attempt

6,748 posts
Thanks Meter: 3,291
 
By acejavelin, Recognized Contributor on 20th November 2016, 04:30 PM
Post Reply Email Thread
It seems no matter how much this topic gets discussed, people still use old methods and they either fail, or they break something like WiFi, Mobile Data, infinite bootloop, or getting stuck on the boot logo... THIS DOESN'T HAVE TO HAPPEN and it IS repairable, usually without reflashing the entire image. The problem comes from using an old method, outdated SuperSU, or incorrect method. This guide will help you correct most issues, or help you to flash root correctly the FIRST time.

I have written rooting guides for multiple Moto device, and I have owned many Moto devices as well, so I have some idea what I am saying and I have tested these methods extensively, they work.
------------------------
This guide covers ALL Moto X 2015 models that can be bootloader unlocked and have TWRP available, it doesn't matter if it is the XT1575 or XT1572, the method is identical (untested on Chinese XT1570, but it should work). In fact, this method will work on all 2015 and 2016 series Moto phones running Marshmallow, including the Moto E, X, G3, G4, and Z with the appropriate TWRP image.

Please read completely and make sure you understand each step and how to do it, if you don't get something search the thread or ask an open question, no offense, but do not PM me with a question because you think it is too stupid to ask in public (we all started as noobs), or because you want me to hold your hand and do it for you, I will politely tell you no and ask you to post in the thread.

If you are coming here because you followed an old guide where you used a special boot.img file and now you have no service (WiFi and/or mobile data) and you don't have a TWRP backup to restore first, well, the RIGHT way to fix it is to reflash the current stock firmware image and start over... why? Because the various "help" people give to have you flash the radio files that match the kernel (ie. boot image) that was patched for the old style root method, has now put you in a mismatched firmware environment and could potentially brick on the next OTA. If you are in this situation and don't know for to properly fix it... go to the FAQ section in post #3 below (WIP-incomplete).

If came are coming here to root the first time, or you just thought you could flash SuperSU and reboot and now stuck in either a bootloop or stuck on the boot logo... Your in luck, read on, because we can fix that in a jiffy!

tl;dr version for advanced users: Skip to "How to do it" section to root, or "Do the prep" section to fix a bad root.

I am writing this tutorial because there are still 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 X P/S, 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 the details of 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.

Prerequisites:

1) Device must have an unlocked bootloader. See Moto - Unlocking the Bootloader for more info.
NOTE: Performing this prerequisite will give you all the tools (fastboot) and drivers needed to continue, and wipe your device, meaning erase all your information and programs. Make sure to backup any important data first. This step will also permanently void your warranty once an unlock code has been issued by Moto, it doesn't matter if you even use it, your warranty is done.

2) You need to have TWRP installed or one-time booted via fastboot. CWM and other recoveries will NOT work at this time. See the official TWRP pages for clark here. I will NOT teach you how to use TWRP in this thread, if you are going to root you need to understand that your self, but if you get in a real bind I may knudge you in the right direction. I will tell you that there are two modes, flashed or booted, the later is much better if you plan to take an OTA later as long as you don't do something stupid like flash Xposed.

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, you can always fine the latest stable version here: https://download.chainfire.eu/supersu/ As of this posting update UPDATE-SuperSU-v2.82-20170528234214.zip (version 2.82) is the current stable version and it has been tested and verified to work.
NOTE: Unless otherwise stated, do not use a beta version for rooting Moto devices. SuperSU versions with even numbers are stable versions, while odd numbered versions are beta editions.

4) Reboot and start TWRP recovery, the method you use to do this doesn't matter (boot or flash).

5) Backup your device with TWRP to your SD card, even if you just unlocked and the phone is as blank as a printed page from a 1988 HP DeskJet printer with it's original cartridges still installed, backup... You will always have a good point to return to if the worst happens.

Do the prep:

Note that the hidden Do the prep section is ONLY for repairing a bad flash, SuperSU has been updated and as of version 2.79 the hidden section should no longer be needed for general purpose root on a working device, you just flash SuperSU. If you flashed an older version and are bootlooped, perform this section and continue.

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, when you have your backups and are ready to root, first 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). You can verify this worked correctly by entering 'cat /data/.supersu' in the terminal and see if it returns "SYSTEMLESS=true", if not, you did it wrong, try the echo command again. Now press exit/back and press the HOME key.

After you have successfully entered the command in the TWRP Terminal you may continue

How to do it:

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???

Again, this is somewhat dated information and only applies to fixing a bootlooping device when improperly rooted.

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.

DISCLAIMER: I am not responsible for anything that happens... Your device, your responsibility, no matter what happens... Although all the information here has been tested and is known to work with no issues except where noted, things occasionally can and do go wrong and we cannot foresee every possible scenario or circumstance.

If you need assistance, we need detailed information about what what's going on and what you have tried to do... Please provide details including:

1) Device model number and Android version
2) TWRP version
3) SuperSU version
4) Output of 'cat /data/.supersu' from TWRP terminal

And a copy of recovery.log if possible, and any other pertinent information you can think of. Without specific information there is nothing that I can do to assist you and request for help may be ignored.

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.

NOTE: I no longer own this device, but will help where I can and will keep this thread open to assist users where ever possible, but I no longer have a device to test/verify things with.
Attached Thumbnails
Click image for larger version

Name:	twrp_systemless.jpg
Views:	2682
Size:	107.4 KB
ID:	3942741   Click image for larger version

Name:	SuperSU_flash1.jpg
Views:	2666
Size:	133.8 KB
ID:	3942742   Click image for larger version

Name:	SuperSU_flash2.jpg
Views:	2654
Size:	92.5 KB
ID:	3942743  
The Following 24 Users Say Thank You to acejavelin For This Useful Post: [ View ] Gift acejavelin Ad-Free
 
 
20th November 2016, 04:30 PM |#2  
acejavelin's Avatar
OP Recognized Contributor
Flag Bismarck, ND
Thanks Meter: 3,291
 
Donate to Me
More
Alternate Method #1
Some users have noted that the above method doesn't seem to work, we don't know why as it seems inconsistent but we can't pin it down specifically to user error, certain model number or build, or anything else, as it works 98% of the time...

But if the above method fails, the alternative is to download and copy to SD card or internal storage SuperSU 2.62-3 ├četa version available here and flash it through TWRP like normal.
The Following User Says Thank You to acejavelin For This Useful Post: [ View ] Gift acejavelin Ad-Free
20th November 2016, 04:37 PM |#3  
acejavelin's Avatar
OP Recognized Contributor
Flag Bismarck, ND
Thanks Meter: 3,291
 
Donate to Me
More
Reserved - FAQ (oops, guess I already did that)
24th November 2016, 04:49 PM |#4  
Jorinde123's Avatar
Junior Member
Flag Apeldoorn
Thanks Meter: 0
 
More
I'm so glad I found this thread! I've been procrastenating fixing my phone because of all the crappy methods. This one very easy to follow!
But still can't manage to get my WiFi working
I don't get it. But somehow my nandroid backup failed too, because it's only some 2.X MB big and I don't seem to recover anything....
So I guess I'll have to keep trying..

FYI:
1) Moto X Style 6.0
2) TWRP 3.0.2-0
3) Tried both 2.78 and 2.62. Currently running 2.62
4) SYSTEMLESS=true
24th November 2016, 06:21 PM |#5  
acejavelin's Avatar
OP Recognized Contributor
Flag Bismarck, ND
Thanks Meter: 3,291
 
Donate to Me
More
Quote:
Originally Posted by Jorinde123

I'm so glad I found this thread! I've been procrastenating fixing my phone because of all the crappy methods. This one very easy to follow!
But still can't manage to get my WiFi working
I don't get it. But somehow my nandroid backup failed too, because it's only some 2.X MB big and I don't seem to recover anything....
So I guess I'll have to keep trying..

FYI:
1) Moto X Style 6.0
2) TWRP 3.0.2-0
3) Tried both 2.78 and 2.62. Currently running 2.62
4) SYSTEMLESS=true

Find the latest rom image for the version you have installed, and flash the radios with fastboot.
24th November 2016, 07:39 PM |#6  
Jorinde123's Avatar
Junior Member
Flag Apeldoorn
Thanks Meter: 0
 
More
Quote:
Originally Posted by acejavelin

Find the latest rom image for the version you have installed, and flash the radios with fastboot.

Thanks for your quick reply. Tried that, didn't work.. The ROM i'm currently running is MPH24.49-18 btw... I'm now trying it the hard way, just reverting everything step by step. But the first step (flashing gpt.bin) is already giving me the preflash error. This is going to be a lot harder than I thought and it's been too long since I've been flashing these things.
Used to flash my Moto Milestone and my Sony X10, can you imagine.
24th November 2016, 09:08 PM |#7  
acejavelin's Avatar
OP Recognized Contributor
Flag Bismarck, ND
Thanks Meter: 3,291
 
Donate to Me
More
Quote:
Originally Posted by Jorinde123

Thanks for your quick reply. Tried that, didn't work.. The ROM i'm currently running is MPH24.49-18 btw... I'm now trying it the hard way, just reverting everything step by step. But the first step (flashing gpt.bin) is already giving me the preflash error. This is going to be a lot harder than I thought and it's been too long since I've been flashing these things.
Used to flash my Moto Milestone and my Sony X10, can you imagine.

Because you are not on 49-18, if you were on the latest OTA for 6.0 you were on 49-18-4. Pre-flash validation failure confirms your using the wrong version. Look in my sig for the return to stock thread, there are links to current roms and discussion of the 'preflash validation error'.
26th November 2016, 12:23 AM |#8  
Senior Member
Thanks Meter: 112
 
More
Wasn't systemless method only intended for not altering the system partition in such way not to break compatibility with Android Pay and such apps that don't allow root?
Maybe I got it wrong when I first saw the appearance on the scene of systemless root. From what you are saying the auto detect it's supposed to detect with which method the device is compatible (not only detects if system was already modified? let's say like by TWRP).
I wasn't able to flash SuperSu newest stable versions either, all ended up stuck at boot, except for the 2.62 version (updatable later through playstore and binaries thorugh app via normal update). Honestly I haven't tried systemless as for me I through it was a waste (as said I through it wasn't meant for other purpose).
ATM I'm using CM's own root, but I will report as soon as I will try SU again. I never had problems with modem/wifi with SU, only that it didn't boot on newer stable builds.
26th November 2016, 01:47 AM |#9  
awakenedwithin's Avatar
Member
Thanks Meter: 19
 
More
Got the Moto X Pure a few days ago. It came with 6.0. This procedure works. Thank you!
26th November 2016, 04:36 AM |#10  
acejavelin's Avatar
OP Recognized Contributor
Flag Bismarck, ND
Thanks Meter: 3,291
 
Donate to Me
More
Quote:
Originally Posted by ban.codrut

Wasn't systemless method only intended for not altering the system partition in such way not to break compatibility with Android Pay and such apps that don't allow root?
Maybe I got it wrong when I first saw the appearance on the scene of systemless root. From what you are saying the auto detect it's supposed to detect with which method the device is compatible (not only detects if system was already modified? let's say like by TWRP).
I wasn't able to flash SuperSu newest stable versions either, all ended up stuck at boot, except for the 2.62 version (updatable later through playstore and binaries thorugh app via normal update). Honestly I haven't tried systemless as for me I through it was a waste (as said I through it wasn't meant for other purpose).
ATM I'm using CM's own root, but I will report as soon as I will try SU again. I never had problems with modem/wifi with SU, only that it didn't boot on newer stable builds.

No, although that was one thing we thought we would gain (which we didn't), Systemless root is to get around Marshmallow security. Root is detected by SafetyNet API, and it detects pretty much any system modification, systemless or not
The Following User Says Thank You to acejavelin For This Useful Post: [ View ] Gift acejavelin Ad-Free
27th November 2016, 06:54 PM |#11  
SouthernEvo's Avatar
Senior Member
Flag Jacksonville FL
Thanks Meter: 56
 
More
Currently Using TWRP 3.0.2.0 . Just unlocked bootloader and haven't done anything else . Recovery flash went well during the initial process of unlocking . Now Im trying to make a backup of the stock Rom , everytime I try to make one I keep getting failed at the end of the process ? Is this a known bug ? I have been doing google searches for the past hour and still unable to find anything to indicate anyone else is having this problem . Unless I didn't use the correct terms while searching . Any help would be appreciated
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes