[X Style (Pure) General] Heisenberg:
[SIZE=+3]Heisenberg's How-To Guide For Beginners[/SIZE]

[SIZE=+2]Moto X Pure[/SIZE]​

[SIZE=+1]Intro[/SIZE]

This thread will serve as a location for basic how-to guides for the Moto X Pure. I'm going to start off with a couple of the more obvious ones and go from there. If anyone has any suggestions for additions please feel free to let me know.

[size=+1]Prerequisites[/size]:

You'll need a working adb/fastboot environment on your PC to get through some of these guides. Go here to download the Android SDK, which will give you most updated version of adb and fastboot. Scroll to the bottom of the page and find Other Download Options>SDK Tools Only, and grab the right version for your OS. While it's downloading create a folder in C:\ called SDK (C:\SDK). Once you've downloaded the zip you can extract it into your C:\SDK folder. Navigate to C:\SDK\android-sdk-windows and open SDK Manager.exe. In SDK Manager you need to install the following packages:

Tools> Android SDK Tools, Android SDK Platform-tools

Extras> Android Support Library

Once you have installed those, inside C:\SDK you should see some new folders, one of them will be called platform-tools, within that folder you should see fastboot.exe and adb.exe. I'll refer to this as your fastboot folder/directory or working folder/directory during this guide. To make sure adb is correctly installed, open a command prompt from within your fastboot folder (hold shift + right click, select open command prompt here) and issue this command:

adb version

If it returns a version number for Android Debug Bridge then you're good to go.

You'll find Motorla drivers here, download it and install, then reboot your PC.

You can test adb by connecting your device to your PC while booted into Android (making sure that adb/usb debugging is enabled in Settings>Developer Options) with the screen unlocked and issuing this command:

adb devices

It should return your device serial number, if so, adb is working.

You can test fastboot by connecting your device to your PC while booted into fastboot mode (power + volume down) and issuing this command:

fastboot devices

It should return your device serial number, if so, fastboot is working.

By attempting any of the processes listed this thread you accept full responsibility for your actions. I will not be held responsible if your device stops working, catches on fire, or turns into a hipster and claims to have been modified before it was cool.

​

[SIZE=+1]Index[/SIZE]

How To Unlock Your Bootloader

How To Install A Custom Recovery On Your Device

How To Make A Nandroid Backup With TWRP Recovery

How To Root Your Stock Rom

How To Install A ROM with TWRP Recovery

How To Install A Custom Kernel With TWRP Recovery

How To Make Sure You Can Pretty Much Always Recover From An Accidentally Wiped System

​

[SIZE=+1]1. How To Unlock Your Bootloader[/SIZE]

Go into About Phone in Settings, click on Build Number 7 or 8 times until it says you have enabled Developer Options. Go back to Settings and enter the newly opened Developer Options section, scroll and click on the Enable OEM Unlock option.

Power off your phone then boot into fastboot mode (power + volume down).

Connect your phone to your PC via usb cable.

Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here).

Check your fastboot connection by issuing this command:

fastboot devices

It should return your device serial number, if not you need to make sure your drivers are installed correctly.​

Once you've confirmed your fastboot connection issue this command:

fastboot oem get_unlock_data

It should return something like this:

(bootloader) 0A40040192024205#4C4D3556313230
(bootloader) 30373731363031303332323239#BD00
(bootloader) 8A672BA4746C2CE02328A2AC0C39F95
(bootloader) 1A3E5#1F53280002000000000000000
(bootloader) 0000000

Copy that code (with no spaces between the characters) and paste it somewhere for safekeeping, you'll use it in a minute.

Go to the Motorola bootloader unlocking page. You'll need to create an account with Motorola if you don't already have one. Once you're signed in you can scroll down to step 6 and paste the above code into the text field and hit the “can my device be unlocked” button.

