The CWM for Ouya project

mybook4

Senior Member
Apr 3, 2011
445
267
0
Backup worked fine, flash worked and I'm booting now to make sure it put the files where it was supposed to and see if they work. Then i'll reboot and restore and make sure those files go away.One thing to note is that when i choose reboot system now it asked me to disable recovery flash,so I took the plunge and said yes, we'll see if it goes back to stock or not...

It rebooted to stock recovery, as I expected, so still haven't flashed it just yet.
Yeah, I think install_recovery.sh is run on startup (init.rc of the kernel ramdisk tells it to run). I think we need to rename /system/recovery-from-boot.p to recovery-from-boot.bak in order to prevent the overwriting of the recovery partition.

UPDATE: Sure enough, that's what it was. I performed the following and now I have successfully flashed CWM to my recovery partition. I can reboot and it stays there.

1) adb shell
2) su
3) mount -o rw,remount -t ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
4) cd /system
5) mv recovery-from-boot.p recovery-from-boot.bak
6) exit
7) exit
8) adb reboot bootloader
9) fastboot flash recovery OuyaCWMRecovery.img
10) fastboot reboot
11) adb reboot recovery


NOTE: The updates issued by Ouya simply format the whole system partition and write an updated system partition. If you receive an update from Ouya, it will undo the change I described above and flash the stock recovery over CWM. Kind of annoying. We could prevent this from happening by turning off updates (I'm not sure how to do this yet). When Ouya releases an update, we could take the update.zip and modify it so that CWM wouldn't be overwritten. Not a huge deal.

Sent from my SCH-I535 using xda premium
 
Last edited:
  • Like
Reactions: Notfast

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
The .zip I built said it flashed correctly (unless i'm reading wrong the parts i could see with the overscan problems i'm having) but the files did not go to /system/app. I have attached the .zip file to see if I did something wrong with it
Looks like the update script is mounting /dev/block/mmcblk0p2 as system. Shouldn't this be /dev/block/mmcblk0p3

edit:
probably need to add this too.
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
 
Last edited:

mybook4

Senior Member
Apr 3, 2011
445
267
0
Looks like the update script is mounting /dev/block/mmcblk0p2 as system. Shouldn't this be /dev/block/mmcblk0p3
Yeah you definitely don't want to do that! 0p2 is LNX (the kernel). I'm surprised it even booted after that flash! Skywalker, if you run into problems booting, let me know. We can fix it.

Better to do the following:

mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");

We know APP is the /system parition.
 
Last edited:

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
with the music zip, once the right fstab is built into the recovery, wonder if we can just flash the regular gapps.zip and get the play store.

---------- Post added at 05:21 PM ---------- Previous post was at 05:10 PM ----------

We could prevent this from happening by turning off updates (I'm not sure how to do this yet). When Ouya releases an update
could edit the build.prop and change the ro.update_url= to localhost or something? put it in an install.zip...
 

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
worth a shot. If no one has tried it by the time I make it home I'll try modifying the gapps zip to mount
I'm hoping we don't have to edit the gapps script at all, I think that update script uses fstab to mount system, so as long as recovery is correct I'm hoping it just works.

edit: is there a post with the new recovery build? The only one I see looks like its before the post where it had the right fstab...
 
Last edited:

sonofskywalker3

Senior Member
Jan 22, 2009
812
460
0
I see what you mean, The updater-script for the gapps just mounts system, doesn't say where it is. like i said, for music.zip i just downloaded a sample from a tutorial and added the files, mostly to see if the flash would happen. My restore worked perfectly, so I'm going to flash gapps now. cross your fingers!

Note that mybook4's CWM recovery.img from post 16 is what I'm using.
 
Last edited:

mybook4

Senior Member
Apr 3, 2011
445
267
0
I see what you mean, The updater-script for the gapps just mounts system, doesn't say where it is. like i said, for music.zip i just downloaded a sample from a tutorial and added the files, mostly to see if the flash would happen. My restore worked perfectly, so I'm going to flash gapps now. cross your fingers!

Note that mybook4's CWM recovery.img from post 16 is what I'm using.
I noticed someone thanked the post with the music zip. Might want to take that down before someone else flashes it.

Sent from my SCH-I535 using xda premium
 

sonofskywalker3

Senior Member
Jan 22, 2009
812
460
0
Thanks for the heads up. So i flashed gapps, flash worked fine, it booted up, did the "your OUYA is upgrading" thing for a bit, then setupwizard.apk crashed. I deleted setupwizard.apk from system/app and the launcher popped up, and there was google play. I opened it, and was greeted by the welcome site of the "add a gmail account" wizard. I put in my account info with no problems, but then, alas, google play crashed. Now whenever I reboot I get the "Your OUYA is upgrading" and it optimizes apps for about 45 seconds. I also get 5-8 popups saying the process "com.google.process.gapps" has stopped, and google play store has stopped before it settles down.

I have attached a copy of the 4.1.2 gapps.zip with setupwizard.apk removed for your convenience.

https://dl.dropboxusercontent.com/u/7653846/gapps-OUYA-alpha1.zip
 

mybook4

Senior Member
Apr 3, 2011
445
267
0
So it sounds like the cwm recovery works well. I'll post some final instructions and we can open a new thread for getting the Play store working.

Sent from my SCH-I535 using xda premium
 

sonofskywalker3

Senior Member
Jan 22, 2009
812
460
0
So it sounds like the cwm recovery works well. I'll post some final instructions and we can open a new thread for getting the Play store working.

Sent from my SCH-I535 using xda premium
I'd suggest for the sake of ease, you go ahead and post a new thread we can get stickied with the method to install CWM, and the recovery.

I'm currently working on a "getting started" package to flash to a stock ouya once cwm is installed that will include the basics like Hulu, Netflix, Nova Launcher, Pandora, Play Music, ES File Explorer, and the Amazon App Store. I'll play more with the Play store later and start a new thread unless you beat me to it.
 

CptTwinkie

Senior Member
Sep 1, 2010
160
24
0
Prague
I don't know if you guys noticed yet but your work was featured on xda tv. Good job and thank you.

~L.T.
Sent from my Galaxy S3 [AT&T][CM10.1]
Galaxy S Captivate [CM10.1]
Nexus 7 [CM10.1]
OUYA [Stock Rom...for now]
 

TadeoNYC

Senior Member
May 9, 2013
281
50
0
New York
Congrats on getting some well deserved recognition. Let's all keep our fingers crossed that you will make repeat appearances as development progresses on the Rom

Sent from my GT-P3113 using Tapatalk 4 Beta
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone