yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Original Development] burpootus:
So how does it go from CWM back to stock without me doing anything to it?
[Nexus 7 Original Development] Nexcellent:
This works! :good:
[Nexus 7 Original Development] phonic:
Cool. Glad I could help others with the problem.

But we really need a better long term fix in the CWM image itself so that the backups can be managed normally. I don't know enough about Android to figure out what underlying filesystem restriction is causing this to break, but it seems like something in the OS is treating these files as protected (which CWM seems to have control over).

But at least this is a viable workaround in the meantime. Also, while the zip file I uploaded will erase all the backups, it can be easily tweaked to be more fine tuned. So if you have two backups and only want to delete one, simply open up the zip, edit the updater-script file inside of it, and append the specific subdirectory you want to erase to the delete_recursive parameter. It will then only erase that, but leave the other intact. Then, simply re-zip it and flash.

Again, I still think it's something along the lines where the files have some immutable attribute. Unfortunately, it looks like neither lsattr or chattr work properly to verify. But that would prevent renaming/moving the file(s) too, which makes it even more weird.
[Nexus 7 Original Development] paulobrien:
Looking into it now. Kinda weird!

P
[Nexus 7 Original Development] sabesh:
No idea. I think it's a bug with the first release of this CWM.

Sent from my Nexus 7
[Nexus 7 Original Development] paulobrien:
The stock ROM flashes the recovery on boot via a diff image (/system/recovery-from-boot.p) launched from a shill script (/system/etc/install-recovery.sh). Deleting that (which happens automagically in the new release of this and superboot) fixes it. Not an issue on custom ROMs obviously.

P
[Nexus 7 Original Development] paulobrien:
OK, so it looks like the recovery binary is setting the sticky bit on the backup directory, causing the delete issue. Investigating.

P
[Nexus 7 Original Development] Gunthermic:
So was flashing themed apk this am, and caused a boot loop. Of course couldnt get back to recovery until i went in via adb.

I read the thread so far. On a Rooted Stock ROM has this been fixed?
[Nexus 7 Original Development] paulobrien:
Updated to r3, which is based on the latest 6.0.0.4 Galaxy Nexus release. This also resolves the 'undeletable folders' issue.

P
[Nexus 7 Original Development] mattmanwrx:
Cannot wait for my nexus to arrive tomorrow... Thanks Paul... :)
[Nexus 7 Original Development] humblewarfare:
Forgive me for being a noob, but how do I install this image. I used the toolkit from the other thread and have I believe 5.8.0.2 CWR installed. Do I copy this image to a certain folder and then boot into CWR? How do I "run" adb once in CWR?
[Nexus 7 Original Development] phonic:
Thanks!

Question for you - was it the sticky bit issue? I thought it might have been that too (though on a normal Linux box, that issue wouldn't have manifested itself). However, even after I changed the directory/file permissions to a straight 777/666, removing the sticky bit on the directory, I still couldn't delete the files.

Also, I assume that this r3 version simply fixes new backups, and that old backups will still need to be removed via the other method, am I correct?

Thanks again for fixing this.
[Nexus 7 Original Development] Gunthermic:
out on the road. so the only way to apply fix is via adb on computer?

Will this destroy the backups of the stock rom we have already created?

this will allow us to get to recovery via power and volume down now?
[Nexus 7 Original Development] phonic:
The fix that I posted last night will work via CWM directly. You do not need adb. Simply transfer the zip file to the tablet's internal sdcard, reboot into recovery mode (ie: type "reboot recovery" in a command shell app), and apply the zip. However, YES, this WILL delete all the backups you created earlier with CWM.

As to whether the new CWM version will allow you to delete the old backups, or fix that other issue, I do not know as I haven't installed it yet.
[Nexus 7 Original Development] evonc:
It still refuses to boot into recovery from fastboot mode unless there is a connection to a computer via the usb port. Not having a connection is still resulting in the Google Logo screen. Besides that, everything seems to be working great on R3! Keep up the good work!
[Nexus 7 Original Development] phonic:
Have you tried rebooting it via a command shell app? This is what I've been using on r2, and it works perfectly.

Also, on an unrelated note, do we need to flash this new CWM version using adb, or can we just flash the zip via CWM directly?
[Nexus 7 Original Development] paulobrien:
I tried to remove the sticky bit but it wasn't having any of it, so not sure! Yes, old backups will need to be removed using the tool posted here.

Does this apply to stock too? I've not tried! I'm always plugged in. ;)

