[RECOVERY] OUYA Safe Recovery // A flasher's failsafe.

Search This thread

ooBONGoo

Senior Member
Apr 3, 2013
50
7
Same thing happened to me.
Here's what I did:
- adb reboot bootloader
- fastboot boot OuyaCWMrecovery6.0.3.2.img
- Factory reset -> format system -> format data
- Install Stock ROM.
- Flash update_v1.0.0.zip
- Wipe cache and reboot



Great! Thanks

Sent from my Nexus 4 using Tapatalk 2

Thanks Bro.. but I found an easier way. I just reflashed the latest OTA update through CWM. After that, I reflashed CWM via fastboot and voila! didn't have to factory reset or reformat the system and data. Thanks tho.. I was beginning to freak out that I done screwed my OUYA, but I remembered my latest OTA flash flashed over CWM, which meant I had to reflash CWM via fastboot. Didn't want to go through the pain of having to re-set everything back up or redownload everything because I got my OUYA to how I want it.
 
Last edited:

Sam3gX

Senior Member
Jul 24, 2009
298
80
Long Beach, CA
Thanks Bro.. but I found an easier way. I just reflashed the latest OTA update through CWM. After that, I reflashed CWM via fastboot and voila! didn't have to factory reset or reformat the system and data. Thanks tho.. I was beginning to freak out that I done screwed my OUYA, but I remembered my latest OTA flash flashed over CWM, which meant I had to reflash CWM via fastboot. Didn't want to go through the pain of having to re-set everything back up or redownload everything because I got my OUYA to how I want it.

Those were the steps I've done to get OUYA Safe Recovery to install correctly.

Glad you got it working :)

Sent from my Nexus 4 using Tapatalk 2
 
Last edited:

TadeoNYC

Senior Member
May 9, 2013
281
50
New York
I've been looking to wipe my OUYA for a fresh start, and want input if this is safe. I just wiped my Nexus 7 after the 4.3 update and su went haywire, but they are very different devices.

Using my current CWM install
1. Backup
2. Format /system /cache /data
3. Sideload OTA 409

4. Install OUYA safe recovery via Windows
5. Flash OUYA stockplus
6. Backup

Play

Can I use adb connected throughout the first three steps? To pull backup and then sideload the OTA. Formatting system, cache and data should leave the partition table intact and eliminate the need to factory reset and reboot, correct? This seems relatively safe if I can do the format and flash without rebooting in between.





Sent from my Nexus 7 using Tapatalk 4

Based on new posts, it appears the best route is
Using my current CWM install
1. Backup
2. Format /system /cache /data
3. Sideload OTA 409

4. Flash CWM
5. Flash OUYA stockplus
6. Install OUYA safe recovery via CWM

7. Backup

Is it worth flashing safe recovery at this point, or is waiting for native support in the Rom more prudent?

Sent from my SCH-I535 using Tapatalk 4
 

djassa1

Member
Mar 12, 2011
22
1
Cant get in Safe Recovery screen, not visible on my TV (720P), just says no signal. I am able to start default rom by pushing the power button but for the moment it's unusable.

Just wondering which resolution the safe recovery is using? seems an 1080P!?

Thanks
 

graffixnyc

Retired Forum Mod / Inactive Recognized Developer
Jan 21, 2011
6,627
6,486
New York City
www.graffixnyc.com
Heres the Screenshot

Did you ever get this figured out? I'm running into the same issue

Disable automatic recovery flashing..
Unknown id: /system/recovery-from-boot.p
Backing up current boot and recovery partitions..
Unknown id: /data/media/OriginalRecovery.img
Unknown id: /data/media/OriginalBoot.img
Unknown id: if=/dev/block/platform/sdhci-tegra.3/by-name/SOS
Unknown id: if=/dev/block/platform/sdhci-tegra.3/by-name/LNX
Flashing safe recovery and boot partitions..
Unknown id: if=/data/media/SafeRecovery.img
Unknown id: if=/data/media/OriginalBoot.img
Rebooting into OUYA Safe Recovery..
Installation completed. Press enter to exit!
 

xgutterratx

