yashsingh1/xdaforums huggingface dataset:
[Eee Pad Transformer General] gee one:
Yeah, it's not in the init.rc, but that doesn't seem to be a problem when it's not recovery bootlooping. So it's possible to flash to staging, up until the recovery bootloops start. I think using software reboot to recovery apps/power menus start the cycle.

sent from my cyanogen(mod) vision
[Eee Pad Transformer General] AlcoholicDoc:
Anyone with an SBK v.1 willing to try to get stuck in the recovery bootloop and try some init.rc edits to try and fix this?
[Eee Pad Transformer General] gee one:
I tried this but I couldn't get the edits to stick. As far as I know, you have to change the init.rc on the ramdisk in the recovery boot.img. these are what gets booted each time. I hope someone knows otherwise.

sent from my cyanogen(mod) vision
[Eee Pad Transformer General] AlcoholicDoc:
I was really, really hoping you weren't going to say something like that. :(

Is there any way to force an update to the init.rc from within the OS? What is the init.rc that we can see for? Just the OS itself?

I'm pretty sure my init.rc has no "on init" entries. Is there a possibility that is causing an issue with booting into the system?

If I'm asking too many stupid questions, please tell me. I don't want to be a pain. :(
[Eee Pad Transformer General] feisty_noodle:
That is also in line with my understanding of things.

Here is a good post explaining some of the things we are talking about:

http://androidroot.mobi/technical/tf-secure-boot-key/

From what I've gathered so far (please correct me if you know better):

option 1) Under normal boot conditions, the /staging parition gets checked for new stuff. After checking the contents, the payload gets encrypted and flashed to the appropriate partitions.

option 2) If there is something wrong (like a broken ROM or some kind of boot-to-recovery flag has been programmatically set), the /staging check doesn't get performed nor its contents get processed. Perhaps, it is the job of recovery to set the situation back to normal afterwards (?).

My thoughts:

I think we are in the "option 2" situation. The decision to go there is made by the bootloader (?).

In contrast, init.rc procedures happen during boot (so, after the bootloader decision). This is why I think that changing these values should not have any effect on the activity of /staging.

What we need is a way to programmatically unset the "go-to-recovery" flag somewhere. I don't know where this gets set in the Reboot2Recovery or any reboot options included in ROMs.

Again, please point out any mistakes in my reasoning.
[Eee Pad Transformer General] gee one:
That's my understanding too. Perhaps someone can write a program to reset the reboot command? We can push it via adb and run it. We should also look to see if cwm does this already, in case it is resetting it improperly?

sent from my cyanogen(mod) vision
[Eee Pad Transformer General] cabraswell:
Well, it seems my Transformer is hosed now. I can get into CWM but it doesn't recognize the sd card. I can't cold boot because of my earlier bonehead decisions (I just get stuck at the cold-booting linux screen). I can get to APX (I think I got that right) but I'm not able to use it since I have a BCO serial #.

