Installing a custom rom on an unlocked Moto X 2013

I've been rooting and installing custom roms on Android phones since 2009. In general, it's been a fairly standard procedure. With the Moto X 2013 (and this may apply to the 2014 as well—I don't know—I can vouch only for the 2013), the procedure is slightly different.

Unlock bootloader
Get Motorola's fastboot
Get the custom rom you want
Flash TWRP recovery to phone
Flashing the rom (and Google Apps)

Unlock bootloader

Go to the Motorola website to request to unlock your phone's bootloader. If you got a phone not locked to a carrier, there should be no issue with this.

The first time you unlock your bootloader, it will erase everything on your phone. Back up important stuff before you unlock the bootloader!

Get Motorola's fastboot

I'm not sure why, but apparently Motorola has its own fastboot, so you're supposed to use that one instead of the regular fastboot you'd find in the Android SDK (Google has also switched things up so if you go to get the Android SDK, you'll get an Android IDE app instead of just the raw files).

The weird thing is it's very difficult to find this Moto Fastboot anywhere on the Motorola website. I've found it only via third parties.

Here you can find a link to the Mac version.

And here you can find a link to the Windows version.

I wasn't able to track down Linux versions, but they supposedly exist.


Next, you want to download the TWRP (Team Win Recovery Project) recovery for the Moto X 2013 (codenamed ghost). You can find the latest version on the TWRP website.

Get the custom rom you want

For this example, I'm going to recommend the Nexus Experience, but you can pick whatever rom you want. Unless you know you don't want Google Apps, be sure to download not just the rom but also the Google Apps .zip.

So one file should look something like and another something like

Plug your phone into your computer, and then copy those two files to the top-level /sdcard directory on your phone.

Flash TWRP recovery to phone

I'm sure there's a Windows equivalent for this using DOS, but I've done this only on a Mac, so I'm not 100% sure on the Windows procedure.

