[X 2014 Android Development] glauberlima:
Hello, everyone!

TL;DR: You're about to perform a systemless root installation on your phone so make sure you have uninstalled Xposed Framework, uninstalled root, the device's bootloader is unlocked and your phone's boot image is in its untouched stock state. Then boot into TWRP and install SuperSU-v.279-SR3 or newer.

UPDATE 2017-01-19:

- Provided missing bootloader information regarding root. Thanks, [MENTION=2214598]Charlita[/MENTION] for the heads-up!

- Moved TL;DR section to the top.

UPDATE 2017-01-15:

- SuperSU-v.279-SR3 learned how to use systemless mode as default flashing method for Motos. This is great news as the installation process now is just a matter of flashing the SuperSU installer. The segmentation fault had been fixed on SR2 and this version also includes that fix.

- Included a TL;DR section.

UPDATE 2016-12-25:

- SuperSU-v.279-SR1 contains a regression bug regarding the "segmentation fault". Skip this version for now. I've already contacted Chainfire.

- suhide: as the Chainfire himself stated, the tool is a losing game so I'm not putting any further effort here.

UPDATE 2016-11-03:

- As of SuperSU-v2.78-SR3 boot image patching works out-of-the-box. Just install it and you're done!

- TWRP version 3.x works as expected.

- Unfortunately, SafetyNet checking fails as Google constantly updates the server-side code.

- WIP: Check if Chainfire's suhide are able to help here.

UPDATE 2016-08-08:

- Added a backup reminder.

- Added flashable zip systemless_root_enabler_by_glauberlima.zip.

After a few days playing with it, I finally managed to perform a systemless root install for our beloved Moto X 2014 :)

Benefits:

- Install OTA updates when they arrive;

- SafetyNet checking will pass so Android Pay can be used (not available in Brazil yet).

Requirements (links below) :

- Android 6 Marshmallow

- Bootloader must be unlocked otherwise you won't be able to root your phone;

- Boot partition must be in its original untouched stock state otherwise, SuperSU installer won't be able to patch it;

- System partition must be untouched as well but a simple uninstall of applications that have changed it should be enough. This step is not mandatory but if your system partition remains changed SafetyNet checking will fail;

- Your device must be unrooted. SuperSU has the option "Completly remove root". Use it;

- If you have Xposed Framework installed, uninstall it;

- You'll need ADB and Fastboot in order to flash stock boot.img if applicable;

- TWRP. Version 3.0.2-2 works just fine. If you prefer 2x series, I highly recommend version 2.8.7.1;

- SuperSU-v2.79-SR3 zip installer (or a newer version). DO NOT TRY AN OLDER VERSION. WILL NOT WORK;

Install guide:

-

Make a Nandroid backup first using TWRP;

- Uninstall Xposed Framework if applicable;

- Uninstall SuperSU;

- Connect your device to your computer via USB;

- Reboot into bootloader:

adb reboot-bootloader

- Restore stock boot partition (you can skip this step if you already been on stock boot):

fastboot flash boot xt1097_boot_stock_with_may_2016_update.img

VERY IMPORTANT: The binary file boot xt1097_boot_stock_with_may_2016_update.img is device dependent. I have extracted stock boot.img from victara May 2016 update full ROM package and put it here. If you are trying on the other variants, make sure you will use the right image.

- Reboot into Recovery (TWRP);

- Flash the attached zip file systemless_root_enabler_by_glauberlima.zip. This will set both variables SYSTEMLESS=true and BINDSYSTEMXBIN=false. Without these variables set, SuperSU will fail to systemless root the device. Feel free if you want to manually enter the commands in the Command Prompt:

adb shell "echo SYSTEMLESS=true>/data/.supersu"
adb shell "echo BINDSYSTEMXBIN=false>>/data/.supersu"

- Install SuperSU and reboot system. If the first boot fails, just wait - the second will work I promise you!

- As soon as Android UI shows up you should be systemless rooted;

- Confirm SuperSU is installed by recognizing the green icon on your app drawer;

- Open up any root app you have. The world-famous Superuser permission request dialog should pop-up;

- Install SafetyNet Helper, in order to attest your Android, is passing Google's SafetyNet checking: https://play.google.com/store/apps/details?id=com.scottyab.safetynet.sample

Now you should be good. Congrats!

Go ahead and get some systemless apps:

- Systemless Xposed Framework

- Systemless Adaway

This procedure should work for the other variants too - all you need is the original boot.img

If you need any help feel free to ask.

Attached you can find the screenshots taken from my XT1097 after the procedure :)

Related links:

SuperSU-v2.79-SR3:

https://download.chainfire.eu/1021/SuperSU/SR3-SuperSU-v2.79-SR3-20170114223742.zip

Latest stable SuperSU:

http://download.chainfire.eu/supersu-stable

Systemless Xposed Framework:

http://xdaforums.com/xposed/unofficial-systemless-xposed-t3388268

Systemless AdAway:

http://xdaforums.com/showthread.php?t=2190753

Material Design Xposed Installer:

http://xdaforums.com/xposed/material-design-xposed-installer-t3137758

Minimal ADB and Fastboot:

http://xdaforums.com/showthread.php?t=2317790

TWRP for Moto X 2014:

http://xdaforums.com/moto-x-2014/orig-development/recovery-twrp-2-8-0-0-touch-recovery-t2911523

Thanks:

[MENTION=631273]Chainfire[/MENTION]