Gonna contact Asus and see if they can help me in any way (even if I have to pay). I just bought this thing two weeks ago today :(
[Eee Pad Transformer General] feisty_noodle:
your attempts to mount the internal failed? what did you do? what did you get?
[Eee Pad Transformer General] gee one:
I found Roach's recovery source, but I didn't find Koush's . I would laugh if we could fix this by writing some /cache/recovery/commands or intents.

I'm code challenged, but maybe someone could review this or try to figure out what is different in cwm 5.5.0.4

https://github.com/Roach2010/android_bootable_recovery/blob/gingerbread/recovery.c

sent from my cyanogen(mod) vision
[Eee Pad Transformer General] gee one:
Try flashing the last rom you used, or at least one that is compatible with the last kernel you flashed. You'll still have to cold boot, but you might be able to get to the rom.

sent from my cyanogen(mod) vision
[Eee Pad Transformer General] feisty_noodle:
Thanks for the link to the code. I've been looking around for this.

From cursory reading (and poor understanding), I think our target is called "booloader control block" (BCB).

We need to know what to set it to and how. It would also help to be able to read it to verify we are on the right track.
[Eee Pad Transformer General] gee one:
Just keep in mind that Koush's code might be different. I tried the link and I get a 404 error.

sent from my cyanogen(mod) vision
[Eee Pad Transformer General] feisty_noodle:
Yes, I know. Either he doesn't make his code public sometimes or it got moved someplace.

At any rate, none of the things I am pointing out should be acted upon until we can properly verify what's going on (with someone who has experience). I am just collecting clues.
[Eee Pad Transformer General] AlcoholicDoc:
It looks like this may be what we actually want... Maybe CWM isn't sending this command?

// clear the recovery command and prepare to boot a (hopefully working) system,
// copy our log file to cache as well (for the system to read), and
// record any intent we were asked to communicate back to the system.
// this function is idempotent: call it as many times as you like.
static void
finish_recovery(const char *send_intent) {
// By this point, we're ready to return to the main system...
if (send_intent != NULL) {
FILE *fp = fopen_path(INTENT_FILE, "w");
if (fp == NULL) {
LOGE("Can't open %s\n", INTENT_FILE);
} else {
fputs(send_intent, fp);
check_and_fclose(fp, INTENT_FILE);
}
}
[Eee Pad Transformer General] cabraswell:
I can't access internal memory by adb or anything. I've tried using adb while in cwm, apx and when it's telling me it's cold-booting linux.
[Eee Pad Transformer General] feisty_noodle:
So when you type

adb devices

, you see nothing?
[Eee Pad Transformer General] cabraswell:
Exactly. The only way the pc recognizes the TF is in APX mode but that's useless for me since NVflash isn't an option.
[Eee Pad Transformer General] feisty_noodle:
Sometimes you need to provide the vendor id to get adb to recognize the connected device. look into this.

(On os x, the location of the settings is in ~/.android/adb_usb.ini not sure about win.)

I have been adding to mine manually, but in the header it says:

USE 'android update adb' TO GENERATE.

Either way, look up the vendor id for ASUS and try connecting.

It sounds to me that your adb may not be set up properly.
[Eee Pad Transformer General] cabraswell:
So, should I be able to use adb while the unit is in cwm? Sounds like it from what you're saying.
[Eee Pad Transformer General] partio:
will not boot the system, only recovery, from what I understand.

not adb in recovery mode
[Eee Pad Transformer General] feisty_noodle:
Yes, absolutely!

CWM always has adbd running and should be able to take commands.
[Eee Pad Transformer General] feisty_noodle:
Yep. I traced it to the same function: finish_recovery()

I think that this is the business end of things.
[Eee Pad Transformer General] cabraswell:
Alright. I've found the Asus vendor id and I've found my adb_usb file. How do I add the vendor id to it? I'm very limited in my adb knowledge.
[Eee Pad Transformer General] AlcoholicDoc:
So we just need to figure out how to manually call this function. I'm assuming this would fix the recovery bootloop.
[Eee Pad Transformer General] gee one:
There are guides in the tf sections. I think luna_c666 has an "epic noob guide" that has all stuff.

sent from my cyanogen(mod) vision
[Eee Pad Transformer General] feisty_noodle:
Yes, in principle, but first, I would like to see what Koush's 5.5.0.4 code looks like.

Also, I would like someone to review these ideas.

Brainstorming is great, but we can still do damage to our devices by making stupid mistakes.
[Eee Pad Transformer General] AlcoholicDoc:
Another thing I saw in the Recovery.log...

|:Checking for extendedcommand...

|:Skipping execution of extendedcommand, file not found...

From what it looks like in Roach2010's source, finish_recovery is passed through extendedcommands.h

If that isn't there, or is corrupt, maybe that's why it isn't clearing the recovery command from the BCB.

Don't know what the implications of this would be or if this is even an issue, but just something I saw.
[Eee Pad Transformer General] henryr934:
can we use ADB to flash the RECOVERY?
[Eee Pad Transformer General] baseballfanz:
No i don't think you can.
[Eee Pad Transformer General] leetlikeawping:
I have reflashed koushes recovery image from recovery manager. If I shutdown and use volume down and power to reboot into recovery everything works fine. I can reboot out of the recovery and back into the android os. The moment I use reboot2recovery I get reboot loops. maybe you are right about the flag being set. The command that reboot2recovery uses is "echo boot-recovery|dd of=/dev/block/mmcblk0p3 bs=1 seek=0; reboot" . Maybe you guys can figure something from that. Its kinda like when you check the safe boot option in msconfig and forget to uncheck it.

actually what is really funny is the moment directly after I nvflash back to a known good recovery. If i never used the reboot2recovery it will reboot and automaticly start into ICS. If I used the reboot2recovery or the command above I will go directly into the recovery, but I am able to get out of it by just rebooting.
[Eee Pad Transformer General] gee one:
I'm not sure what that partition is, but it might be as simple as something like echo boot | dd etc... or whatever the correct boot flag is. Not sure if it has to be done in the rom or the recovery, but it seems this would reset the command?

Edit: just tried it from the rom of my un-borked tf and now I have recovery bootloops. Will try a cold boot and clear.

sent from my cyanogen(mod) vision

Edit: from terminal, I typed

su

echo boot | dd of=/dev/block/mmcblk0p3 bs=1 seek=0

Reboot

And it rebooted to the rom...

It might require more testing- I wasn't using the bad cwm version, but it seems promising. I'm not sure if there will be other worse effects, like no access to recovery!
[Eee Pad Transformer General] sandiegopaneraiguy:
Did the change stick? Were you able to reboot multiple times successfully to the ROM? Identified any other effects? Shall I try?
[Eee Pad Transformer General] trtk:
my solution

in bad recovery install another cwm

then coldboot to android

then use terminal with this command:

su

echo boot | dd of=/dev/block/mmcblk0p3 bs=1 seek=0

Reboot

it will flash the new recovery, and no more problem, thanks

no more problem with the reboot2rcovery too
[Eee Pad Transformer General] feisty_noodle:
Sounds great. I was just looking for this string.

Did you try this? Anyone with sbk v.1 willing to test?

We are making progress, I think.
[Eee Pad Transformer General] trtk:
my transformer is SBK V2
[Eee Pad Transformer General] feisty_noodle:
How did you come up with the string? Is there a reference for flags someplace?
[Eee Pad Transformer General] sandiegopaneraiguy:
Used this method and problem solved...

EDIT: Well, now I cannot get in to recovery again...

It will boot to the ROM, but when either using buttons, ROM Manager or the built in reboot to recovery it goes to android/tirangle exclamation mark.

SO, what would I do to edit back?
[Eee Pad Transformer General] feisty_noodle:
Please elaborate on what you did.

I would like to try this myself, but I'll have to get home first. Then I will be able to update the OP.

@gee one: can you try this? you have a sbk v.1, right?
[Eee Pad Transformer General] gee one:
I can try this fully when I get home, although it did work on team eos rom with roach's recovery. Did you see my post above?

I'll test it tonight.

sent from my cyanogen(mod) vision
[Eee Pad Transformer General] alorma:
OOOOH!

It seems to work on my B80 with SBK v2!
[Eee Pad Transformer General] AlcoholicDoc:
I followed this exactly and it works perfectly for me.

I'm on a B90 and decided, what the heck. I did it whilst at the mall. :)

No problems at all. I have the new recovery that i flashed before cold booting.

Reboot to recovery works and I can reboot out of recovery now.
[Eee Pad Transformer General] feisty_noodle:
Sorry, I missed the main point.

I think I got confused by your mention of the non-bad cwm version.

I think you figured out how to fix our problem. Congrats and thanks!
[Eee Pad Transformer General] feisty_noodle:
Ok, this sounds excellent.

I'll update the OP after I get home and dogfood this solution.
[Eee Pad Transformer General] sandiegopaneraiguy:
Well, I seem to have done something wrong or this does not work for all.

I flashed a new recovery via the bad one. Cold booted, made the change and rebooted. It rebooted straight in to ROM.

Seemed all was good until I attempted to boot back in to recovery and am getting the triangle/exclamation mark with android.

So how can I edit the line of code via terminal and try again?

EDIT: By using the Power/Volume Down buttons I was able to get back in to recovery and reflash Solarnz recovery and now all works well.

I can get in to recovery when necessary via reboot 2 recovery, but the TF boots to ROM by default.

A huge thank you to ALL who assisted in this. Great to know that even without the original Devs assistance you guys were able to fix this.
[Eee Pad Transformer General] partio:
workin for me too , im in my old recovery again

thanks for the tip
[Eee Pad Transformer General] trtk:
Very important to flash a good recovery in the bad one.
[Eee Pad Transformer General] AlcoholicDoc:
If you can get into your ROM with no problems, use Recovery Installer to put a good recovery back on.
[Eee Pad Transformer General] mikewestlake:
WORKED!

Fantastic work!

Flashed Rogue CWM in recovery, cold booted and entered text in terminal. ON reboot, saw blue progress bar and it rebooted into ROM (Revolution, thanks MIke1986). Did a shutdown and boot into recovery and have rogue recovery and have internal SD Card access and MicoSD card.

Reboot from recovery reboots into ROM.

booting to recovery from within ROM works and then subsequent reboot from recovery goes back into ROM.

Uninstalled ROM Manager.

Thanks again.

Mike
[Eee Pad Transformer General] leetlikeawping:
yup that was what I was looking for but I just couldn't quite figure out what the correct string was for the flags.
[Eee Pad Transformer General] pooh-bah:
ynelsou

Spellcheck fail, or am I out of the loop on some new catchphrase? ;)
[Eee Pad Transformer General] baseballfanz:
Edit; NVM look like you got it fixed while i was typing.:D

Sounds like your just booting into stock recovery. Maybe try Recovery nstaller and see of you can get cwm again
[Eee Pad Transformer General] henryr934:
It work for me asus slider thanks
[Eee Pad Transformer General] henryr934:
U the men :thumbup:
[Eee Pad Transformer General] feisty_noodle:
Guys, the method originated with @gee one, in this post.

Just to be fair. ;)
[Eee Pad Transformer General] rafa6571:
Guys sorry for ask this but how i do this?