For Mac, put the TWRP file (something like twrp- in the same directory as your moto-fastboot-osx64 file (may be slightly different for Windows and Linux users, of course). For simplicity's sake, rename the TWRP file to be twrp.img.

Turn your Moto X 2013 off. Unplug it from your computer. Then, while holding the volume-down button down, press the power button. Don't let go of the volume-down button until your phone boots into fastboot mode.

Then, plug your phone back into your computer via USB.

In the (similar but different for Windows and Linux), navigate to the directory where your moto fastboot and twrp .img files are. If you don't know how to do that, type cd in the terminal (with a space after it), and then drag the folder over to the terminal. Then hit Enter.

Then, run the commands

./moto-fastboot-osx64 flash recovery twrp.img

Flashing the rom (and Google Apps)

You should still be at the fastboot screen, press the volume-down button once to highlight Recovery, and then press the volume-up button once to select it.

You should then see the teamwin logo.

After that, you'll get some touch-screen options.

First, select Wipe to wipe your current installation (you already backed up before unlocking the bootloader, right?). Then do a swipe to factory reset.

Once you're done, hit the back button to go back to the main menu. Next, select Install. Find your main rom (e.g., and flash that.

Go back to Install and flash Google Apps if you want (e.g., If you don't know if you want Google Apps, flash it, just to be safe.

Then, go back to the main menu and select Reboot and then System.

It may take a while for your rom to boot up the first time, but then you're all set to use your custom rooted rom!


Rooting the Nook Simple Touch

The Nook Simple Touch is an excellent e-reader, and I like that Barnes and Noble keeps it that way. The e-ink screen and simple form factor make it perfect for reading books. That said, just for curiosity’s sake, I dove in and rooted the thing.

TouchNooter is an amazing script that automates the rooting process.

Getting it to work
Unfortunately, I had trouble reading directions, so it took me a long time to root. I kept dding the .zip file instead of unzipping it first and then dding the resulting unzipped .img file instead.

After I did that, I also realized that the wireless was off on my Nook, which meant I couldn’t follow the directions and sign in right away, which meant there was some weird bug with signing into the Android Market (I kept getting an error message about the network connection, even after I turned on wireless). I did quite a bit of Google searching. Some people recommended pushing a new Vending.apk file to the Nook via adb, but I couldn’t get adb to recognize the device, even after enabling USB debugging. Turned out the solution I stumbled upon that worked was just adding a second Google account to Gmail. Once I did that, I could magically sign into the Market app with my regular Google account.

e-ink-friendly Apps
There were some apps that quite obviously couldn’t run well on an e-ink screen with a slow processor and little RAM. Others surprised me. I had Google Translate, Flixster Movies, Google Books (once I tried to actually read a book), and Facebook crash or hang on me. Others that I thought would be problematic ended up being fine (Facebook can’t load, but Twitter and Google Plus work all right).

Apps that are definitely great for a rooted Nook are ES File Explorer, Gmail, Opera Mobile, Terminal Emulator, WordFeud, and Words with Friends. The latter two are especially good, since the Nook offers a bigger screen than most phones, and it also doesn’t go to screensaver for five minutes (by default), so you have plenty of time to consider your moves before playing them.

Other tweaks
Swiping left to right isn’t terrible smooth on an e-ink display, so I removed all but one screens on my ADW Launcher. I plopped a power widget on the home screen to toggle wireless on and off easily.

I also set hardware buttons (the top-left for the Back button, the top-right for the Menu button, the Nook key for regular ADW home instead of the Barnes and Noble home—otherwise you get stuck in the Barnes and Noble interface and can’t get back to ADW without rebooting).

Gallery wouldn’t recognize photos off my MicroSD card, so I used ES File Explorer to find my screensaver photo (of my cat) and then used the ES File Explorer image viewer to set that photo as my wallpaper in ADW.

Belated Caveat
If you’ve never rooted an Android device before, most of what I’ve just said will just sound like gobbledygook, but I wish someone else had written all that. Would have saved me a lot of trouble.

Linux Ubuntu

Make a “browse as root” launcher in Ubuntu

Like Mac OS X, Ubuntu includes by default a privilege escalation system that invokes sudo, which allows certain users (in the admin group) to operate as limited-privileged users for almost all tasks and to temporarily escalate (after a password authentication) to administrative privileges for specific tasks. For more details about sudo, check out the Ubuntu Wiki page on the subject.

Sometimes users want to modify system files and thus need “root” (or full administrative) privileges to make changes to those files. This tutorial will show you how to create an application launcher to “browse as root.”

Right-click on an empty spot on the panel and select Add to Panel

Select Custom Application Launcher and then click Add

The type should be Application and the command should be

gksudo nautilus

The rest of the fields and the icon can be whatever you want them to be.

When you’re done filling in the fields and (optionally) selecting an icon for the launcher, click OK

Now when you click the launcher icon, you’ll be prompted for a password…

and you can browse as root and make changes to system files, all within your otherwise-unprivileged user session.

Linux Ubuntu

How to use Konqueror or Kate as sudo in Kubuntu KDE 4 Remix

As I hope I’ve made apparent in these two links below, the proper way to launch a file browser as root in KDE is kdesu konqueror:

Unfortunately, in the KDE 4 version of Kubuntu 8.04, if you try to launch Konqueror (the file browser) or Kate (the text editor) with root (or administrative) permissions, you won’t be able to.

If you try kdesu konqueror, you’ll be told the command is not found.

So you’ll have to run the command with the explicit path to the executable:
kdesu /usr/lib/kde4/bin/konqueror

Likewise, the command kdesu kate will not be found.

So you’ll have to run the command
kdesu /usr/lib/kde4/bin/kate
to have it launch successfully.

By the way, I don’t know if there are any adverse side effects, but I believe you can restore the original functionality by symlinking the executables back to the normal path:
sudo ln -s /usr/lib/kde4/bin/kate /usr/bin/kate
sudo ln -s /usr/lib/kde4/bin/konqueror /usr/bin/konqueror