# Flashing the OUYA with i12bretro Image v3.0

## What's Included

- Everything from the previous i12bretro Ouya images
- Ouya Discover Store 2020 fix
- Factory Reset Fix
- Discover Store full games unlock
- Root access

## What's New

- Updated RetroArch to v1.9.0
- Installed Aptoide app store
- Installed Dig Emulation Frontend
- Semi-working Google Play store (Frequent crashes / apps can be installed, but some don't work due to missing Google services)

## Things You Will Need

- A USB flash drive, at least 4 GB of free space https://amzn.to/3wkR5ju
- A USB hub, preferably with external power https://amzn.to/3KTviDw
- A USB keyboard https://amzn.to/3qgUQTe | https://amzn.to/3uchJs

## Prerequisites and Downloads

1. Download i12bretro_OUYA_image_v3.0.zip Download
2. Format the USB flash drive to FAT32
   1. Right Click Start > File Explorer
   2. Right Click the USB flash drive > Format...
   3. Select FAT32 from the File System dropdown
   4. Make sure Quick Format is checked
   5. Click Start

4. Extract the downloaded i12bretro_OUYA_image_v3.0.zip file
5. Copy the contents of the /Copy_to_USB folder to the root of the USB flash drive
6. Safely remove the flash drive and plug it into the USB hub connected to the Ouya
7. Plug in the USB keyboard to the USB hub connected to the Ouya

## Installing Ouya USB Drivers

1. Right click Start > Command Prompt (Admin)
2. Paste the following commands to disable driving signing checks temporarily
   bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
   bcdedit -set TESTSIGNING ON
   shutdown /r
3. Your PC will reboot
4. Connect a USB cable from the micro USB port on the back of the Ouya to your PC
5. Make sure the Ouya is connected to a display via HDMI
6. Power on the Ouya
7. After a few seconds you should hear Windows chime that a new device has been detected
8. Right click Start > Device Manager
9. Expand Other Devices and you should see OUYA listed
10. Right click OUYA > Update Driver
11. Select Browse my computer for driver software
12. Click the Browse... button
13. Navigate to the extracted i12bretro_OUYA_image_v3.0\files\driver
14. Click OK
15. Make sure "Include subfolders" is checked, click Next
16. Windows should find the correct driver for the Ouya and install it
17. Navigate to the i12bretro_OUYA_image_v3.0 in windows explorer
18. Right click i12bretro_OUYA_image_v3.0.bat > Run as administrator
19. The script uses the Android Debug Bridge (ADB) to boot the Ouya into CyanogenMod recovery
20. When the command prompts to "-- Setup the fastboot driver", go back to Device Manager expand Android Device
21. Right click Android Bootloader Device > Update Driver
22. Select Browse my computer for driver software
23. Click the Browse... button
24. Navigate to the extracted i12bretro_OUYA_image_v3.0\files\driver
25. Click OK
26. Make sure "Include subfolders" is checked, click Next
27. Windows should find the correct driver for the Ouya and install it
28. Press Enter at the command prompt once the driver is installed to continue booting the Ouya to CyanogenMod recovery

## Restore i12bretro Image via CyanogenMod Recovery

1. With the OUYA in CyanogenMod Recovery:
2. Select wipe data/factory reset
3. Select Yes to confirm wiping all user data
4. From the main menu select advanced > wipe dalvik cache partition
5. Select Yes to confirm wiping the dalvik cache
6. Select Backup/Restore > Restore from USB disk
7. Navigate to and select the extracted i12bretro image from the USB disk clockworkmod\backup\i12bretro_v3.0
8. Select Yes to confirm restoring the backup
9. Wait several minutes for the various partitions of the image to be copied to the Ouya
10. From the main menu select install zip > choose zip from /storage/usbdisk
11. Arrow down and select RC-OUYA-1.2.1427-r1_ota.zip > Press Enter
12. Select Yes to confirm the install
13. From the main menu select mounts and storage > mount /system
14. While at the mounts and storage menu, make sure /data is mounted, the menu should say unmount /data. If it does not, mount it as well
15. Back on the PC Press Enter to continue with rooting the Ouya and fixing the Discover store
16. Copy each of the adb shell commands one at a time into the command prompt to gain root access
17. Once the process completes the Ouya will reboot

## Completing Root Access

1. Once the Ouya boots, navigate to Make > Software
2. Launch Superuser > Select Install
3. Select Remember choice forever > Allow
4. Click OK
5. Exit Superuser and navigate back to Make > Software
6. Launch Xposed Installer
7. Select Framework > Check Don't show this again and Click OK to the popup > Click Install/Update > Click OK to reboot
8. After rebooting Discover Store games that used the Ouya purchase API will be unlocked

## Setting Up Google Play

1. Navigate to Make > Software
2. Launch Mod Collection for Ouya
3. Arrow down to Install Play Store
4. Wait for the installation to complete
5. Back out to Make > Software and select Quick Boot
6. Select Reboot to complete the Google Play install
7. Once the Ouya is back up go to Make > Software > Google Play
8. Go through authenticated with Google and the Play Store will load (The Play Store is pretty unstable, but it does allow apps to be installed pretty simply when it plays nice)

## Cleaning Up

1. After successfully flashing the image to your Ouya, do the following
2. Right click Start > Command Prompt (Admin)
3. Paste the following commands to re-enable driving signing checks
   bcdedit -set loadoptions ENABLE_INTEGRITY_CHECKS
   bcdedit -set TESTSIGNING OFF
   shutdown /r
4. Your PC will reboot

Special thanks to https://www.s-config.com/cyanogen-mod-and-the-ouya/ and Christian Weiske https://ouya.cweiske.de for helping to keep the Ouya alive