then use terminal with this command:

su

echo boot | dd of=/dev/block/mmcblk0p3 bs=1 seek=0

Reboot

What is terminal?
[Eee Pad Transformer General] AlcoholicDoc:
Download "Android Terminal Emulator" from the market.
[Eee Pad Transformer General] rafa6571:
Thanks a lot guys!! it works!!
[Eee Pad Transformer General] gee one:
To be fair, I think that trtk and leetlikeawping get credit too for finding the code and testing it out. I tested it out on a working version of Roach's recovery, so at best, I just confirmed that the reboot to recovery command was working. trtk actually tried it "in the wild."

At any rate, I think it's great that we have a working solution. Also, as far as I can tell, /dev/block/mmcblk0p3 is the /misc partition.
[Eee Pad Transformer General] feisty_noodle:
Agreed, but yours was the original method suggestion and test.

Anyway thanks a lot for your help.

Thanks to all!
[Eee Pad Transformer General] pooh-bah:
What recovery are you flashing? I see the downloads for Roach and the other one, but I can only see the latest CWM on their website. Can I flash an older CWM? If yes, were can I download it?
[Eee Pad Transformer General] feisty_noodle:
That appears to be right. I just started my prep work and pulled that partition for backup. It is ~2.1 MB and starts with the string 'boot-recovery'.