P
[Nexus 7 Original Development] Gunthermic:
Sorry but a little confusion, we have one user saying yes to flash in recover and such. to be clear.

R3 which fixes the boot into recovery problems, can thsi be flashed or only way to fix is to do adb.

I am not talkign about the user that posted a flashable zip to delete old backups.
[Nexus 7 Original Development] paulobrien:
I don't really understand what you're asking...

P
[Nexus 7 Original Development] phonic:
The weirdest thing was, I did get the sticky bit removed. In between creating a zip that removed one of the files (as a test) and all of the backup directories (as the final posted version), I tried a different approach and used the updater-script to change all the permissions recursively. Upon booting back in, all the directories were rwxrwxrwx and files rw-rw-rw-, so that part worked. But I still couldn't delete them even with the sticky bit removed, which seemed very odd.

I'm thinking that the older version of CWM did something weird on the file system and android wasn't able to compensate for it.

Oh well, at least the new version is fixed, and we have a work around to get rid of the old backups.

Also, can I flash the v3 upgrade directly from CWM, or do I need to use adb?

Thanks.
[Nexus 7 Original Development] evonc:
I haven't tried stock yet tbh. I'll give it a whirl after i try out a few of the kernels. And yeah its pretty weird that a usb connection is causing the issue.

I'll also give a try using a script to see if that boots however, I doubt it will fix the issue of it going into recovery directly from bootloader w/o usb connection.
[Nexus 7 Original Development] Gunthermic:
^^^ This...

What excatly does the R3 fix? the booting into recovery via power-volume down button?
[Nexus 7 Original Development] cheami:
Does r3 auto override the stock recovery, as in perm CWM?
[Nexus 7 Original Development] philmein:
as said above this fixes the non delete issue

as sooon as i flased with adb it booted =into cwm so i thought i would nandroid backup my rom which i did then i touched the restart system i then get a message saying (rom may flash stock recovery on boot fix ? ) i pressed yes=disable recovery flash then rebooted then deleted my nandroid to check the delete worked.

i then rebooted into bootloader and tried to get into cwm no joy but it worked with the cable plugged in

i then made another nandroid and got the same message again after touching reboot (rom may flash stock recovery on boot fix ? ) yes= disable recovery flash

is yes the right answer?
[Nexus 7 Original Development] paulobrien:
Yes, this is a new CWM 6 feature.

P
[Nexus 7 Original Development] evonc:
I believe CWM 6.0 is auto aware of the stock recovery being flashed on nexus devices so it tries to patch the flashing of stock recovery on boot. Besides that here is the post that shows the changelog for CWM 6.0

https://plus.google.com/103583939320326217147/posts/SdyVzvxKkUh (Taken from the article at AndroidPolice)
[Nexus 7 Original Development] phonic:
Paul, can we flash this via CWM directly, or do we need to use adb? In the past, on other devices, I've always been able to do this as a flashable zip. But I wanted to check with you first in case you think it could be a problem. Thanks.
[Nexus 7 Original Development] paulobrien:
This is just an image file, not a zip.

P
[Nexus 7 Original Development] phonic:
Ah thanks. Should have looked first :P.

I guess I could put it into a zip, but I'm too lazy and it's easier to use adb in that case.
[Nexus 7 Original Development] evonc:
Just flashed stock recovery and tried booting without usb connection and no luck. Stock recovery also refuses to boot without a usb connection directly from bootloader. Hence we know its not CWM causing the issue. Seems like it could be bootloader related.
[Nexus 7 Original Development] humblewarfare:
So what do I need to do if I'm stuck on the Google screen with the lock? Do I need to download and install the Android SDK? If so, what do I need to do in there?
[Nexus 7 Original Development] evonc:
What exactly are you trying to do?
[Nexus 7 Original Development] humblewarfare:
I tried to access CWR w/o USB cable. I powered off and on and now it boots.
[Nexus 7 Original Development] evonc:
AFAIK CWM/Stock Recovery aren't booting without a usb connection. You'll have to do a hard reset by holding down all buttons and then starting the tablet normally via the power button once it turns off.
[Nexus 7 Original Development] phonic:
You CAN go into CWM Recovery mode without a usb cable or attaching the tablet to your computer.

1) Download a terminal emulator that will give you shell access to the tablet. Install and run it.