Senior Member
Sep 27, 2010
75
5
Hi

i used the the cmw recovery method to install and it looks like it has worked. when i reboot it boots into ouya safe recovery v1.0.0 and the stock rom did boot from this menu.

I am now trying to install OUYA-StockPlus-1.0.409.zip

and are getting an error

Warning : no file contexts

is there something i am doing wrong or missing.

now i get stuck in a boot loop when i try and boot primary rom.
pull power and get back to Ouya Safe Recovery.

I made a backup in cmw before i installed safe recovery should i try and restore that.

---------- Post added at 11:18 AM ---------- Previous post was at 10:39 AM ----------



i restored this back up.

.
when i reboot it is still booting into safe recovery but I am getting a file context error.
the stock rom is now booting from there.

can someone let me know how i fix this

and noob instructions on how to install stock plus.

i have also lost WiFi, Ethernet is working
 

frickinjerms

Senior Member
Sep 14, 2008
715
378
37
Victoria, TX
its going crazy because the 409 update wants to flash the boot img included to the boot partition perhaps?

the updater-script has
Code:
package_extract_file("boot.img", "/dev/block/platform/sdhci-tegra.3/by-name/LNX");
in it..

so if we remove that line from the updater-script (since the kernel has remained unchanged since day 1) and delete the boot img from the zip file, i think it should work?

or maybe if we change that last line of LNX to SOS in the updater-script it will flash accordingly?

---------- Post added at 11:46 AM ---------- Previous post was at 11:29 AM ----------



anyway, curiosity led me to see if this was reversible and it is..

adb shell into your ouya then su and type

Code:
dd if=/data/media/OriginalBoot.img of=/dev/block/platform/sdhci-tegra.3/by-name/LNX

let it finish the overwrite for the boot partition

then type

Code:
dd if=/data/media/OriginalRecovery.img of=/dev/block/platform/sdhci-tegra.3/by-name/SOS

and let it finish the overwrite of the recovery partition..

then back out of shell and adb reboot recovery (which got me back to cmw) :D

once this safe recovery becomes the standard for the chefs then i will defnitely be all over it but until then, gonna wait it out...
i appreciate the work though! :D
 
Last edited:
  • Like
Reactions: Ticiano

ArdDarvis

Member
Jul 4, 2013
47
9
NE ohio
best thing ever! i put donw the ouya for a while (got a SGP 5.0) but now i'm back and WOW! great job! i'd read about this being in the works, but i turn my back for 2 seconds and turn back around and its done! amazing to say the least.
 

xgutterratx

Senior Member
Sep 27, 2010
75
5
its going crazy because the 409 update wants to flash the boot img included to the boot partition perhaps?

the updater-script has
Code:
package_extract_file("boot.img", "/dev/block/platform/sdhci-tegra.3/by-name/LNX");
in it..

so if we remove that line from the updater-script (since the kernel has remained unchanged since day 1) and delete the boot img from the zip file, i think it should work?

or maybe if we change that last line of LNX to SOS in the updater-script it will flash accordingly?

---------- Post added at 11:46 AM ---------- Previous post was at 11:29 AM ----------



anyway, curiosity led me to see if this was reversible and it is..

adb shell into your ouya then su and type

Code:
dd if=/data/media/OriginalBoot.img of=/dev/block/platform/sdhci-tegra.3/by-name/LNX

let it finish the overwrite for the boot partition

then type

Code:
dd if=/data/media/OriginalRecovery.img of=/dev/block/platform/sdhci-tegra.3/by-name/SOS

and let it finish the overwrite of the recovery partition..

then back out of shell and adb reboot recovery (which got me back to cmw) :D

once this safe recovery becomes the standard for the chefs then i will defnitely be all over it but until then, gonna wait it out...
i appreciate the work though! :D

i can not get this to work, i have opened cmd and gone to
C:\android\sdk\platorm-tools

then typed adb shell got 127:shell@android:// $

typed su got127:shell@android:// #

entered the first line of code. looked to work finished with 8388600 bytes transferred
same with the 2nd line of code.

then exited and typed adb reboot recovery at C:/android/sdk/platform-tools

when it boots back into recovery Its still boots into safe recovery same after reboot.

i have a no file_contexts error at the bottom of safe recovery aswell.
 
Last edited:

frickinjerms

Senior Member
Sep 14, 2008
715
378
37
Victoria, TX
i can not get this to work, i have opened cmd and gone to
C:\android\sdk\platorm-tools

then typed adb shell got 127:shell@android:// $

typed su got127:shell@android:// #

entered the first line of code. looked to work finished with 8388600 bytes transferred
same with the 2nd line of code.

then exited and typed adb reboot recovery at C:/android/sdk/platform-tools

when it boots back into recovery Its still boots into safe recovery same after reboot.

i have a no file_contexts error at the bottom of safe recovery aswell.

If you ran the installer twice, by chance, then the backups made could be of the swapped partitions? That's the only reason why I can think of that happening.. What you could do is just extract the boot.img from one of the stockplus zips and just take the recovery.img from the cmw zip and put them to the internal memory on the ouya then run the commands again but instead of "/data/media/originalrecovery.img" or "/data/media/originalboot.img" use the path for the new ones like if you renamed cmw to clockwork.img you would put in "dd if=/data/media/clockwork.img etc etc"

Sent from my Galaxy Nexus using xda premium
 

Hogman500

Member
Nov 20, 2012
28
3
So in order to flash a zip that was made for cwm we need to modify the updater-script and either make it flash boot.img to the recovery or stop it from flashing it at all and flash it in fastboot?

Sent from my Atrix HD using xda app-developers app
 

Trooper_Max

Senior Member
Jan 27, 2011
153
49
How does this avoid getting stuck booting from the recovery partition?

For reference see my other thread here:
http://xdaforums.com/showpost.php?p=44030783&postcount=8

But basically it was my understanding that when you reboot into recovery, it writes a string to the misc partition that tells the bootloader to boot into recovery mode. If you have a regular rom boot.img stored in the recovery partition, it wouldn't know it needs to clear that string, so you would get stuck booting into the recovery partition over and over again and never be able to get back to the "safe" recovery stored in the boot partition. Normally the recovery rom would clear the string so that you can boot normally afterward.

I'd be curious if you found some way to overcome this or if I wasn't understanding something correctly.

Also, if you like any of my other ideas in my other thread, feel free to run with them! I just don't have as much time for Android development as I would like.

~Troop
 

jamiefff

Member
May 12, 2010
39
3
San Francisco
I did a update with stockplus rom and when I did I lost ouya safe recovery... I was able to put back on but want to know if they be a fix so I dont have to extra work to put back on thanks

Sent from my SM-T310 using XDA Premium App
 

locke06037

Member
Dec 1, 2011
33
6
Just a suggestion, Is it possible to boot to default ROM after X seconds? Or auto boot to default ROM if o USB keyboard detected or something.
 

alexp1289

Senior Member
Nov 18, 2011
751
248
Moto G Power
Hey guys I'm having a problem with my console. It is one of the limited edition consoles that was given to backers the only problem is that I can't get the recovery to install because when I click on install with the files that you download it says that adb is not a recognized internal or external command I've tried running it as administrator on my computer and the console also says that the bugging is enabled and the drivers are also installed by the directions I looked up using the device manager. Any help here please? I also tried doing adb devices in the command prompt in Android SDK and it listed no device IDs it was just blank. Also I am rooted and I do have busybox installed.

Sent from my DROID RAZR using xda app-developers app
 

alexp1289

Senior Member
Nov 18, 2011
751
248
Moto G Power
Really no one can help?

Sent from my DROID RAZR using xda app-developers app

---------- Post added at 03:11 AM ---------- Previous post was at 02:24 AM ----------

Really no one can help?

Sent from my DROID RAZR using xda app-developers app

ok tried a different computer and got the same error as some other people...

