Deploying Directly To An OUYA
Let’s face it – the Android emulator almost always sucks. It’s perhaps the most broken bit of an otherwise OK development process for Android.
Nothing beats the fidelity of testing on the real hardware but you need to jump through a few hoops first.
For MonoGame with the Visual Studio plugin you can launch directly into the hardware, but there are two gotchas.
- You need to change the USB driver for the OUYA to the Google Android SDK ADB (Android Debug Bridge) device so that ADB can interact with it.
- Visual Studio/MonoGame will only see devices plugged in when they launch. Plug in your device and make sure it is visible using adb devices from the command line before you start Visual Studio.
Updating The USB Driver
When you run adb devices from the command line and it responds with an empty list…
…and your device is plugged in, then you will probably need to update the USB driver to be the Android SDK ADB one supplied by Google.
- Open Device Manager – Find the OUYA.
- Right-Click, Update Driver Software…
- Choose “Browse my computer for driver software”
- Choose “Let me pick from a list of device drivers on my computer”
- Click “Have Disk…” (there may be a step before this similar to “Show All Devices”)
- Browse and Select the .INF file %APPDATA%\local\Android\android-sdk\extras\google\usb_driver\
- Choose android_winusb.inf
- Click ok.
- Select the ADB Interface (not the composite one)
- Finish the Wizard.
It should now appear as an Android Device with an ADB Interface.
Running adb devices from the command line shows my OUYAconsole.
Order is Important
In Visual Studio 2012 if you can’t see your device, try restarting Visual Studio or rebooting..
You device should be an option when you F5 or Run/Debug or Deploy from Visual Studio.
Some Porting Stories From Other Developers
Out of the box performance for just drawing text, rendering images and playing audio is fine. My unoptimised hexagon vector engine that runs at 60fps fine on my PC won’t get above 10fps on the OUYA.
One thing I might try is using a scaled down 720p render target and blit up to the 1080p of the OUYA,