[Nexus One Themes and Apps] strictlyrude27:
brandall -

I think your Nandroid profile system broke on ClockworkMod 4+ (currently running 4.0.1.0 with CM7 on my Samsung Vibrant). It kicks me to recovery and the Nandroid screen appears for a second, then reboots immediately.

Giving more tests now..

EDIT: I never really examined your profile system before since it just worked for me. Here is a (the?) problem:

First thing you do is do a Read Paragraph on /sdcard/clockworkmod/.settings and store to $CLOCKVD; you then perform a Variable Split on it, with delimiter "current_recovery_version":". I don't have this line! Contents of my /sdcard/clockworkmod/.settings file:

{"readonly_recovery":false,"recovery_timestamp":0,"is_clockworkmod":false}

Upon further examination, ROM Manager thought I didn't have a CWM installed - and in fact for my device it doesn't give 4.xx as a recovery option. So this is likely an issue with CM7 for Vibrant. However, what I propose below is still good for people who are in my boat.

If anyone else has issues with this, note that you can select that you "manually intsalled" CMW 3.xx and ROM Manager won't complain. Selecting that option never changed the .settings file for me, though.

So %CLOCKMV (the CMW version) is never getting set (looks like you write clockworkmod/extendedcommand based on if %CLOCKMV == 2 or 3). Nothing gets written to extendedcommand; in fact, an old one resides in the folder, so you should probably clear that out after it's copied to /cache.

Taking a peek in /cache/recovery, I see this:

I:Checking for extendedcommand...
I:Running extendedcommand...
Waiting for SD Card to mount (20s)
SD Card mounted...
I:Running script:
I:
print "Tasker Nandroid Backup - Credit waydownsouth"
backup_rom /sdcard/clockworkmod/backup/ScheduledBackup-07-14-2011-00.40

line 1 col 53: syntax error, unexpected STRING, expecting $end
parse returned 1; 1 errors encountered
result is [print]

So I'm guessing there needs to be an extra newline or something at the end of the print string.

I'll try rewriting the extendedcommand without the print and see what happens.

EDIT2: CWM2 syntax doesn't work, output of log:

I:Checking for extendedcommand...
I:Running extendedcommand...
Waiting for SD Card to mount (20s)
SD Card mounted...
I:Running script:
I:
backup_rom /sdcard/clockworkmod/backup/TESTING_BACKUP

line 1 col 54: syntax error, unexpected STRING, expecting $end
parse returned 1; 1 errors encountered
result is [backup_rom]

Reattempting now using CWM3 syntax, based on your Tasker work.

EDIT3: The CWM3 syntax worked. So it looks like the best way to deal with this is to release *TWO* versions of your profiles - one built specifically for CWM2, and another for CWM3+. The user will have to understand which one to use. Or, you could check if %CLOCKMV is NOT set and set it equal to 3 before you do the write commands.

I like the idea you've got with the print - I think it would be VERY useful to also include ROM information as well, and maybe even kernel, both in the Nandroid text as well as in the name of the backup itself. I will incorporate that on my own and upload here.. (cancel that, there's too much variation between ROMs to do this, I think. It's all in the build.prop though. Could someone do me a favor and paste the line from build.prop that contains their ROM identifier?)

I also think you need to delete the old copy of extendedcommand from /sdcard/clockworkmod after you copy it to /cache. Although, I'm glad you didn't, since that was how I caught this stuff anyhow.