2) Type 'su' (you need to have root).

3) Type 'reboot recovery'

This will do a fast reboot directly into recovery mode. No computer required. I assume you can do 'reboot bootloader' as well, if you need access to the bootloader, but I haven't personally tried this.
[Nexus 7 Original Development] gomorrah:
If you download the app Quickboot from the Play Store you can boot directly to recovery without a USB connection, going to the Bootloader, or using a Terminal Emulator.
[Nexus 7 Original Development] Dsmforlife92:
I'm so confused how o flash this what steps do I need to take. So I download the file and go into recovery and the use computer and cmd and type reboot recovery , I'm so lost sorry still learning
[Nexus 7 Original Development] evonc:
Yes that works but it kinda defeats the purpose of having a recovery if you screw up system and you can't boot into the device.
[Nexus 7 Original Development] gomorrah:
Having an app that boots you directly to recovery defeats the purpose of having a recovery? That doesn't make any sense. I you screw up system then youre gonna have to hook it your computer to boot it anyway which is exactly where you started.
[Nexus 7 Original Development] phonic:
:good:

Exactly. 99% of the time people go into recovery is to flash a new ROM/kernel/etc. And for that, you don't need a computer.

If you do screw up your tablet and need an emergency recovery, you can use the usb cable.
[Nexus 7 Original Development] evonc:
I'm trying to say that if I'm flashing a kernel or a ROM that goes bad and doesn't boot, it would be helpful to have it boot to recovery directly from bootloader as most people keep a backup of a working kernel and ROM on their sdcard.

While the method using a script is helpful and does allow people to boot into recovery, it is an inconvenience and absurd if recovery is dependent on a USB connection to function properly in a worst case scenario.

Sent from my Nexus 7
[Nexus 7 Original Development] phonic:
You raise a valid point, and I don't think anyone is suggesting that it doesn't need to be fixed. My point was that a usb cable and computer is not "required" to get into recovery, which is what some people were saying.
[Nexus 7 Original Development] evonc:
No worries. I like having the peace of mind that i can restore my device to a working state froma soft brick without any exceptions. But i did set up a script to boot me into recovery which is pretty handy.

Edit

Tried to see if it would boot into recovery from bootloader with USB cable plugged into the wall charger (stock cable and charger). However that seems to just freeze the bootloader and requires a hard reset without usb being plugged in to function. Can someone else confirm this as well? Seems like really strange behavior.

Sent from my Nexus 7
[Nexus 7 Original Development] philmein:
has anybody tried restoring a nandroid made with this version of cwm it restored very quick and i noticed it skipped system and just retored data cache ect tablet would not boot .

good job i had a rom on my storage to flash

seems the nandroids are only 20meg or so?

Just tried with ROM manager its definitely is not backing up system. Is there a alternative way to do a whole back with say an app of the market
[Nexus 7 Original Development] phonic:
Are you talking about R2 or R3? I haven't tried making a backup yet on R3. My R2 backup was about 2GB.
[Nexus 7 Original Development] philmein:
R3 I'm talking about. Try making a nandroid and check if it skips system
[Nexus 7 Original Development] TahrirSquare:
If you're a fan of TWRP over CWM (which I am( you can now install TWRP. It's now added to the development thread. :)
[Nexus 7 Original Development] philmein:
Works fine now with twrp than tahir
[Nexus 7 Original Development] URPREY:
It now does incremental backups so unless your system files have changed, it would not back them up again as part of the incremental backup.
[Nexus 7 Original Development] mathufu:
I can confirm that this one works great. For those of you who don't know, CWM has not released an "official" version yet.
[Nexus 7 Original Development] phonic:
While I could see this having some benefits, I also have some concerns with it.

If it only does incremental backups, and one of the prior ones gets erased, then your backup isn't viable anymore. Also, I would be concerned about how well this works if you keep changing out kernels/ROMs/etc. While full backups take up exponentially more space, at least you know what you're restoring. You can keep the extra ones off the tablet to save space, and only have the last one saved for emergency recovery.

I think an option for full or incremental would be a better idea.
[Nexus 7 Original Development] WorldIRC:
I just noticed bootloader is frozen unless I am connected to USB; recovery is fine (both CWM or TWRP - boot from ROM or start from Bootloader - both are fine) but I cannot interact with Bootloader unless plugged into the computer.

