[HOWTO] [GUIDE] Repairing corrupted /data partition - Nexus 5 General

I had an experience the other night that I found rather frightening and enlightening, and felt the need to contribute my learning. I attempted to install a new ROM on my Nexus 5 and encountered a freeze during the /system write process. I waited 30 minutes and decided it wasn’t going to finish, so I powered off. As an avid and experienced ROM flasher I knew this could hurt, and knew it was an inevitable requirement.
Upon rebooting back to recovery (I had already wiped /system /data, etc. in preparation for a new ROM) I found that I was unable to mount /data and subsequently /sdcard. I received a few different errors depending on which recovery I attempted (fastboot flashed). I was given neat things like “Enter password to decrypt /data” – TWRP, or “E: Unable to mount /data, invalid argument”, “E: Error mounting /data”, “E: Error mounting /sdcard”.
During all of this I realized I could get an ADB shell going from within Philz recovery (I am not sure if TWRP or CWM do this, nor did I try). After much research, and very much to my dismay, I was unable to find a complete guide or walkthrough for how to go about recovering from this. This is the procedure I glued together from my own digging and manual learning of the commands required. This procedure may or may not work in all cases but is a viable step to recovering your /data partition before going the nuke & pave route with the factory image!
(NOTE: I’ll try to keep this as simple as possible. I am not a dev. I do this for fun/learning in the little free time I get and am not typically available to assist, so please use this only if you feel comfortable with the material. Flashing a ROM/Kernel/etc. is one thing. Digging in the innards of the Android partitions/file system is a whole other beast! To be VERY clear: I am not responsible for damages or loss incurred by the use or misuse of this information.) Also note, if you have an ADB enabled recovery, you can probably try this process against your devices partitions as well.
The following instructions assume you are unable to mount /data or /sdcard on the Nexus 5 and are receiving errors. This also assumes that the wipe /cache function is not resolving the issue for you (as this seems to work for some depending on the issue).
Prerequisites:
- Philz recovery for LGE Nexus 5 (http://forum.xda-developers.com/showthread.php?t=2565174)
- Android ADB interface drivers and software (Available from existing root toolkits and SDK)
- Fastboot executable (Also available from existing root toolkits and SDK)
***Note: I performed all of this from Windows 8. The toolkit I used was Wug’s Nexus Root Toolkit (http://forum.xda-developers.com/showthread.php?t=2517778). If you are a Windows user, read and follow the toolkit instructions to install the drivers. Use the Advanced Utilities[Launch]->Manual Input[Launch CMD Prompt] to bring up a Command prompt and perform the steps below.
- For simplicity, ensure that the ADB and Fastboot binaries are in the same location if you are gathering these binaries from the SDK or other source.
- Create a folder that you can later use to pull recovered files from your phone. (if so desired)​
Terminologies used:
- Terminal = Command Prompt (Windows), Bash/etc (Linux), Terminal (MacOSX)
- Fastboot = Application that interfaces with the Bootloader (flash/wipe partitions, etc)
- ADB = Android Debug Bridge (Provides an interface to interact with Android filesystem)
- Binaries = Files containing executable code (for this context, ADB and Fastboot applications)
- Bootloader = Think of it as the EFI or BIOS equivalent for your phone. (Accessed with VOLDN+PWR)
- Recovery = CWM/TWRP/Philz (We will be using Philz, as this was what I used to write this guide)​
Steps:
1. Install all required drivers and prerequisites listed above.
a. Use Wug’s toolkit or whatever method gets your drivers installed for your OS.​b. If you are not familiar with this process, then please research!​
2. Power off your phone and connect via USB to your PC.
3. Power your phone into the bootloader by holding the PWR+VOLDN keys
4. In a Terminal, browse to the location of your fastboot binaries. (See prerequisite note for Wug’s)
a. Enter ‘fastboot devices’ to verify that your phone is detected. If it returns a “<serialnumberofdevice> fastboot” then you may proceed. If it does not, please check your driver installation and start over.​
5. Flash and boot to Philz recovery:
a. Extract the ‘recovery.img’ file from Philz Recovery ZIP and place in the same location that fastboot and adb binaries are located.​b. Enter ‘fastboot flash recovery recovery.img’ (without quotes) in the Terminal. This will write the new recovery.​c. Once complete (takes a brief second usually), use the VOLUP/DN keys until the Bootloader shows “Recovery Mode” and press the power key. Your phone should now be booting into Philz recovery.​
6. Use ADB to launch a root shell from within Philz recovery
a. Ensure that the drivers are now detecting your device as an ADB ready device by entering: ‘adb devices’. If it returns “<serialnumberofdevice> recovery” then you are ready to proceed. If it does not, please verify your ADB driver installation and check again.​b. Enter: ‘adb shell’ to gain full root shell access to the Android file system. (You should see a “~#” prompt to show that you’re now in a root shell)​
7. Attempt repair of /data partition. This partition includes /sdcard and dalvik. (/sdcard is linked to /data/media) At the ~# prompt:
a. Enter: ‘e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata’​b. You should now be prompted to repair or fix errors. Press [Enter] key to use the default answer of for yes. If you are not, then this fix may not apply to you.​c. Continue pressing [Enter] until the process completes.​d. Proceed to next step if you have gotten this far.​
8. Attempt to manually mount the data partition.
a. We are going to mount /data as read-only for now. To do this, enter: ‘mount /dev/block/platform/msm_sdcc.1/by-name/userdata /data’​b. If mount is successful, it will simply drop down to the next blank shell prompt. If it fails, you will receive an error. If you receive an error, then the repair has failed.​c. If you did not receive an error, you can now browse to your /data and /sdcard partitions. This is accomplished by entering: ‘cd /data’ for /data, and ‘cd /data/media/0’ OR ‘cd /sdcard’ for your /sdcard (/sdcard is a link that will drop you directly to /data/media/0)​
9. BACKUP YOUR ENTIRE SDCARD TO YOUR COMPUTER!!! (Optional, but highly recommended)
a. Enter: ‘adb pull /data/media <path_on_computer>’​b. <path_on_computer> will be a folder you created in the prerequisites.​c. Wait for this process to complete.​
Congratulations! You may now proceed to launch recovery and flash at will. I highly recommend after making the backup in step 9 that you perform a full factory reset to correct any potential lingering issues with the partitions. You can then push the files back to your /sdcard by mounting /data as RW using ADB shell through Philz recovery (please reference the ‘mount’ and ‘adb’ command utilities for information about how to do this).
If you find yourself in the unfortunate position to have to use this, please share your results in the forum for others. If you find something does not work, please post it (I will check occasionally and update as I can). I do not frequent my PM’s, and again, I am not available to provide support. Please understand this and use at your own risk.
If this helped you, then my job here is done . Thanks for reading!
(I am not affiliated with any of the devs that provide these tools. Be sure to thank them if you used their tools, as they deserve all credit for enabling and teaching us to do these things – even when we do break our own stuff!)

Nice guide I'm sure this is going to be very useful for a lot of people. :thumbup::thumbup:
Sent from my Nexus 5 using Xparent BlueTapatalk 2

Really helpful guide, I corrupted the data and cache partition while updating (via official OTA by sideload) to 4.4.1 (full stock Nexus 5), and I had to format all flashing then factory image and losing all the data...
Now if it does happens another time, I'll know what to do.
Thanks

Good write up but, I don't recommend tool kits. You can do all this with fastboot commands. You could just flash userdata image with fastboot

As a Linux admin, I'd wanna format /data after pulling off any files I wanted to keep rather than just rely on fsck . Is that an option? Is mkfs even on the recovery?
Sent from my BN NookHD+ using xda app-developers app

Thanks for sharing.
My nexus5 cant mount cache partition and i cant flash to stock factory,this maybe helpful.
Thank you again.

ywt474000158 said:
Thanks for sharing.
My nexus5 cant mount cache partition and i cant flash to stock factory,this maybe helpful.
Thank you again.
Click to expand...
Click to collapse
Can you fastboot flash the cache.img?

razholio said:
As a Linux admin, I'd wanna format /data after pulling off any files I wanted to keep rather than just rely on fsck . Is that an option? Is mkfs even on the recovery?
Sent from my BN NookHD+ using xda app-developers app
Click to expand...
Click to collapse
I'm no Linux admin but there's a wipe /data button which does that in TWRP and also probably in CWM.
Sent from my Galaxy Nexus using Tapatalk

Somehow it seems as though all of my partitions have been wiped/corrupted and I was directed to this thread as possible help. When trying to run step 7 command(had to do it with CWM v6.0.4.5 as it doesn't seem to want to keep philz when sideloading or fastboot flashing it), it gives me the following response:
e2fsck: 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/userdata
The super block could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>
My phone was having freezes and shutdowns so I decided to flash a new ROM to freshen things up and it failed and aborted. After that I've got no android to boot into and I can't mount or access any of the partitions. I've got fastboot and adb, but no clue where to begin as it seems like I have to recreate my partition table but can't find any info on doing that for the nexus 5 itself

tidoubleger said:
Somehow it seems as though all of my partitions have been wiped/corrupted and I was directed to this thread as possible help. When trying to run step 7 command(had to do it with CWM v6.0.4.5 as it doesn't seem to want to keep philz when sideloading or fastboot flashing it), it gives me the following response:
e2fsck: 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/userdata
The super block could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>
My phone was having freezes and shutdowns so I decided to flash a new ROM to freshen things up and it failed and aborted. After that I've got no android to boot into and I can't mount or access any of the partitions. I've got fastboot and adb, but no clue where to begin as it seems like I have to recreate my partition table but can't find any info on doing that for the nexus 5 itself
Click to expand...
Click to collapse
Have you tried this yet http://forum.xda-developers.com/showthread.php?p=47156064

jd1639 said:
Have you tried this yet http://forum.xda-developers.com/showthread.php?p=47156064
Click to expand...
Click to collapse
Yes I tried it by using the flash-all.bat, flashing individually, and even Wug's toolkit as a last resort there but got nothing. When flashing the bootloader and radio it sends over fine but then gives me FAILED (remote: flash write failure) and finishes. When trying to flash the system or userdata it gives me FAILED (remote: failed to erase partition) and ends.

tidoubleger said:
Yes I tried it by using the flash-all.bat, flashing individually, and even Wug's toolkit as a last resort there but got nothing. When flashing the bootloader and radio it sends over fine but then gives me FAILED (remote: flash write failure) and finishes. When trying to flash the system or userdata it gives me FAILED (remote: failed to erase partition) and ends.
Click to expand...
Click to collapse
I'm thinking your emmc went bad. Rma is probably your option right now

jd1639 said:
I'm thinking your emmc went bad. Rma is probably your option right now
Click to expand...
Click to collapse
Well as far as Google knowing it, if I am able to successfully reset the tamper flag and lock the bootloader am I good to go or will they still find out?

tidoubleger said:
Well as far as Google knowing it, if I am able to successfully reset the tamper flag and lock the bootloader am I good to go or will they still find out?
Click to expand...
Click to collapse
If all your positions are corrupted I doubt you'll be able to reset the tamper flag. But also, no one will be able to see the tamper flag. But try to reset it and try to relock the bootloader. I don't think anyone will be able to tell if you modified anything or not.

not know
Did not know this could be done

jd1639 said:
If all your positions are corrupted I doubt you'll be able to reset the tamper flag. But also, no one will be able to see the tamper flag. But try to reset it and try to relock the bootloader. I don't think anyone will be able to tell if you modified anything or not.
Click to expand...
Click to collapse
Hmm, I can see that the tamper flag is still true even after running that zip because it still fails because it can't mount /cache. I'm getting the feeling that the partitions aren't corrupted but have just been wiped or something. When I booted into TWRP through fastboot I was able to adb push to the sdcard and it showed up in the list when trying to install a zip, however the Internal Storage still read 0MB. I won't be able to RMA it for a few more days so if any other ideas come about, I'm all for it as I'd rather not have to RMA this lol

tidoubleger said:
Hmm, I can see that the tamper flag is still true even after running that zip because it still fails because it can't mount /cache. I'm getting the feeling that the partitions aren't corrupted but have just been wiped or something. When I booted into TWRP through fastboot I was able to adb push to the sdcard and it showed up in the list when trying to install a zip, however the Internal Storage still read 0MB. I won't be able to RMA it for a few more days so if any other ideas come about, I'm all for it as I'd rather not have to RMA this lol
Click to expand...
Click to collapse
In twrp 2.6.3.4 have you tried going into wipe and then format data?

@tidoubleger I am going to call in some RCs that were having this problem on an N7. They eventually got it sorted and up and running. They might be able to help.
@demkantor @MameTozhio @kilometers4
Fellas, would you be able to help this person out the same way you did here.

jd1639 said:
In twrp 2.6.3.4 have you tried going into wipe and then format data?
Click to expand...
Click to collapse
Yeah it fails due to being unable to mount /cache.
Woody said:
@tidoubleger I am going to call in some RCs that were having this problem on an N7. They eventually got it sorted and up and running. They might be able to help.
@demkantor @MameTozhio @kilometers4
Fellas, would you be able to help this person out the same way you did here.
Click to expand...
Click to collapse
Thanks Woody, I appreciate the call to arms I'm currently at Disneyworld, so I won't be able to test anything until this evening but will do my best to answer questions until then

tidoubleger said:
Somehow it seems as though all of my partitions have been wiped/corrupted and I was directed to this thread as possible help. When trying to run step 7 command(had to do it with CWM v6.0.4.5 as it doesn't seem to want to keep philz when sideloading or fastboot flashing it), it gives me the following response:
e2fsck: 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/userdata
The super block could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>
My phone was having freezes and shutdowns so I decided to flash a new ROM to freshen things up and it failed and aborted. After that I've got no android to boot into and I can't mount or access any of the partitions. I've got fastboot and adb, but no clue where to begin as it seems like I have to recreate my partition table but can't find any info on doing that for the nexus 5 itself
Click to expand...
Click to collapse
I had the same problem. This is how I got it sorted.
follow these steps and you should get it sorted
fastboot erase system -w
fastboot erase boot
fastboot erase recovery
fastboot flash bootloader bootloader.img
fastboot flash recovery recovery.img
once it flashes, boot into recovery.
format sdcard (i believe it is)
Now adb sideload ROM and gapps
I have class until this afternoon, but that should get it fixed
If you have any hangups post it here and I'll help you when I'm free.
Good Luck

Related

[Q] G1: Restore from a backup without recovery mode?.

I have a G1 htc dream (european variant = rogers 32a), and I'm slowly losing out. The thing is on CM-6.0, it never had enough memory, and eventually crashed it's way into a mess, and I'm pondering the next move.
What works: All phone features, root terminal, fastboot (r2d2s on skateboards), some programs. I can read/write the sdcards independently. I even have access with the old version of adb. It boots, & reboots.
I have a nandroid backup from late last year on the sdcard, which would do very nicely thank you if I could get it installed. Is there any way to install the backup without access to recovery mode? How are those image files cobbled together?
What doesn't work:
1. Recovery Mode(?) turn-on-with-home-pressed. I can't get off the (opening) blue screen. Remove the battery to restart.
2. /etc/fstab & /etc/mtab are no longer there :-/. /proc/mounts is. I don't know what else is missing, but it implies some essential daemon is awol. Amazingly it writes to the sdcard :-//.
3. Market - It says "starting download....." but it doesn't:-(
4. Memory control. I can start with a bit free, but as uptime continues, the memory vanishes, and anything you open crashes.
I do have linux, and a root terminal on the phone. But without /etc/fstab, all those crazy android device names are not to be seen :-//. ls /dev/block shows me loop0 - loop7; mmcblk0, mmcblk0p1 - mmcblk0p3; mtdblock0 - mtdblock5; vold.
If you have fastboot and a nandroid, you can flash all images separately, i.e.
fastboot flash system <system.img>
fastboot flash userdata <data.img>
...
In the Cyanogenmod Wiki you can find probably some additional hints
With fastboot you can also flash a new recovery ...
AndDiSa said:
If you have fastboot and a nandroid, you can flash all images separately, i.e.
fastboot flash system <system.img>
fastboot flash userdata <data.img>
...
In the Cyanogenmod Wiki you can find probably some additional hints
With fastboot you can also flash a new recovery ...
Click to expand...
Click to collapse
Thanks for the reply.
Image on pc, and fastboot on pc? I'll try that.
Ok. Not out of the woods, but I've made some progress. The obstacle is: recovery isn't mounted, and I only have /proc/mounts. In /dev/block
mtdblock3 is mounted on /system
mtdblock4 is mounted on /cache
mtdblock5 is mounted on /system/xbin
There is mtdblock 0-5. Where the $£%@! is recovery supposed to be mounted? what about the other ones? anyone got an /etc/fstab from a G1??
Actually, I probably have but it's archived. I had figured this on the android by using adb and dump_image, but that's restoring a system while it's running, and there should be laws against that sort of thing.
??? ... recovery is never mounted, it's like a second "mini" os.
Additionally: for using fastboot your phone must be in fastboot mode, i.e. boot with back+power. I suggest you to first read a bit more about fastboot, g1 partitions, etc. ...
Sent from my Gingerbread on Dream using XDA App
That worked after a fashion. I had the backup: system.img, boot.img, cache.img, recovery.img, data.img, & misc.img. Of these, I could flash recovery, cache, system, & boot. The data.img & misc.img threw errors, (me)not knowing where they should be put.
It wasn't enough. I had a trail of processes bailing out and a repeated crash in acore typical of memory being clogged. But I got back recovery mode, and I could apply the latest backup normally. I'm now back to the moments after my successful install of CM-6.0 - before I started civilising it. And I don't really have the ram for it.
Good good good, thank you very much. As I don't have the ram, I'll have to add swap, which I have my sdcard set up for. It's certainly less pain than looking for a lower level rom and going to a smaller OS.
I do have one hitch: I've lost root in the xterm (and I don't know where else).
$ su
permission denied
$
:-O?
EDIT:: I'm a twit. I forgot to run the fix_permissions script. Didn't know I backed up _THAT_ promptly. Permissions were AWOL. So are a few apps, but nothing I'm worried about. Now

[WIP][ThinkTank] Alternate Boot Methods (Safely boot CM10 from usb)

This thread is for brainstorming and developing safe ways of booting our OUYAs to use custom ROMs.
I've developed an initial method that allows OUYA to boot CM 10 from a usb thumb drive that does not require you to mess with any of your internal storage at all! This allows you to keep your OUYA in pristine stock condition, while still enjoying CM 10 from an external thumb drive.
Unfortunately it does require you to setup the thumb drive in a particular way to allow it to be used and this may be difficult for some users without Linux experience. I hope some will find it useful and plan to develop easier methods in the future (probably involving a custom recovery image with the ability to setup the thumb drive for you)
I plan to post more details on how I achieved this so that others can use the knowledge and apply it to other roms or develop improved solutions, but I might work on some other things first. Mainly it involved unpacking/repacking the Android boot.img (google it and there are tutorials about how to do this, I also recommend checking out the "abootimg" program from the Ubuntu packages) and modifying a couple of the init/fstab files.
Note that the zip I am going to link to is not a flashable zip, extract it and follow the instructions in the README which I am including below. Also note the the Google apps are not included - so if you want them you will need to add them yourself. Just be aware things you add to the system partition will need correct permission set.
One of my other ideas I'm going to eventually try is swapping the boot/recovery partitions so that the device normally boots up into recovery and then will have an option to reboot into the recovery partition which would actually boot a full rom for regular use. This may still be dangerous on OUYA though, so is not recommended unless you know what you're doing. I have a Notion Ink Adam which I can boot into APX mode (a low-level nVidia recovery mode that can be used to restore the device in the case of bricking, unfortunately we do not have this level of acces on OUYA), so it will be much safer for me to experiment on it. I haven't really developed on it before though (in fact this OUYA bit is my first major Android development apart from doing/tweaking some CM builds from source myself for some of my devices), so it may take me some time to set stuff up to experiment with it.
Eventually I think we need some form of bootloader for the OUYA. I have read about some very interesting kexec hardboot patches that were developed for the original Nexus 7 that it would be very awesome if we could port to OUYA - that would allow us to boot the patched kernel and have it boot us into kernels/roms stored elsewhere.
Please post any feedback or ideas. Sorry the current method isn't that easy yet and I hope the instructions make sense - hopefully others can also help clarify.
If you'd like to donate to me, I'm certainly not going to turn you away, but keep the other devs in mind 'cause I haven't done that much yet! ( PayPal: [email protected] )
~Troop
ouya-sda123-boot by Trooper_Max
Safely boot your OUYA to CM 10 without messing with your internal storage! (fast thumb drive recommended!)
========
Credits:
========
khanning88 for the initial CM10 Experimental ROM - this is just a repackaging/reconfiguration of it.
mybook4, sonofskywalker3, rayman, professorpoptart for their CWM recovery
And of course the CyanogenMod/ClockworkMod team for the basis of everything!
=========
Contents:
=========
ouya-cm10-system.img:
ext4 system image dumped from CM 10 experimental OUYA rom
ouya-sda123-boot.img:
Android boot.img to boot CM 10 from thumb drive partitions (details below)
==============
Prerequisites:
==============
For this current method, you will need to be able to partition the thumb drive into three ext4 partitions. This probably means you need Linux - if you don't have a Linux system, I highly recommend checking out pendrivelinux.com for methods of booting Linux off of a thumb drive (I recommend Ubuntu 12.04 LTS or whatever version you are comfortable with).
I hope to develop more methods in the future that will be easier than this, but this is the initial method.
=============
Instructions:
=============
1. Partition the thumb drive with three ext4 partitions - note that they must be the first three partitions on the thumb drive, and I would likely just dedicate a thumb drive to this. I recommend using Disk Utility or gparted (usually both available from an Ubuntu thumb drive).
* The first partition will be the data partition and should be the largest
* Note that Android will create the virtual sd card at /data/media
* The second partition will be system (OUYA internal system is 512 M)
* The third partition will be cache (OUYA internal cache is 768 M)
* Feel free to adjust the size of the partitions, but I'd recommend sticking close to the stock sizes
* I've tested this on an 8 GB as well as a smaller 4 GB thumb drive, bigger should not be a problem
2. Note the device name of your thumb drive - It will likely be sdX where X is a letter corresonding to the order it was mounted in - I would expect it to be sdd if it happens to be the fourth drive connected to your machine. The system partition will then be sdX2.
3. Write the ouya-cm10-system.img to the second partition of the thumb drive. It is crucial that the files get copied into the partition with the correct permissions.
* The easiest way to ensure this is to use dd to do a byte for byte copy of the system image directly over the partition, but this is also very dangerous if you type it wrong, so be sure you have the write device name for your thumbdrive.
* I recommend looking in the Disk Utility or gparted, or running "mount", "df -h", and "cat /proc/partitions", to make sure you have an understanding of what drives are what device names before continuing
* Once you are certain of the device name, ie sdX2, where X is the letter for the thumb drive and 2 denotes the second partition which we are using as system, run "dd if=ouya-cm10-system.img of=/dev/sdX2 bs=4M" as administrator (on Ubuntu either by sticking the word "sudo" in front of the command or running "sudo su" first to switch to root)
* This command will not show any output until the end and may take a little while.
4. Clean/fix the filesystem and resize the filesystem to fill the partition.
* Run "esfsck -fp /dev/sdX2" as administrator
* Run "resize2fs /dev/sdX2" as administrator
5. Thumb drive is now ready (the data/cache partitions can be empty ext4, Android will fill them in). Connect it to the OUYA. Through a hub is fine - just be sure it is the only thumb drive connected at boot.
6. Boot the OUYA into fastboot mode. The only real way to do this right now is to first boot up the OUYA normally, then use "adb reboot bootloader" to reboot into the bootloader. You should be able to run "fastboot devices" then and see a device listed.
7. Boot ouya-sda123-boot.img using the command "fastboot boot ouya-sda123-boot.img". You should see it download to the OUYA and it should start booting.
8. Wait patiently. Remember that CM boots slow the first time and depending on the speed of your thumb drive may boot even slower. You can however type "adb devices" to see if it has started the adb daemon. If you don't see a boot animation after a while, you can try running "adb shell" and if you get a permission error, it probably means you didn't flash the system partition correctly, but hopefully all goes well. Note though that once it gets farther into the boot sequence it will turn off the adb daemon so you will lose adb access until it boots up and you can re-enable it.
9. Enjoy CM 10 on your OUYA without having messed with your internal storage! Just be sure not to let your OUYA fall asleep, as it may not be able to wake back up! I'm guessing this is because I was using a hub and so when it falls asleep, the thumb drive essentially gets disconnected and it cannot immediately find it again when it tries to resume. I'd recommend using a wakelock application or power toggle to keep the screen on all the time, etc.
========
For Help
========
Look for us on the XDA Developers Forum under the appropriate threads! Keep in mind that using this method to boot CM 10 may introduce new bugs that would not have occurred using CM 10 the regular way, so be sure to report problems in the appropriate place and mention what methods you used!
Click to expand...
Click to collapse
http://troopermax.com/releases/ouya-sda123-boot.zip
(be gentle - it's 145 MB, I use shared hosting, so feel free to mirror)
md5sum: 49c8e16e27b6deb9d1e8e86363b56f2f
Mirror: http://www.mediafire.com/download/hban76kzeys6ybd/ouya-sda123-boot.zip
~Troop
I'm including some rough developer details here for now about how I did it.
Many thanks once again to the OUYA CWM recovery, I found it insanely useful: http://forum.xda-developers.com/showthread.php?t=2295645
The main part was unpacking/modifying/repacking the boot.img (which contains the kernel/ramdisk/etc)
abootimg helped with this greatly:
http://manpages.ubuntu.com/manpages/precise/man1/abootimg.1.html
Then I followed instructions I found via google for unpacking/repacking the ramdisk:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
The partitions the OUYA uses are mostly defined in fstab.cardhu:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# We remount because we first mount as rw in order to generate NVSI symlink. See init.rc for details.
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,remount wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,journal_async_commit,data=writeback,nodelalloc,errors=panic wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nosuid,nodev,journal_async_commit,data=writeback,nodelalloc,errors=panic wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MDA
Click to expand...
Click to collapse
I found that I could use fastboot to boot into the CWM recovery and then use adb pull to dump images of the internal OUYA partitions, using the paths above, ex. "adb pull /dev/block/platform/sdhci-tegra.3/by-name/APP ouya-system.img" to dump the system partition. I did a regular clockwordmod backup first, but adb pull was useful here for pulling raw images.
So after backing up my OUYA stock system, I actually did flash the CM10 rom so that I could dump the partitions to my computer using adb. The main reason I did this was to ensure the system partition gets generated with the correct permissions. I didn't boot into CM10 though, though I was tempted. Instead I restored back to my backup to put my OUYA back in stock condition.
With the system image dumped into a file, I used resize2fs to shrink the file to the minimum size (resize2fs -fM ouya-system.img) This probably wasn't absolutely necessary since it would compress down in the zip, but this allows it to be written to smaller partition sizes.
http://manpages.ubuntu.com/manpages/precise/en/man8/resize2fs.8.html
Here is what I modified the fstab.cardhu to:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# We remount because we first mount as rw in order to generate NVSI symlink. See init.rc for details.
/dev/block/sda2 /system ext4 rw wait
/dev/block/sda3 /cache ext4 noatime,nosuid,nodev,journal_async_commit,data=writeback,nodelalloc,errors=panic wait
/dev/block/sda1 /data ext4 noatime,nosuid,nodev,journal_async_commit,data=writeback,nodelalloc,errors=panic wait
Click to expand...
Click to collapse
Pretty straightforward, except that I removed the encryptable part on /data (not sure how that bits work and if I might have broken it) and made system read/write.
Also note, that I removed the initial read/write mounting of system in init.cardhu.rc since I was having trouble with it mounting from there (I'm guessing because my usb hub/thumb drive weren't yet available when that tried)
Here's the relevant part of init.cardhu.rc:
Before:
on fs
setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
setprop ro.crypto.umount_sd false
# PLEASE DO NOT REMOVE NVSI SYMLINK! IF CHANGES ARE NEEDED PLEASE ENSURE THAT NVSI SYMLINK IS ALWAYS CREATED.
# Mount system to allow NVSI symlink
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP /system rw
# Create NVSI filter symlink
symlink /data/data/com.nvidia.NvCPLSvc/files/com.nvidia.nvsiutilv1.xml /system/etc/permissions/com.nvidia.nvsiutilv1.xml
mount_all /fstab.cardhu
#chmod for OUYA parameters
chmod 0644 /dev/block/mmcblk0p5
Click to expand...
Click to collapse
After:
on fs
setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
setprop ro.crypto.umount_sd false
# PLEASE DO NOT REMOVE NVSI SYMLINK! IF CHANGES ARE NEEDED PLEASE ENSURE THAT NVSI SYMLINK IS ALWAYS CREATED.
# Mount system to allow NVSI symlink
#mount ext4 /dev/block/sda2 /system rw
mount_all /fstab.cardhu
# Create NVSI filter symlink
symlink /data/data/com.nvidia.NvCPLSvc/files/com.nvidia.nvsiutilv1.xml /system/etc/permissions/com.nvidia.nvsiutilv1.xml
#chmod for OUYA parameters
chmod 0644 /dev/block/mmcblk0p5
Click to expand...
Click to collapse
Basically I commented out the mount command - before it was mounting system read/write for a moment to insert the symlink and let the filesystem update itself before remounting read-only in the fstab. The way I do it now it is simply mounted read/write from the fstab and left that way (some may consider this unsafe, but it is good for development... not too hard to remount it read-only if you so desire) I also shifted the symlink command down below the mount all command so it would hopefully still work... not sure what that was for, but they made it sound really important! XD
I also commented out this part about the usb drive since it doesn't really make sense anymore:
# Mount usb drives as /usbdrive. Generally usb drives are formatted with FAT
# filesystem, so we support FAT as of now.
#on device-added-/sys/block/sda
# mount vfat /dev/block/sda /mnt/usbdrive
Click to expand...
Click to collapse
I think those were all the changes I made before repacking it, though it did take me 5 attempts to get a working ramdisk so I may have lost track of something at some point. Those should be the key changes at least.
I also initially used raw dumps of the data and cache partitions on my thumb drive as well to make sure it would work. Then I tested to make sure it would work if they were empty ext4 partitions, which they do - Android fills them in as necessary. So only the system image was necessary to include. (and of course the boot.img for fastbooting)
This was a little bit harder than I had anticipated because I'd previously only looked into this type of thing for Gingerbread devices which aren't set up the same way. I'd kinda been hoping to get a solution where the user could just drop a system.img and data.img onto a fat32 usb thumb drive and the boot.img would loop mount them off the thumb drive. I haven't tried this for Gingerbread, but it seems pretty straightforward. It's not straightforward anymore here since fat32 sdcards aren't used anymore. Being familiar with Linux though, I am happy they are using ext4 everywhere and using the same space alloation for /data and /sdcard so you don't have to worry about which one to make big, but it does make some things more complicated for more average users. It's probably still possible to get the OUYA to do what I wanted, but more complicated and not sure it's worth pursuing over other methods which may be more fruitful.
Hope that's enough details to enlighten some people who may be wondering about the methods used here. My goal is to not only develop new ways of booting the OUYA, but also to share how I accomplished things so that others can learn from it.
~Troop
Is this similar to the Nook HD + CM10 boot?
---------- Post added at 05:07 AM ---------- Previous post was at 04:58 AM ----------
Wait that was blank a second ago. I am downloading now. I will mirro with my mediafir stuff if I can get it to work.
kairnage said:
Is this similar to the Nook HD + CM10 boot?
---------- Post added at 05:07 AM ---------- Previous post was at 04:58 AM ----------
Wait that was blank a second ago. I am downloading now. I will mirro with my mediafir stuff if I can get it to work.
Click to expand...
Click to collapse
Sorry, I was setting up the posts...
I'm not sure this is similar to any solution currently used on other devices, but I do know that other developers have used similar methods to develop their roms.
I don't have a Nook and haven't looked into what they use too much, but we may very well be able to learn from their work.
~Troop
So I dug up an old nvflash package from my Notion Ink Adam and tested it to make sure it still works (with the Adam in APX mode it allows me to directly flash the device with a new partition layout and flash the partitions directly). After verifying I had it setup correctly, I swapped the boot and recovery images and ran it again and sure enough... now when I boot my Adam normally, the recovery rom comes up, and when I boot my Adam into recovery it loads the normal rom - so the theory seems to work.
So I think the next thing I will try is building a new recovery for OUYA from source and adding an option to reboot into "recovery" to the menu, allowing it to be stored on the boot partition and the real boot.img to be stored on the recovery partition, allowing you to boot the OUYA and it comes up in recovery, then you select the new reboot option and it would reboot into "recovery" which would load a full rom. You could then safely flash boot images to the recovery partition without fear of bricking your device.
I think it should work nicely, but not sure how long it will take me since I need to set my build machine back up.
For those who are confused, read more about how these ideas started below!
~Troop
Trooper_Max said:
I think this is a great idea that needs more attention:
mybook4 said:
Devs, I propose the following to get rid of the potential brick risk:
Since we can't get into recovery manually (via HW buttons), let's reverse the role of SOS (recovery) and LNX (kernel). Since LNX is the booting kernel partition, let's flash recovery there and flash the kernel to the recovery partition. I believe we could do this by modifying the fstab and having our updater-scripts flash to the appropriate partitions.
From a cold start, a user will enter recovery (a minor inconvenience for safety). Depending on how we modify the recovery.fstab, getting to the ROM could be as simple as pressing power twice (recovery does a reboot system now and its fstab has the system actually reboot to the recovery partition, which is the ROM's kernel).
Definitely not straightforward, but should prevent bricks. Thoughts?
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
But then I'm definitely biased, because I had the same idea:
Trooper_Max said:
I agree with everyone it would be nice if we had a hardware means to boot into some kind of recovery or flashing mode to flash stock images.
But I was trying to think if there is anything we can do if we don't get that... (guess that makes me a pessimist >_>)
Let me preface this with don't try anything I'm describing here unless you know what you're doing, these are half-baked thoughts of someone who doesn't even have their OUYA yet:
What if we could swap the boot and recovery partitions? (I haven't received my OUYA yet, so I'm not even aware of what partitions it has, so assuming it has them, and yeah, it wouldn't be quite that simple)
Basically what I mean is when the device tries to boot normally, it would boot up a stable recovery rom. (ie the boot partition that normally has the kernel and then loads the rest of the rom instead just has a recovery rom)
Then you have the recovery partition be what boots the full rom. That way you only chance bricking your device when you flash the boot partition, which if we can get a stable recovery rom that works for this, wouldn't be often. We would probably want to modify the recovery to have a 3 second/configurable timer where if you don't do anything it boots into the "recovery" partition which would boot up the full rom.
Basically the boot partition becomes a new recovery rom which gets used like GRUB to boot into the "recovery" partition which boots up your actual rom, or maybe it could also boot from USB or netboot or whatever...
Pretty much what we need is a solid bootloader, sound about right? Let me know if any of this makes sense/doable or if I'm entirely off base here! I don't know if I will have the time to try any of this when I do get my OUYA, but wanted to share some ideas, please proceed at your own risk!
EDIT: Alternatively, the boot partition could be left stock and the recovery partition could be used as a bootloader to boot into USB or other options for loading roms without messing with the stock boot experience and risking bricking the device. ie in this configuration if you boot your device normally it would be stock, if you reboot into "recovery" it would load up a custom rom. Or instead of a custom rom, a custom recovery with bootloader capabilities.
~Troop
Click to expand...
Click to collapse
And I do plan to try this idea out eventually, but I've got some other ideas I intend to try out first.
The first one I hope to have done by the end of this weekend (hopefully sooner though) is to reconfigure this experimental CM build to be usable without touching any of the internal storage space. I plan to have a modified boot.img that will load system/data/sdcard folders off a usb thumb drive. This method would be completely safe, though a little inconvenient because you would need to use adb to reboot the OUYA into bootloader mode so that you can then fastboot it to load the modified boot.img, but after that it could be disconnected and would be running using only external storage. You're essentially using a computer to jumpstart your OUYA into CM10, while leaving everything on the OUYA itself in pristine stock condition. Then I plan to try out arm versions of adb/fastboot so I can use my tablet or possibly phone (USB OTG) to jumpstart the OUYA instead of having to rely on my computer all the time.
I think this will be an extremely safe way of using external ROMs until we can get some kind of special bootloader figured out.
So if anyone is thinking about trying CM10, but leery of messing with their OUYA, just wait another week or so and I should have a safe, non-intrusive solution worked out!
I welcome any input/thoughts on these ideas! And if anyone knows how to do the things I'm describing and wants to beat me to the punch, feel free and run with these ideas - I won't mind as long as you share your work and give me a little credit if any credit is due!
~Troop
Click to expand...
Click to collapse
I just ordered a 64GB PNY off Amazon. Once I get it Tuesday I am going to try this. I am uploading to my mediafire now to mirror.
Trooper_Max said:
So I dug up an old nvflash package from my Notion Ink Adam and tested it to make sure it still works (with the Adam in APX mode it allows me to directly flash the device with a new partition layout and flash the partitions directly). After verifying I had it setup correctly, I swapped the boot and recovery images and ran it again and sure enough... now when I boot my Adam normally, the recovery rom comes up, and when I boot my Adam into recovery it loads the normal rom - so the theory seems to work.
Click to expand...
Click to collapse
After some more playing with my Adam, I noticed that when I reboot into "recovery" which I have booting a CyanogenMod rom and then I reboot and from the reboot menu select "Reboot", it reboots into CyanogenMod again (even though I didn't expect it to). From the reboot menu I tell it to reboot into "recovery" and it boots into CM again, which that part makes sense, since I have the CM boot image stored in the recovery partition. So I got to thinking that maybe when you tell it to reboot into recovery it sets an SOS signal (the recovery partition is sometimes refered to as SOS) and when you boot a normal rom from recovery, it never clears that signal because it isn't normally booting that way. Whereas a true recovery rom knows it needs to clear that signal so you don't get stuck booting into the recovery rom all the time.
I was close - I scanned the recovery source on CM's github and found this bit:
https://github.com/CyanogenMod/android_bootable_recovery/blob/jellybean/recovery.c said:
// Reset to normal system boot so recovery won't cycle indefinitely.
struct bootloader_message boot;
memset(&boot, 0, sizeof(boot));
set_bootloader_message(&boot);
Click to expand...
Click to collapse
So there seems to be a "bootloader message" that tells it whether to boot from the boot or recovery partition. I was going to say we need to be careful how we reboot the device and probably modify the custom rom to be able to reset the boot message, but I just realized we can do better and use this to our advantage. We could set our custom rom to always clear the boot message so that you have to go through the recovery rom each time to boot the system normally, but we could also have the option of selectively resetting the bootloader message - purposefully get ourselves stuck rebooting into "recovery" all the time because that is our normal rom, then from our normal rom have the option of resetting the bootloader message when we want to go into our recovery image stored on the boot partition.
Something to think about - I don't like getting stuck out of my recovery image either, so we gotta be sure we can reset the bootloader message when we need to... I'm going to play with this some more tomorrow, but not sure how far I will get.
EDIT: More info on the bootloader message - seems it is stored on the misc partition. The more I think about this too, the more I'm not sure swapping the boot/recovery is much safer - if we had them swapped, but then the rom gets stuck in a boot loop before it can reset the bootloader message, we'd be stuck always booting into "recovery" and into the boot loop, so we'd be in just as much trouble as if we'd gotten our boot partition to cause boot loops. So whereas normally flashing the boot partition is potentially dangerous, in this scenario flashing the recovery partition would be potentially dangerous - you gotta be sure it's going to be able to reset the bootloader message. We could try to mitigate this by modifying the boot process to reset the bootloader message very early in the boot process (ie before the potential bootloop) so that if we get stuck, the next time we reboot, we'll reboot normally into the recovery rom.
But then we could also do just the opposite of that without swapping the boot/recovery partitions - very early in the boot process, modify the bootloader message to tell the bootloader to boot into recovery - that way if we get stuck the next time we boot up will be into recovery. Then later when the system successfully boots, we could reset the bootloader message so that after a successful boot the next boot will be another normal one instead of into recovery. If we get this right a failed boot would automatically take us to recovery on the next boot, while a successful boot would boot normally on the next boot. So this would be a way to build in some "brick-protection" into the boot.img to make it safer to flash. It'd probably be safest to not reset the bootloader message until the user actually selects the shutdown option - that way any abnormal reboot would cause it to come up into recovery mode.
So I'm not sure swapping boot/recovery partitions really buys us anything anymore, since it also swaps which partition is potentially dangerous to flash. The solution in either case is going to be to cleverly manipulate the bootloader message as described above. So we might just want to not swap them to minimize confusion and focus instead on building "brick-protection" like this into our boot images.
https://github.com/CyanogenMod/android_bootable_recovery/blob/jellybean/bootloader.h said:
/* Bootloader Message
*
* This structure describes the content of a block in flash
* that is used for recovery and the bootloader to talk to
* each other.
*
* The command field is updated by linux when it wants to
* reboot into recovery or to update radio or bootloader firmware.
* It is also updated by the bootloader when firmware update
* is complete (to boot into recovery for any final cleanup)
*
* The status field is written by the bootloader after the
* completion of an "update-radio" or "update-hboot" command.
*
* The recovery field is only written by linux and used
* for the system to send a message to recovery or the
* other way around.
*/
struct bootloader_message {
char command[32];
char status[32];
char recovery[1024];
};
/* Read and write the bootloader command from the "misc" partition.
* These return zero on success.
*/
int get_bootloader_message(struct bootloader_message *out);
int set_bootloader_message(const struct bootloader_message *in);
Click to expand...
Click to collapse
kairnage said:
I just ordered a 64GB PNY off Amazon. Once I get it Tuesday I am going to try this. I am uploading to my mediafire now to mirror.
Click to expand...
Click to collapse
Sounds nice - I'm tempted to get a nice big new thumb drive myself... I don't have any that big >_>
~Troop
I've been following your think tank and I agree with your latest idea 100%
Sending a message for bootloader to always boot into recovery if the system wasn't shut down normally is clean and simple.
I am curious though what about development, with nvflash requiring encryption of commands first mistake will render your ouya unusable.
dexter84 said:
I've been following your think tank and I agree with your latest idea 100%
Sending a message for bootloader to always boot into recovery if the system wasn't shut down normally is clean and simple.
I am curious though what about development, with nvflash requiring encryption of commands first mistake will render your ouya unusable.
Click to expand...
Click to collapse
Glad you agree with my new idea!
As far as development, yeah, that is why I used my Notion Ink Adam for some of the testing that I did.
As far as developing for OUYA, I don't think we are limited by not having nvflash, we just have to be more careful. Personally, if I were developing anything, I would use my above methods to fastboot boot images that load everything else from a thumb drive at least until whatever I'm developing becomes stable enough that I want to use it more permanently. Then I would be very careful about how I flash it.
Heck, if you wanted to be really safe, you could flash recovery images to both the boot and recovery partitions and just use external boot methods
In the long term though, I hope we can develop a bootloader based on the kexec hardboot patches for the original Nexus 7, which would allow booting completely off boot images stored in other locations, loading partitions from other locations. Other locations could even just be the virtual sd card if you don't want to use external media, but at that point we'd have a safe extra bootloader stored on the boot partition.
http://forum.xda-developers.com/showthread.php?t=2104706
Hope that makes sense.
~Troop
I was not aware that any content of RAM can survive a reboot, hard kexec booting custom OS from USB or image is definitely a safe solution, looks like all the pieces are there.
Wish I had something more than ouya alone, since you have your Adam are you going to try to develop something ?
dexter84 said:
I was not aware that any content of RAM can survive a reboot, hard kexec booting custom OS from USB or image is definitely a safe solution, looks like all the pieces are there.
Wish I had something more than ouya alone, since you have your Adam are you going to try to develop something ?
Click to expand...
Click to collapse
I do intend to, but I don't have a great deal of time to devote to Android development, so not sure how long it will take me. I'm trying to find what time I can though. This past weekend/last week I had a bit more than usual.
~Troop
Trooper_Max said:
http://troopermax.com/releases/ouya-sda123-boot.zip
(be gentle - it's 145 MB, I use shared hosting, so feel free to mirror)
md5sum: 49c8e16e27b6deb9d1e8e86363b56f2f
~Troop
Click to expand...
Click to collapse
Here is a mirror for you.
http://www.mediafire.com/download/hban76kzeys6ybd/ouya-sda123-boot.zip
I tried this on my new 64GB and it wouldn't boot, but it's a brand new card so it might be the problem. I'll try a known good card later.
kairnage said:
Here is a mirror for you.
http://www.mediafire.com/download/hban76kzeys6ybd/ouya-sda123-boot.zip
I tried this on my new 64GB and it wouldn't boot, but it's a brand new card so it might be the problem. I'll try a known good card later.
Click to expand...
Click to collapse
Sorry you had trouble - a couple other things to be wary of:
Have only the one thumb drive connected, at least until it boots - the boot.img looks for the data partition as sda1, the system partition as sda2, and the cache partition as sda3. If some other storage device is connected, it might be labeled sda by the OUYA depending on the order it finds them in and then the thumb drive might become sdb or so on.
It worked for me through a hub, but it may also be worth trying it directly if you have trouble.
Guessing you did this, but give it some time, booting from thumb drive especially on the first boot is slower. It's not too long, but it was long enough that for a moment I thought I'd failed again. Of course the thumb drive I was using wasn't built for speed, so YMMV.
If you're still having trouble - even on my failed attempts at boot images for this (it took me 5 tries at getting the ramdisk to get it bootable), I was still able to connect to it using adb. I ran adb on Linux, running adb as root to bypass all that udev configuration stuff - it's just easier, and if the OUYA/device failed to mount the system partition, it might not match the configuration you expect anyway. If you're able to run "adb shell" but it gives you a permission error about not being able to access the shell binary on the system partition, that probably means you didn't setup the system partition correctly - it's crucial that it get set up with the right permissions, which is why I provided the image so it could just be written directly with dd.
I'm going to try to put together a recovery image that can partition the thumb drive for you and flash an arbitrary update.zip to the thumb drive, but not sure when I will be able to have that ready. The initial version will not be able to patch the boot.img though, so that will still need to be modified like the one I have provided, but maybe in a future version I can get it to also modify the boot.img for loading the information from the thumb drive.
Let me know if you continue to have issues or if you do get it working! And if anyone else has got it working, please post so I can at least know someone got it working. It worked for me, and I don't see why it shouldn't work for anyone else, but if there is something conflicting I want to figure it out.
EDIT: I just remembered when I was looking into the swapping boot/recovery stuff, I noticed in the recovery source that there already are some tools that might be able to help partition the thumb drive and fix permissions included in the recovery source:
https://github.com/CyanogenMod/android_bootable_recovery/tree/jellybean/utilities
Tonight I'll see if I can put together some new instructions using those tools that might be easier and less error-prone. I'm hoping those tools can be applied to the thumb drive anyway, I'll try and figure that out tonight.
~Troop
Trooper_Max said:
Sorry you had trouble - a couple other things to be wary of:
Have only the one thumb drive connected, at least until it boots - the boot.img looks for the data partition as sda1, the system partition as sda2, and the cache partition as sda3. If some other storage device is connected, it might be labeled sda by the OUYA depending on the order it finds them in and then the thumb drive might become sdb or so on.
It worked for me through a hub, but it may also be worth trying it directly if you have trouble.
Guessing you did this, but give it some time, booting from thumb drive especially on the first boot is slower. It's not too long, but it was long enough that for a moment I thought I'd failed again. Of course the thumb drive I was using wasn't built for speed, so YMMV.
If you're still having trouble - even on my failed attempts at boot images for this (it took me 5 tries at getting the ramdisk to get it bootable), I was still able to connect to it using adb. I ran adb on Linux, running adb as root to bypass all that udev configuration stuff - it's just easier, and if the OUYA/device failed to mount the system partition, it might not match the configuration you expect anyway. If you're able to run "adb shell" but it gives you a permission error about not being able to access the shell binary on the system partition, that probably means you didn't setup the system partition correctly - it's crucial that it get set up with the right permissions, which is why I provided the image so it could just be written directly with dd.
I'm going to try to put together a recovery image that can partition the thumb drive for you and flash an arbitrary update.zip to the thumb drive, but not sure when I will be able to have that ready. The initial version will not be able to patch the boot.img though, so that will still need to be modified like the one I have provided, but maybe in a future version I can get it to also modify the boot.img for loading the information from the thumb drive.
Let me know if you continue to have issues or if you do get it working! And if anyone else has got it working, please post so I can at least know someone got it working. It worked for me, and I don't see why it shouldn't work for anyone else, but if there is something conflicting I want to figure it out.
EDIT: I just remembered when I was looking into the swapping boot/recovery stuff, I noticed in the recovery source that there already are some tools that might be able to help partition the thumb drive and fix permissions included in the recovery source:
https://github.com/CyanogenMod/android_bootable_recovery/tree/jellybean/utilities
Tonight I'll see if I can put together some new instructions using those tools that might be easier and less error-prone. I'm hoping those tools can be applied to the thumb drive anyway, I'll try and figure that out tonight.
~Troop
Click to expand...
Click to collapse
I could get into ADB as well but was only seeing the stock system. Actually now I think it was the adapter I was using. At first I assumed it was the microsd because it would hang on boot. But after trying a known good card it did the same. I remembered having issues with an adapter that has the indicator light to show it was connected on a tablet before. I tried a generic Kingston adapter and it sees the cards now. Of course I had already wiped them back to stock partitions. LOL Oh well, start again tomorrow.
For anyone who doen't have a Linux box handy or an extra thumb drive to boot a live USB, here are some quick instructions on how to partition the thumb drive from the OUYA itself. You can connect the thumb drive either before or after booting, it doesn't really matter. I'm using all fastboot/adb commands here so they are easy to recognize. If you're knowledgeable about how to use adb/fastboot, feel free to execute the commands however you're comfortable.
Type all the adb/fastboot commands as specified - if it doesn't begin with adb or fastboot, it isn't a command. All /dev paths you type into the commands should be related to /dev/block/sda (your thumb drive), not any internal partitions or you could mess up your OUYA!!!
Boot up the OUYA normally, then reboot into the bootloader:
adb reboot bootloader
Boot CWM using fastboot:
fastboot boot OuyaCWMrecovery6.0.3.2.img
Print partition information for the thumb drive:
adb shell parted /dev/block/sda print
Model: USB Flash Memory (scsi)
Disk /dev/block/sda: 8128MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 6000MB 6000MB primary ext4
2 6000MB 7000MB 1000MB primary ext4
3 7000MB 8000MB 1000MB primary ext4
Click to expand...
Click to collapse
(note in the example output above I already have it partitioned)
Here I was using an 8 GB thumb drive, you can see the size where it says 8128MB.
Delete Partitions from thumb drive: (be sure you don't have anything important on your thumb drive)
adb shell parted /dev/block/sda rm 1
adb shell parted /dev/block/sda rm 2
adb shell parted /dev/block/sda rm 3
(note that you only need to delete partitions that showed up in the table when you printed it, here I deleted 1,2,3, since I had 3 partitions above and the parted commands will say you may need to update your fstab, but that is not relevant here so don't worry about it)
Create 3 primary partitions (adjust the sizes as necessary):
adb shell parted /dev/block/sda mkpart primary 1 6000
adb shell parted /dev/block/sda mkpart primary 6000 7000
adb shell parted /dev/block/sda mkpart primary 7000 8128
Check your paritions again:
adb shell parted /dev/block/sda print
Format your partitions as ext4:
adb shell mke2fs -t ext4 /dev/block/sda1
adb shell mke2fs -t ext4 /dev/block/sda2
adb shell mke2fs -t ext4 /dev/block/sda3
Push the cm10 system image onto the device: (this will take a little while)
adb push ouya-cm10-system.img /tmp/ouya-cm10-system.img
Check that it copied correctly:
adb shell ls -l /tmp
-rw-rw-rw- 1 root root 260308992 Jul 27 2013 ouya-cm10-system.img
-rw-rw-rw- 1 root root 3587 Jan 1 02:12 recovery.log
Click to expand...
Click to collapse
(Note the size... I'm pretty sure copying it /tmp put it into the ramdisk, but our OUYA has enough ram for this)
Write the cm10 system image onto /dev/block/sda2: (this will take a little while)
adb shell dd if=/tmp/ouya-cm10-system.img of=/dev/block/sda2 bs=4M
Check/fix the filesystem:
adb shell e2fsck -fp /dev/block/sda2
Resize the filesystem to fill the partition:
adb shell resize2fs /dev/block/sda2
(Unfortunately, it looks like resize2fs is not included in CWM, so this step would need to be done on the computer)
At this point, the thumb drive should be good, so you just gotta reboot back to the bootloader and boot the boot image:
Reboot to the bootloader again:
adb reboot bootloader
Boot the modified boot image I provided:
fastboot boot ouya-sda123-boot.img
Not sure if that's necessarily easier or harder to follow than the other instructions... I'd probably rather do the partitioning on a desktop with GUIs, but for some who don't have a Linux box handy it might be easier to use the OUYA as a little Linux box
I'm sure you noticed this method still used dd to write the system image, just run from the OUYA instead. I looked into just extracting the system files from the CM10 zip onto the OUYA, but fixing the permissions was not as easy as I thought it would be - the /system partition permissions are actually fixed by the updater script as referred to here:
http://fokke.org/site/content/howto-create-android-updatezip-package
It's actually a scripting language and the script also creates symlinks and does other stuff.
You'd have to extract/modify the updater script to not use the internal partitions and then execute it (I think using the edify program)... still less straightforward than using dd if you have the image handy like I gave you... But I may look into this as another option. The knowledge will certainly be relevant when I look to build a custom CWM recovery to allow you to flash zips to the thumb drive instead of the internal partitions.
~Troop
Thanks to csonger for feedback, which may be handy if you have system partition issues:
csonger said:
I tried both methods (under linux and with ouya as well), but neither of them worked for me. My 8 gig pen couldn't boot.
The first thing is that the system image is 256MB and the tutorial says the System partition needs 512MB or 1GB.
After the boot failures I checked the pendrive. The second (system) partition was 256MB. It is ok when we use dd, but it was full. 100% usage.
First I run the e2fsck command to check for filesystem problems and it found some inode issues on it.
Following the fs fix the resize2fs command did the job and I had got a 1 gig System partition.
After that my pendrive could boot the cyanogenmod image without problems.
May be someone else has the same problem as me. Please share with them.
Thanks for your work:
csonger
Click to expand...
Click to collapse
I didn't have those issues myself for some reason, but I'll investigate and see what instructions I need to update!
Thanks again for the feedback!
~Troop
Finally got my Linux partition back up and running so I can give this a go again.
It's been trying to boot CM for about 15 minutes now, ADB does see it, but I think it might no like the partitions I did.I did 2GB for system and 1GB for cache. I will repartition and try again.
kairnage said:
It's been trying to boot CM for about 15 minutes now, ADB does see it, but I think it might no like the partitions I did.I did 2GB for system and 1GB for cache. I will repartition and try again.
Click to expand...
Click to collapse
That should be fine, I would think... If you continue to have trouble, try running e2fsck and resize2fs on the system partition, as csonger suggested. (In case you didn't already)
I was confused when I came up with the instructions that it worked without me doing resize2fs since I figured that would be needed to expand the filesystem to fill the partition, but somehow it worked anyway and even looked like it was expanded, but I'd probably just forgot to refresh my view after dd.
Note that you can run the commands with just the partition as an argument: (I added -fp to e2fsck to automatically find/fix problems)
e2fsck -fp /dev/sdX2
resize2fs /dev/sdX2
(Where X is the letter for your thumb drive)
Without a size specified, resize2fs resizes the filesystem to fill the partition.
Hope that helps!
EDIT: I went back and fixed the instructions with this addition now that I've tested it a little more. Unfortunately, I noticed that CWM does not include resize2fs and I didn't spot any other programs handy within CWM to do the trick, so you can't quite do this part on the OUYA. I will look into alternate instructions or building my own CWM that includes resize2fs or just plain automates this more.
~Troop

Bootloop after CM install. Won't restore backup, mount /data, flash stock

Hi developers. I am sorry for posting this. I spent the last week trying to solve it by myself with no hope. This is my second time installing something on a phone, but it is my only phone, so I beg anyone for a help...
-What I did:
Some days ago I downgraded to this ROM C5503_10.1.1.A.1.310_GLOBAL-LTE.ftf to use DoomLord rooting script. I did it with flashtool for linux and I applied his .bat step by step in the terminal since windows would not detect my phone.
It worked. I had root for some days, but I was still annoyed by sony default android. So I decided to install Cyanogenmod.
I unlocked the device with sony official system and wen't straight to this instructions, before the first reboot
wiki.cyanogenmod.org/w/Install_CM_for_yuga
I booted succesfully in CWM, followed everything as it says there. But that's where weird things happened:
-The problems:
-The backup
I tried, it wouldn't mount /sdcard. Since I don't understand much about this, I thought it was normal. The next choice was sdcard1, I backed up there. Or so I thought...
-The factory reset
I factory reset, again, not mounting sdcard. Here is the message that shows when I try this now:
can't mount /data!
Error mounting /sdcard.android_secure
Skipping format...
Data wipe complete.
Since it said it is complete, I went on installing the zip file from my sdcard1. Both CM 10.2.1 (dogo, the right one for my phone) and the appropriate GAPPS.
Now it loops on the CM loop animation and I have to remove the battery...
-The restore problem
It still boots on the recovery mode. So I tried recovering my backup from sdcard1. But the image name is 1970.01.01.00.03.16. And it says "md5 mismatch"
I tried flashing again the stock rom with flashtool. The proccess goes on but nothing happens. I still have CWM and the boot loop.
I read elsewhere someone with a similar problem who solved using sony "emma" software. I installed it, it won't even recocnize my phone.
It recocnizes that there is a phone, but don't know which one.
But that has alway been the case with windows. I haven't been able to do anything in windows other then accessing the sdcard (when the phone worked).
Is there something I can do? I imagine that somehow, for some reason, the /data and /sdcard partitions got corrupted. I imagine I would need to repartition this and install again, but I have no idea how this happens on phones...
I can mount /system /cache and /storage/sdcard1. just /data I can´t. Says "error mounting /data"
This is my only phone and a vey recent $400 thing. I was very stupid to do that withouth a replacement and really need this phone. I greatly appreciate any help...
I found this post forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/ searching the internet. Is it possible that this would solve my problem? or would it finish bricking the phone?
Here's what you'll need:
Working recovery, basic knowledge of adb & the shell
Parted (download here)
stock PB31IMG.zip
Note also that I had run unrevoked forever (so my phone was S-OFF) ... I'm not sure if that's required or not.
So, grab parted from the link above. Now you need to extract the individual binaries from the .zip (the 6 files in the sdparted folder within the zip), ideally to your android-sdk\tools directory. Now push all 6 files (adb push [file] /sbin/). Next, we need to make them useable, so go into the shell (adb shell). Change to your /sbin/ directory, and run: chmod 0755 <file> on each of the 6 files.
Now, we need to fix the partitions. This is assuming that the partitions are there, just the wrong format (which is what happened to me .. I accidentally made them FAT32 instead of ext). So, run the following: parted /dev/block/mmcblk0 mkfs ext2. It will ask if you want to continue, hit yes. When it asks for the partition number, enter 1. Next, when it asks for the format, enter ext2. Let it do its thing. Now, once it's done, run parted again. This time, enter partition 2 (everything else is the same).
Click to expand...
Click to collapse

I might need some assistance. (EVA-L19)

After unlocking the bootloader, installing TWRP recovery and rooting my phone with SuperSU (v2.82), I was preparing to install a custom ROM (more specifically the Resurrection Remix 7.1.2.) all in all, things ended up going out of hand and I accidentally deleted my internal storage, losing every single bit of my existing ROM, not to mention the RR ROM file as well. Now when I try to wipe, I can't, it usually says "Failed to mount '/data' (Device or resource busy) and "Unable to mount storage".
I tried using ADB sideload but to no success, only the same message. What I can understand is that the previous data is gone, I tried changing the format of data, system and cache to FAT & exFAT but it still did not resolve my issue.
I'm out of options here, I don't want to have to give up this phone because of my stupidity.
I also tried flashing the LineageOS 14.1 ROM to see if anything was different, here is what it said:
Installing zip file '/sideload.package.zip'
Target: HUAWEI/EVA-L09/HWEVA:7.0/HUAWEIEVA-L09/C432B361:user/release-keys
detected filesystem ext4 for /dev/block/bootdevice/by-name/system
detected filesystem exfat for /dev/block/bootdevice/by-name/userdata
mount: failed to mount /dev/block/bootdevice/by-name/userdata at /data: Device or resource busy
unmount of /data failed; no such volume
Patching system image unconditionally...
detected filesystem ext4 for /dev/block/bootdevice/by-name/system
Script succeeded: result was [1.000000]
Although it said succeeded it clearly did not work and I am sitting without a ROM. I'm not smart when it comes to these things please help a guy out.
(Is there a way to going back to completely stock EMUI 5.0?)
Cheers.
EMUI 5.01 requires encryption, which you obviously removed.
Search for DC Unlocker, it can probably fix it for 25 Euros
zgfg said:
EMUI 5.01 requires encryption, which you obviously removed.
Search for DC Unlocker, it can probably fix it for 25 Euros
Click to expand...
Click to collapse
I know this is awkward to ask and all, but how exactly do I go about this, I'm pretty lost and I have minimal experience with this stuff..
I never had to use it but here is their portal (with download info, prices, instructions, etc)
https://www.dc-unlocker.com/DC-Phoenix-flash-repair-tutorial
If you search on XDA or search on Google for eg XDA Huawei DC Unlocker you will find threads with first hands experience (I've seen them several tines but didn't save to Favorites)
zgfg said:
I never had to use it but here is their portal (with download info, prices, instructions, etc)
If you search on XDA or search on Google for eg XDA Huawei DC Unlocker you will find threads with first hands experience (I've seen them several tines but didn't save to Favorites)
Click to expand...
Click to collapse
I'm terribly sorry for being THIS stupid. As I'm looking into this even more, I'm conflicted about the credit amount I need, been scrolling through the list and I can't really find my problem involving firmware I suppose.
People usually buy for 15 Euros. It may help you, Chrome will automatically translate from German
https://www.android-hilfe.de/forum/...-wiederherstellung-mit-dc-phoenix.818669.html
I'm not educated about DC Unlocker but that is NOT neccesary here. You can easily repair the /data partition by flashing the stock recovery via fastboot, formatting data with that stock recovery and then flashing TWRP again. After that TWRP should be able to read the data partition again.
You can easily go back to stock completely and even restore your bootloader by doing a "rollback" to Android 6. (dload method). After that you can normally upgrade from there though EMUI to the latest version of stock.
christopherpfister said:
I'm not educated about DC Unlocker but that is NOT neccesary here. You can easily repair the /data partition by flashing the stock recovery via fastboot, formatting data with that stock recovery and then flashing TWRP again. After that TWRP should be able to read the data partition again.
You can easily go back to stock completely and even restore your bootloader by doing a "rollback" to Android 6. (dload method). After that you can normally upgrade from there though EMUI to the latest version of stock.
Click to expand...
Click to collapse
I've tried using eRecovery to format the data but to no success, I can't even use the touch screen for some reason, (I know about the volume keys, but when it comes to selecting the Wi-Fi, there is no success whatsoever). If you do know a fix for this, could you possibly walk me through this?
Hexagonal said:
I've tried using eRecovery to format the data but to no success, I can't even use the touch screen for some reason, (I know about the volume keys, but when it comes to selecting the Wi-Fi, there is no success whatsoever). If you do know a fix for this, could you possibly walk me through this?
Click to expand...
Click to collapse
UPDATE: I flashed the stock recovery image and it showed me the wipe cache partition and factory data and system reset, I tried both, only the cache one succeeded, the other one failed. I saw a post that directed you to flash boot.img, recovery.img, recovery2.img and then system.img, I did that, but I couldn't boot into my phone - the good thing is however! That I can use my touchscreen in the recovery now.
Obviously the second time booting into EMUI recovery it prompts me to 'Download latest version and recovery', I try to connect to my Wi-Fi, seems okay but then it suddenly fails. More specifically it says 'Getting package info failed'. Save me please :crying:
So this "erecovery" never worked in any way for me (the one which offers you to download the latest version).
Instead you need the normal recovery you already used. Formatting failed for me the first time too, try it again and then it will try to format "low-level" which worked for me.
Go directly into fastboot from that, flash TWRP and go directly into TWRP.
After that should be able to use /data in TWRP. As soon as you are able to start TWRP without any error messages (like "Device busy" or something) go to Wipe and then format data.
Important: check which partition type you have! For EMUI you need "f2fs" and for lineage you need "ext4". You can see and change that in TWRP under Wipe -> "change or repair filesystem".
If you have any more questions, just ask.
christopherpfister said:
So this "erecovery" never worked in any way for me (the one which offers you to download the latest version).
Instead you need the normal recovery you already used. Formatting failed for me the first time too, try it again and then it will try to format "low-level" which worked for me.
Go directly into fastboot from that, flash TWRP and go directly into TWRP.
After that should be able to use /data in TWRP. As soon as you are able to start TWRP without any error messages (like "Device busy" or something) go to Wipe and then format data.
Important: check which partition type you have! For EMUI you need "f2fs" and for lineage you need "ext4". You can see and change that in TWRP under Wipe -> "change or repair filesystem".
If you have any more questions, just ask.
Click to expand...
Click to collapse
So what you're saying is, as soon as I get my data sorted and my partition set to the right one I should be able to install the custom ROM. I could use data and even formatted it, tried installing Lineage but I must've had the storage on the wrong type, now I'm back with the same issue, I'll try to fix it and post my results here. Thank you!
Hexagonal said:
So what you're saying is, as soon as I get my data sorted and my partition set to the right one I should be able to install the custom ROM. I could use data and even formatted it, tried installing Lineage but I must've had the storage on the wrong type, now I'm back with the same issue, I'll try to fix it and post my results here. Thank you!
Click to expand...
Click to collapse
Update: It did NOT work, tried flashing LineageOS through ADB sideload, it was going fine before the bar completely filled up around 50% of the way done, it said 'detected filesystem ext4 for /dev/block/bootdevice/by-name/system' and in the next line it said 'script succeeded: result was [1.000000]'
Help me, I'm begging you, at the moment I don't have an access to a microSD that has the capacity to hold the stock files to do the dload method, therefore this is my only hope.
Hexagonal said:
Update: It did NOT work, tried flashing LineageOS through ADB sideload, it was going fine before the bar completely filled up around 50% of the way done, it said 'detected filesystem ext4 for /dev/block/bootdevice/by-name/system' and in the next line it said 'script succeeded: result was [1.000000]'
Help me, I'm begging you, at the moment I don't have an access to a microSD that has the capacity to hold the stock files to do the dload method, therefore this is my only hope.
Click to expand...
Click to collapse
Whats the error? Why doesn't it work? What happens when you try to boot?
christopherpfister said:
Whats the error? Why doesn't it work? What happens when you try to boot?
Click to expand...
Click to collapse
That's what I'm trying to figure out, when I try to boot in it's just stuck on a boot loop. Unfortunate..
Remember that you have to what *a while* for the first boot. Only if you see no change after 5-8 minutes or so something is definitely wrong.
Have you checked in TWRP if your /data partition is ext4?
christopherpfister said:
Whats the error? Why doesn't it work? What happens when you try to boot?
Click to expand...
Click to collapse
christopherpfister said:
Remember that you have to what *a while* for the first boot. Only if you see no change after 5-8 minutes or so something is definitely wrong.
Have you checked in TWRP if your /data partition is ext4?
Click to expand...
Click to collapse
I know, but it was flashing the Huawei logo and the unlocked bootloader warning continuously. It was set on EXT4 but as I was saying, it said script succeeded at 50%.
Hexagonal said:
'detected filesystem ext4 for /dev/block/bootdevice/by-name/system' and in the next line it said 'script succeeded: result was [1.000000]'
Click to expand...
Click to collapse
That just said that /system partition is ext4. That is default even for stock I believe. You need to check for /data.
christopherpfister said:
That just said that /system partition is ext4. That is default even for stock I believe. You need to check for /data.
Click to expand...
Click to collapse
I deliberately set the data partition to EXT4 before installing
Hexagonal said:
I deliberately set the data partition to EXT4 before installing
Click to expand...
Click to collapse
Can you check in TWRP if it actually says /data is ext4?
Which lineage are you trying to install? Don't you need a vendor.zip for some of them?
/data is indeed on EXT4, and I was installing the one that was on the room section.

Tate bricked - repair partition table?

My KFHD7 - Tate (PVT-08) has some trouble in the last time.
It stucks in a boot loop with the yellow Kindle logo.
I am able to reflash boot, bootloader and recovery via fastboot.
Then I normally was able to flash a system image after run recovery and can run this system once.
But after a reboot the bootloop exists again.
Now i'm able to start TWRP with the procedure described above.
The partitions cache, userdata and system always appear with 0kb. So I change the file system and change it back afterwards. Then the partition size is correct again and I can flash.
This time, however, I can no longer access the system partition.
If I try to change the file system I get the error message:
Code:
Failed to mount '/system' (Invalid argument)
Error changing file system.
A repair of the file system also fails:
Code:
Repairing system using e2fsck
/sbin/e2fsck -fp /dev/block/mmcblk0p11 process ended with ERROR: 8
Unable to repair system.
I suspect therefore (with my modest knowledge) problems with the partition table.
Maybe someone can upload me a flashable gpt.bin or something.
Or is a completely different method more suitable?
Many thanks in advance.
I have a working Tate. What exactly do you need? gpt.bin means nothing to me.
I can connect and provide a dd of something if you say precisely what you need.
In your position, I would first be asking how your partition table could have been altered. What do you suspect you may have done to change it? Unless you know you could have damaged it you may need to look elsewhere before possibly doing more damage by screwing around with the partition table.
Code:
Failed to mount '/system' (Invalid argument)
Error changing file system.
start by posting what you used as a command. No one can tell from the error what you did right/wrong
BTW how did you root the device, what version of Tate was it running before you did that?
First of all, thank you for someone's interest in the thread after such a long time.
Because of your question how to read out the gpt.bin I did some more research.
Now I actually managed to deblock the tablet!
For this I used the KFHD System.img Restore Tool. After that the problems with the system partition disappeared.
The thread is therefore solved for me and may help others in the same situation.
Thank you very much for your support!
Sylvan86 said:
First of all, thank you for someone's interest in the thread after such a long time.
Because of your question how to read out the gpt.bin I did some more research.
Now I actually managed to deblock the tablet!
For this I used the KFHD System.img Restore Tool. After that the problems with the system partition disappeared.
Thank you very much for your support!
Click to expand...
Click to collapse
I'm very pleased that my reply stimulated you to look again and got you a fixed tablet. The amount of support we get for these older tablets here seems less than minimal.
I have rooted mine but have not managed to install a recovery or fully regain control yet. I'll look at that tool you used. Do you know what Tate version you were running before , was it "up to date" ( ie sync'ed since 2014 ? ) . Mine has 7.5.1 and that seems to cut off a lot of options.
One thing I'm stuck on is booting into "recovery" mode. I have read that it is vol-up during boot but this does not seem to change anything for me, It just boots normally. If I do vol-down, I get "safe mode" but that's not much help.
Thanks for the link. I had looked at the before but was not sure if it applied to these devices, so did not want to risk it. It worked fine. One thing it forgets to tell you is to disable OTA updates. The first time I gave it wifi access it shot off without so much as a please and thank you and updated me back to 7.5.1 . So first thing to do is to kill updates:
Code:
su
cd /system/etc/security/
mv otacerts.zip otacerts.notazip

Categories

Resources