For those interested, the /misc partition is described thusly:

ref: http://www.addictivetips.com/mobile...plained-boot-system-recovery-data-cache-misc/

Sounds like most of us should be very careful screwing about with it. Especially, since it is normally not backed up by CWM.
[Eee Pad Transformer General] gee one:
Now you tell me!

I've been testing stuff out on it and the first 512 bytes usually seem to be empty except for the reboot commands. The reboot command is funny since it looks like it's duplicated? Maybe this is what is causing it to keep on booting to recovery? I thought I saw something in the code comments about using it as often as you want?

In case anyone wants to backup their misc partition,

dd if=/dev/block/mmcblk0p3 of=/your/backup/here

should be 2097152 bytes - it looks mostly empty, but there is random stuff in there.

nothing good comes from using a hex editor...

0000 0000: 62 6F 6F 74 2D 72 65 63 6F 76 65 72 79 00 00 00 boot-rec overy...
0000 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0040: 72 65 63 6F 76 65 72 79 0A 00 00 00 00 00 00 00 recovery ........
0000 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 00A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 00B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 00C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 00D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 00E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 00F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 01A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 01B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 01C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 01D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 01E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 01F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0000 0200:
[Eee Pad Transformer General] pooh-bah:
So there's something there, but it doesn't seem to do much? I flashed Rouge and it seems to be completely back to normal.

Even if things go screwy, I have a b50, so I can nvflash if it turns out that misc partition isn't so empty, right?

Thanks to all who looked (and continue to look) into this.
[Eee Pad Transformer General] feisty_noodle:
Mine is mostly empty, too. Especially the first stretch (0x0–0x1840) is filled with zeros, followed by a stretch of 0xFF (and then there is some data).

I was just examining it as you posted.

The structure of mine is interspersed with stretched of 0xFF separating blocks of data of various kinds. For example at 0x11A030 I have the alphabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

Anyway, I am mostly interested in the correct string at offset 0x0.

I successfully repaired using the "echo ... |dd ... /dev/block/mmcblk0p3" commandline in the broken recovery. This will be the most common scenario for people who are stuck in the loop.

After rebooting, the ROM booted normally (I am running rooted stock).

So, when I boot into recovery with reboot2recovery app (and into Rogue 5.0.2.7) and pull the partition, the first stretch of bytes is cleared completely (all 0x0).

So, I think we got lucky in that you only needed to disrupt the 'boot-recovery' string to succeed.

The result of the "echo ..." command yielded 'boot.recovery', where the '.' is 0x0A.

If the bootloader was looking for a more specific 'all-clear' flag, we would be in more trouble.
[Eee Pad Transformer General] gee one:
I did pull a few versions of the misc partition in various stages of flashing... It seemed to be normally empty (first 512 bytes), until I used one of the reboot to recovery commands. I probably wouldn't hurt to zero out the first 80 or 0x50 bytes. That's all I'll say since it will probably do more harm than having constant recovery bootloops.
[Eee Pad Transformer General] feisty_noodle:
OP updated.

Let's hope that the 30-some users we know to have been in trouble figure out how to repair with no problems.
[Eee Pad Transformer General] jgator87:
Still no luck...

this is getting really frustrating....i have a B90 and am still stuck in the CWM recovery. I adb pushed Rogue CWM and a stock ROM which appeared to install successfully but I still get booted into CWM recovery 5.5.0.4 every time. I tried to cold-boot into android but doesn't move past that screen saying "cold-booting linux".

Any thoughts? I'm about to drop kick this POS.
[Eee Pad Transformer General] feisty_noodle:
Are you now booting into Rogue CWM?

Mis-read your post ... still booting into 5.5.0.4, huh?

Did you try following the procedure in UPDATE4?
[Eee Pad Transformer General] 335Deezl:
Man, am i lucky! I have a B70, yet still managed to NVFlash back to stock ICS, via this (sorry, i don't know how to post HTML links yet): http://android.modaco.com/topic/342845-tool-tf101-rootkit-gui-v13-hc32-v8659-updated-2382011/
[Eee Pad Transformer General] jgator87:
Yes I did the following:

_____

step 1: use adb to push a good recovery

step 2: flash the zip

step 3: use the adb shell to execute the following command

Code:

echo boot | dd of=/dev/block/mmcblk0p3 bs=1 seek=0

_____

Did all this and now I am getting stuck at the "Eee Pad" bootscreen. Even worse because now I cant access recovery at all. If i go to the cold boot screen and try to enter recovery I go to a screen with a big exclamation mark.

FML. Any more suggestions??
[Eee Pad Transformer General] feisty_noodle:
which recovery did you flash?
[Eee Pad Transformer General] osho741:
ImOne of thefew that had no issues with bootloops. However I did not use an app or rom to boot into recovery. I booted to it from a cold boot and then flashed my old recovery from it. Iwaaable to get it back on. I have a b70 device.
[Eee Pad Transformer General] jgator87:
stock rom and recovery...
[Eee Pad Transformer General] feisty_noodle:
Have you tried wiping data?

Stock recovery usually doesn't come with any tools or menus (although I have never seen the ASUS stock recovery). So, you may just be looking at its screen (the exclamation mark).
[Eee Pad Transformer General] feisty_noodle:
Also, what ROM did you come from before getting into trouble?