Sunday, December 1, 2013

Excursions in rooting my Nexus 4

Man, I never really wanted to dig into phone rooting, but I recently went to do a Portable Wi-fi Hotspot and found that T-Mobile now blocks all data when I tether through my phone. (which is insane. why does T-Mobile care whether I'm using my phone or computer? I'm not using a ton of data. but anyway.)

I found this post, which explains how to edit one sqlite database to allow tethering again.

Unfortunately, it's in /data/data/..., which is only editable (or even viewable) if you have root access. (this is I think the same as root on mac/linux, which is roughly the ability to "sudo".) For some reason, Android makes this difficult.

Luckily, xda-developers to the rescue.
Nexus 4 Rooting Guide.
Backing up your phone before you root it.

How'd it go? Pretty smoothly. Wiped my phone, but the two-part backup in the link above (both the "adb pull" and the "adb backup" part) meant I didn't lose much. Had to reconfigure a couple minor things, not bad. And now I can tether!

The major steps, in my mind, are:
- back up your stuff
- unlock the bootloader (this is when your phone gets wiped)
- flash (install) the custom recovery
- install the SU app or something? a little unclear on this step, but it involves installing SuperSU.
- restore your data

A couple of gotchas:
- as usual when reinstalling everything on your phone, if you use two-factor authentication (as you should), generating some backup codes beforehand makes everything easier.
- on the "clockwork mod" site, all you need is the one in the "download recovery" column.
- don't download/install over-the-air Android updates. It breaks your root. (which is not a huge deal, but it means you have to re-flash the recovery and re-install the SU app.)

No comments:

Post a Comment