"============================
OUYA Safe Recovery Installer
============================
Plug a USB keyboard into the OUYA's (full-sized) USB port.
Press any key to continue . . .
Connect your OUYA to your Windows computer via micro-USB and wait for it to be r
ecognized.
Press any key to continue . . .
Open device manager.
If you see a yellow indication on your Ouya device
update the driver. The driver was included in this
package. continue after the driver is installed
and the device no longer has a yellow indication in
device manager.
Press any key to continue . . .
Adding Ouya USB Vendor ID for adb..
Killing the ADB server..
Waiting for your OUYA to be recognized properly..
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Pushing the resources to the internal SD card..
1324 KB/s (6950912 bytes in 5.125s)
139 KB/s (998 bytes in 0.007s)
Running the installer script on the OUYA itself..
Mount system as R/W..
unknown option -- o
Usage: su [options] [--] [-] [LOGIN] [--] [args...]

Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login pretend the shell to be a login shell
-m, -p,
--preserve-environment do not change environment variables
-s, --shell SHELL use SHELL instead of the default /system/bin/sh
-u display the multiuser mode and exit
-v, --version display version number and exit
-V display version code and exit,
this is used almost exclusively by Superuser.apk

Disable automatic recovery flashing..
Unknown id: /system/recovery-from-boot.p
Backing up current boot and recovery partitions..
Unknown id: /data/media/OriginalRecovery.img
Unknown id: /data/media/OriginalBoot.img
Unknown id: if=/dev/block/platform/sdhci-tegra.3/by-name/SOS
Unknown id: if=/dev/block/platform/sdhci-tegra.3/by-name/LNX
Flashing safe recovery and boot partitions..
Unknown id: if=/data/media/SafeRecovery.img
Unknown id: if=/data/media/OriginalBoot.img
Rebooting into OUYA Safe Recovery..
Installation completed. Press enter to exit!
Press any key to continue . . ."
 

nchantmnt

Senior Member
Jan 26, 2012
535
185
Batch doesnt like folders and paths with spaces ave special characters. What's your path to the batch file? Did you try to flash manually?

Gesendet von meinem HTC One X+ mit Tapatalk 2
 

alexp1289

Senior Member
Nov 18, 2011
751
248
Moto G Power
All I did was unzip the download to my desktop and installed drivers then open said folder and went to the windows folder that came with the download and followed the instructions.

Sent from my DROID RAZR using xda app-developers app
 

nchantmnt

Senior Member
Jan 26, 2012
535
185
I also have the limited edition and all works fine for me. Are you rooted ? Did you try to flash manually via dd? Otherwise you could use fastboot.

Gesendet von meinem HTC One X+ mit Tapatalk 2
 

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    OUYA Safe Recovery v1.0.0
    Because the OUYA lacks a hardware recovery button combination.
    Purpose

    To create a safe environment where the end user can flash their OUYA with confidence.

    How This is Achieved

    By switching the roles of the boot image and the recovery image, the user is presented with a customized recovery before entering the actual ROM. This gives the user a failsafe before they start to flash their OUYA. This way if something were to go wrong in the flashing process, the recovery image is still in tact and the system can be restored to a working state.

    Features

    Custom font size that looks better on HDTV's.
    Custom color scheme that matches that of the OUYA theming.
    Custom reboot options.
    4
    Downloads

    Computer Method: Ouya Safe Recovery Installer v1.0.0.zip - 16.08 MB
    Recovery Method: update_v1.0.0.zip - 6.93 MB

    Source and GPL

    The source for this project is quite simple, but will continue to evolve over time. If you are interested in taking a look at the required source code or compiling your own Safe Recovery binary, you can find the requested material here.
    3
    Installation Methods

    Method 1 - Computer

    Simply download the archieve containing a script that will flash your OUYA. Follow the on-screen directions based on the OS your computer is running.

    Method 2 - Recovery

    This method is a little more dangerous, but if you already have Clockworkmod Recovery installed on your OUYA you can flash the specified zip to install OUYA Safe Recovery.
    3
    Credits

    Credit to koush for maintaining ClockworkMod Recovery which this recovery is built and compiled from, and to mybook4 for the original CWM port to the OUYA.

    Donations and Thanks

    If you like the work that I am doing and would like to send a donation my way, please feel free to do so, even though it is not required. Every dollar is appreciated, and will go towards future development costs.