Is this normal or is this part of the other bootloader glitches?
[Nexus 7 Original Development] URPREY:
Read this for a full explanation: https://plus.google.com/103583939320326217147/posts/L5aVZe7C9vg
[Nexus 7 Original Development] MileMAN402:
Is this permanent or is there additional commands needed to make this stick?
[Nexus 7 Original Development] ldrn:
Same experience here -- the one in the guides didn't really do much, just showed the clockworkmod logo with no text after the first screen (though it worked enough to manually handle root via adb). This one worked great! Thanks. :)
[Nexus 7 Original Development] Shano56:
I seem to be unable to mount /sdcard in this recovery, only seem to be able to push to sd card is booted in android and using "adb push blablabla /storage/sdcard0"
[Nexus 7 Original Development] BCD90:
I have unlocked bootloader and got clm to stick but whenever i go to flash supersu or superuser (tried both) i get an error "E: Error in /sdcard.supersu_v0.93_-efghi-signed_stable_update.zip

(status 0)

installation aborted."

Anyone know the could be problem.

Thanks in advance
[Nexus 7 Original Development] smirkis:
i keep getting the same issue.

also, every time i "reboot system" from recovery, it asks me to remove the flash file every time lol.

im gonna give twrp a whirl and ill try back things are workin. i can't mount /sdcard either
[Nexus 7 Original Development] Archangel:
I just want to know how to delete a backup from CWM? Root explorer wont let me?

Edit- nvmw,,I guess the latest and greatest fixes this?
[Nexus 7 Original Development] iorecki:
i am getting the same behavior....i am also getting it for TWRP.

I can reboot from rom into recovery without cable.

If i turn the device off then boot into the bootloaer without the device connected to the computer the recovery wont boot.

if the device is turned off and i plug it into the computer and boot into the bootloader i can get into recovery fine.

when i go to /system there is no recovery-from-boot.p or any file for that matter. Is the image for this recovery supposed to be in that directory replacing recovery-from-boot.p ?
[Nexus 7 Original Development] Archangel:
I dont know whats up or if it is just me but I did a back up once I fastboot'd this version of CWM and then tried to restore a nandroid and it flew through the restore process and then hung at the google screen upon reboot? Had to restore a backup I had from another version of CWN and it worked?
[Nexus 7 Original Development] Gam3r 4 Life:
So to confirm this a couple things about this version:

1) Does this still not boot into recovery without using an app (like quickboot), or having the usb connected? Still does not

2) And will this version allow usb mounting from recovery? NO

Thanks

Nevermind, installed and got the answers myself.
[Nexus 7 Original Development] evonc:
Looks like they definitely need to issue an ota to fix the bootloader as the issue is evident right at the bootloader screen. thanks for testing all the possible combinations.
[Nexus 7 Original Development] brizey:
So am I off base in thinking that the bootloader is set up to reflash the recovery when you try to enter it via the key presses? If so, we are going to have to modify the bootloader to make it possible to reboot to recovery via key presses. And by we I mean someone more capable than me.

Or can we just replace the stock recovery image with the recovery image of our choice and let the bootloader flash it? Basically rename the file to match the stock name.

Edit: I think the behavior is intentional so it will not be fixed. Don't forget that the stock recovery is really meant to be used for OTAs, not for daily use like us nerds use the recovery. So if the OTA needs to make a change to the recovery, the bootloader flashes it before entering it to do the OTA update.
[Nexus 7 Original Development] ianPhillips1:
Just opened rom mgr and we are now an officially supported device, thanks to Paul for the interim fix.
[Nexus 7 Original Development] mathufu:
Woot! 6.0.0.6 here I come!
[Nexus 7 Original Development] humblewarfare:
Flashed it, but still doesnt boot from power off
[Nexus 7 Original Development] xfinrodx:
Confirmed working. It makes the touch screen interface a paid feature :-)
[Nexus 7 Original Development] evonc:
You can download the touch version from the official website and flash it manually via fastboot for free.

Link: http://www.clockworkmod.com/rommanager

