Aug 292011
 

While the first methods to gain root access to the Android-powered Motorola Photon required an expensive webtop dock, we were soon provided an easy, dock-less method for rooting by the incomparable Edgan at xda-developers. For those not yet battle-hardened by Android rooting attempts, I’m providing a clear step-by-step guide to rooting a Motorola Photon, with detailed instructions for points of common confusion.

Note: I’m using OSX in this guide, but there aren’t any significant differences when using other operating systems.

First, let’s get some tools set up on your Photon.

Install two apps from the Android Marketplace:

Superuser won’t be of much use until you have root access, but you can fire up the Android Terminal Emulator right now if you want to see what it does. It basically gives you a linux prompt on your Android device, allowing you to issue standard linux commands to the underlying operating system. We’ll use this to test our root access when we are finished.

The first thing we need to do is get the file photon-torpedo.tar onto your Photon’s internal memory. In my opinion, the easiest way of doing this is using my old friend, and an essential Android development tool, ADB. If you don’t have ADB installed and working, check out my previous guide to Installing and Using ADB in OSX (or check Google for a guide for your OS, though its fairly similar) for help on using ADB to access your Android device.

With ADB installed, download the photon-torpedo.tar file to your computer. I downloaded mine to:


/Users/constantinecois/Downloads

but it doesn’t really matter where you put it.

Navigate to the location of photon-torpedo.tar in a Terminal window. Now we need to attach the phone. Make sure the ‘USB Debugging’ is enabled on your phone (Settings->Development), and plug your phone into a USB port on your computer. Motorola has been nice enough to provide a cable for this with the phone charger.

Just to make sure we have ADB installed and working, type


adb devices

You should see something like:


List of devices attached
XXXXXXXXXXXXX device

If not, go back and make sure to install ADB correctly.

When you are ready to go, we want to get photon-torpedo.tar into /data/tmp on your Photon. To do this, issue the following ADB command in your terminal:


adb push \photon-torpedo.tar /data/tmp

Now bring up an ADB shell:


adb shell

(or use the Android Terminal Emulator app, but its a bit more tedious to type this way). Currently, when we fire up the shell, we are issuing commands as a standard, non-root user. By the time we are done here, we will get a nice, empowering root prompt. Navigate to the directory you pushed photon-torpedo.tar to:


cd /data/tmp

Unzip the file:


/bin/tar xf /data/tmp/photon-torpedo.tar

Now run the exploit that will allow you to gain root access:


/data/tmp/photon-torpedo.sh

At this point you may or may not see the following error


$ ./photon-torpedo.sh
./photon-torpedo.sh
ERROR: ld.so: object 'libpcprofile.so' cannot be loaded as audit interface: unde
fined symbol: la_version; ignored.

Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.

Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.

ddxSigGiveUp: Closing log

This doesn’t matter, as long as the next prompt is a root prompt:


root@localhost:/data/tmp#

If you have this root prompt, you are home free. Run one more command to secure permanent root access:


/data/tmp/install-su.sh

That’s it! If you want to verify root access, the Superuser app will now pop up any time an app requests root access, allowing you to allow or deny. Go ahead and launch Android Terminal Emulator (you can use any other root-enabled app you want for this test, if you like) and type:


su -

at the command prompt. This just asks to simulate the root user, a very direct way of testing root access. You should see the Superuser app pop up a window looking something like this:


Terminal Emulator SuperUser Access Image

I’d recommend denying this access, just to make sure you don’t issue any unintentional commands as root. But the fact that you were able to request root access successfully demonstrates that you now have root access.

I’ll leave you with a great Lifehacker post listing some of the best apps you can only take advantage of with a rooted phone. Enjoy!

 Posted by at 8:09 pm
  • Guest1033

    What if you don’t have a root prompt after the error?

  • Guest1033

    Nevermind, it worked! I ran ./install-su.sh from the the Android Terminal Emulator on my phone, since the root prompt showed up there. I still got the error “rm: cannot remove ‘/lib/libphoton-torpedo.so’: No such file or directory”) but I checked with the su command at prompt, and the Superuser Request popped up. Thanks!

    • http://www.codehenge.net Constantine Aaron Cois

      Glad to hear it!

  • kurt

    photon-torpedo.tar link doesn’t work

    • http://www.codehenge.net Constantine Aaron Cois

      Thanks for the heads up. I switched out the link for a mirror, let me know if you have any issues.

      • kurt

        Thanks for updating the link. I ended up using superoneclick which did the trick as I couldn’t find the file anywhere at the time.

44 queries in 2.232 seconds