Read the terms and conditions and accept them if you agree (you can't continue unless you accept).

Click the “request unlock key” button and an email with your unlock token will be sent to the email account that you signed up with.

Once you have retrieved the token from the email you can use it within the following command to unlock your bootloader:

fastboot oem unlock xxxxxxxxxx

(Replace the xxxxxxxx with your unique unlock token)​

Your bootloader is now unlocked!

Reboot with this command:

fastboot reboot

It's now safe to disconnect your usb cable.

Please note: this will erase all user data from your device, it is best to do this before you really start using the device and installing apps or putting data on the internal storage

​

[SIZE=+1]2. How To Install A Custom Recovery On Your Device[/SIZE]

Prerequisites: unlocked bootloader.

Download the recovery of your choice, here's TWRP.

Make sure you check the md5 to verify its integrity (where possible).

Place the file in your fastboot folder (this is where fastboot.exe is located on your PC).

Put the phone in fastboot mode and connect it to your PC via usb cable.

Open a command prompt from within your fastboot folder (shift + right click, select open command prompt here), and enter the following commands:

fastboot flash recovery <filename>.img

(Replace <filename> with the actual filename of the recovery, the recovery filename in the command will change depending on which recovery you're flashing)

Wait for the recovery to flash, it'll only take a few seconds, you'll get a finished message in your command prompt window once it's done.

It's now safe to disconnect your usb cable.

Don't reboot the phone normally, use the volume buttons to highlight recovery and press the power button to select it. This will stop the stock OS from patching it with the stock recovery in boot. Once you've booted into TWRP like this once, you can reboot normally.

​

[SIZE=+1]3. How To Make A Nandroid Backup With TWRP Recovery[/SIZE]

Prerequisites: unlocked bootloader, TWRP recovery.

A nandroid backup is a very important thing to have before installing any custom software on your device. It's basically a backup of your stock system that you can fall back on if anything goes wrong or if you just want your stock ROM back. You can also use the backup tool to create a backup of your favourite ROM set up exactly the way you like it. The backup you create can be easily restored using the restore tool in TWRP recovery.

All you need to do is enter TWRP recovery, select the backup option from the TWRP home screen, check the system/data/boot boxes, and swipe to backup. The process will take a few minutes.

​

[SIZE=+1]4. How To Root Your Stock Rom[/SIZE]

Prerequisites: unlocked bootloader, TWRP recovery.

Please note: this method is only valid for Lollipop, do not use this method on Marshmallow. You can find a systemless root method for Marshmallow here, big thanks to [MENTION=949251]ivcarlos[/MENTION]!

Download SuperSU to your phone.

Boot into TWRP recovery.

Select the install option from the TWRP home screen.

Navigate to where you have SuperSU stored on your sd card and select it.

Swipe to install.

Once you've installed SuperSU you'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button. That's it.

​

[SIZE=+1]5. How To Install A ROM with TWRP Recovery[/SIZE]

Prerequisites: unlocked bootloader, TWRP recovery.

Installing a ROM is a pretty straight forward and easy process. Before you install anything you should make a nandroid backup (instructions above).

Download a ROM and appropriate Gapps package and place on your device.

Boot into your custom recovery.

Perform a full wipe.

Select the wipe option from the TWRP home screen.

Select advanced wipe.

Check the system, data, cache, and dalvik cache options.

Swipe to wipe.

Install the ROM.

Select the install option from the TWRP home screen.

Navigate to where you have the ROM zip stored on your sd card and select it.

Swipe to install.

Most ROMs will run an installer script at this point but some ROMs have what is called an Aroma Installer which allow you to choose some install options before the script runs.​

You will also need to install the appropriate gapps package directly after installing the ROM.

Once you've installed all necessary zips you'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button.

​

[SIZE=+1]6. How To Install A Custom Kernel With TWRP Recovery[/SIZE]

Prerequisites: unlocked bootloader, TWRP recovery.

A custom kernel can open up a new level of control over your device, such as overclocking/underclocking, undervolting, changing governors, changing I/O schedulers, adjusting colour calibrations, adjusting sound calibrations, and many other options.

Download a kernel that is compatible with your current ROM.

Check the md5 to verify its integrity.

Enter TWRP recovery.

Select the install option from the TWRP home screen.

Navigate to the kernel and select it.

Swipe to install.

You'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button.

Once your phone has booted up you can use a kernel tuning app to change governors, I/O scheduler, clock speed, and other options. Some of the popular kernel apps are Kernel Auditor, Trickster Mod, No Frills, Kernel Tuner, and many more.

​

[SIZE=+1]7. How To Make Sure You Can Pretty Much Always Recover From An Accidentally Wiped System[/SIZE]

Prerequisites: unlocked bootloader, TWRP recovery.

There may come a time when you accidentally wipe your OS while trying to perform a basic cache wipe in recovery. Don't laugh, it can happen to the best of us. The best way to insure yourself against being stuck in recovery is to keep a ROM zip or a TWRP/CWM backup (a nandroid backup) on your sd card at all times.

This solution seems like common sense but apparently there are quite a few people out there who don't store a ROM or backup on their phone. You might think it's easy to just mount the OTG storage and copy a ROM across to your phone from your PC (which is definitely an option), but there's always a chance that you won't be near your HDD or sd card at the time, or it won't recognise your phone properly. Basically you need to insure yourself against Murphy's law.

​

Donate To Me