Archive for May, 2013

Root Access on Ouya

May 31, 2013 7 comments

Today I received my Ouya. For the ones who don’t know what an Ouya is, check out this link. The Ouya device has already the ‘su’ binary installed, so there is no actual ‘rooting’ necessary. But in order to get root access you still have to take some things into account.

ADB (Android Debug Bridge)
First we need a copy of ADB (Android Debug Bridge). ADB ist part of the Android SDK, which can be downloaded from here. Download the package according to your OS. On Linux just do the following steps

$ wget
$ unzip
$ cd adt-bundle-linux-x86-20130522/sdk/platform-tools
$ sudo cp adb /usr/local/bin

The ADB binary is self contained, so it can just be copied to somewhere else (e.g. /usr/local/bin).

The second thing we need is an entry for the Ouya in our usb devices list. First we need to connect the Ouya to our PC with a micro-usb/usb-cable. Then call

$ dmesg

The output should look something like the following

[289053.442387] usb 1-1.5.6: new high-speed USB device number 25 using ehci_hcd
[289053.564585] usb 1-1.5.6: New USB device found, idVendor=2836, idProduct=0010
[289053.564595] usb 1-1.5.6: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[289053.564601] usb 1-1.5.6: Product: OUYA
[289053.564606] usb 1-1.5.6: Manufacturer: OUYA
[289053.564610] usb 1-1.5.6: SerialNumber: 00000000000000

If you haven’t upgraded the Ouya’s firmware yet the vendor ID (idVendor) might be different. If you have installed the latest firmware the ID should be ‘2836’, like the one from above. Now we have to add the vendor ID to our ‘adb_usb.ini’. Just do the following steps to add the device

cd ~
mkdir .android
echo “0x2836” >> ~/.android/adb_usb.ini

It is important to add a ‘0x’ in front of the actual number (its hexadecimal).

Connecting to the Ouya
Now we should be able to connect to our Ouya using ADB

$ sudo killall adb
$ sudo adb devices

The ‘devices’ command should list the Ouya

List of devices attached
00000000000000        device

If it does not list your device make sure to kill all ADB instances on your machine, and the start ADB (with ‘sudo’) again.

sudo killall adb
ps -e | grep adb

The second command shouldn’t output anything. If it lists

 6680 pts/1 00:00:00 adb
15926 ?      00:01:31 adb

then there are still instances of ADB running.

When everything is cleaned up, and the ‘adb devices’ lists our Ouya we can connect to it using

$ sudo adb shell

This gives us a shell on the Ouya (we can even be super user).

Categories: tech foo Tags: , ,