Sent from my Nexus 7
[Nexus 7 Original Development] lightninbug:
after flashing cwm from rom manager in recover i get it saying that my rom may overwrite stock recovery this can only be done once...fix now? what should i do? and what does this mean?
[Nexus 7 Original Development] smirkis:
just fix it. it renames that file. then never asks again
[Nexus 7 Original Development] BennyJr:
So we should probably wait to flash this one then?
[Nexus 7 Original Development] phonic:
Not true. It keeps asking every time. In fact, mine was manually changed (orig.bak), but it still asks.
[Nexus 7 Original Development] smirkis:
are u talking about Paul's, or official? official asks once, Paul's kept asking
[Nexus 7 Original Development] phonic:
I never tried Paul's R3. I went from R2 to official. And it asked me twice so far.
[Nexus 7 Original Development] sabesh:
This is my experience too. The only issue with official is that I can't get into recovery via Bootloader (hangs).

Sent from my Nexus 7
[Nexus 7 Original Development] phonic:
I don't think that's a CWM issue. Apparently it is the same way for every non-stock recovery image. I imagine it has something to do with the backup recovery image that tries to auto-flash itself. The bootloader probably tries to access it, can't, and hangs on it. Outside of a possibly putting the CWM image in it's place (can that be done?), we may need a custom bootloader to fix that issue.
[Nexus 7 Original Development] Shano56:
Anyone know how the hell to mount the "sdcard" or adb push to the device from recovery? Using official 6.0.0.6
[Nexus 7 Original Development] phonic:
AFAIK, the internal sdcard (ie: /sdcard) should be mounted automatically. At least this was the case on Paul's R2. I know because I had to access it when I wrote my "delete backup" flashable zip. Not sure about CWM 6.0.0.6, but I assume that's the case as well.
[Nexus 7 Original Development] Shano56:
Hmm. I wasn't able to mount it under mounts/storage, but i was able to push by using "adb push blablabla /data/media"
[Nexus 7 Original Development] budde2:
Can someone please help me I can not get the drivers for my nexus 7 on my windows 7 PC looked everywhere and the toolkit won't install so I need too do it manually please help
[Nexus 7 Original Development] BennyJr:
I used these and it worked

https://www.box.com/s/2c25e8bc42ecce400afd
[Nexus 7 Original Development] budde2:
Thanks downloading now I'll let you know if I get it thanks again

One more question how do I install when I extract it brings to to some files and can't find what I need or what to do thanks for the help
[Nexus 7 Original Development] BennyJr:
Extract it to a folder then update the drives using device manage's 'update drivers'.
[Nexus 7 Original Development] CooLoserTech:
how to i enter CWM. isnt it Power + Vol UP? Not working for me wtf
[Nexus 7 Original Development] mrich137:
I was just thinking along the same lines in the other thread. My guess was that the bootloader was pointing to a different partition for some reason, but I think your theory makes more sense.

I also packaged an official cwm touch 6.0.0.6 as a zip file in there of anyone wants to use it.
[Nexus 7 Original Development] marclile:
does anyone know how to flash the stock recovery back? can i just grab the recovery.img from the "full os image" from google and flash that? the reason i'm asking is because it sounds like, at least right now, the only way to get into clockwork is to plug into a computer and adb reboot recovery, since you can't get into a custom recovery from the bootloader.

and if i'm going to be plugging into a computer anyway, i might as just boot into the bootloader and do the fastboot boot clockwork.img to get into clockwork, and leave the stock recovery in place so i can take ota updates.

am i understanding all of that right?
[Nexus 7 Original Development] Shano56:
<snip>
[Nexus 7 Original Development] Shano56:
You should be to use the stock image to return to stock recovery. Not sure why u don't think u an get into recovery without ADB, I'm able to get into recovery from the boot loader and from ROM manager

Hold both vol up and down and power simultaneously, the select recovery
[Nexus 7 Original Development] marclile:
I haven't flashed the "official" CWM but with the "interim" one, if I just booted into the bootloader and tried to go into the recovery from there, it just locked up on the Google splash screen. Isn't that the same thing that others were seeing?
[Nexus 7 Original Development] Shano56:
Not sure, only time I got stuck in recovery was when I was on stock recovery, but I think that was expected
[Nexus 7 Original Development] smirkis:
This is pretty much how I'm seeing it. It seems we can't do anything with the device without a working OS, or a computer to connect to. If you ever have a corrupt system, and are far from a computer, we seem to be sh!t out of luck.
[Nexus 7 Original Development] evonc:
Yep definitely and i think it's a bootloader issue not a recovery issue as twrp suffers from the same problem. Also when try to go into bootloader connected to wall outlet, it freezes. So you need to have a working pc/system in order to boot into recovery currently.

Sent from my Nexus 7