[Android] keratos:
Okay. Cheers. I will try this now.

For info. The ROM was created from a nandroid backup, this is what I did:

1. backup ROM with CM in recover.

2. Extract dsixda kitchen 0.91

3. Copy system.img and boot.img into original_update folder.

4. Choose "Create working folder" option.

5. Choose "/data/app" and "APPS2SD" options.

6. Choose "Build ROM" option.

7. Flash

Then I got the errors. So I doubt whether anything in the system.img or boot.img has caused this. It is definitely something to do with the creation/updating of update-script. My analysis:

* Update-script gets odified at various points via your scripts.

* I note that your scripts look for xbin/su and /bin/su then try something with it?? Possibly attempting to create a symlink "su".

* However, if /bin/su already exists at flash time, then update-script is likely to fail on account of the file (su) already existing.

* My ROM already had the Superuser utility in. Thus, could this be the problem??

I was going to attempt a detailed debug but will try with 0.93 first.

**

**EDIT: Still fails with 0.93 albeit a different error message this time, relating to "symlink toolbox SYSTEM:bin/cat".

**

I think the error here is that the script is trying to create symlinks to toolbox, from su, cat, and so on (i.e. all the executables that are implemented via the single toolbox file)

When the destination link already exists (i.e. su or cat or whatever) then symlink will, naturally, fail. Any other file that toolbox implements (i.e. symlinks to) could also exist in a users imported ROM - by ROM I mean ROM or .img - your script (fix-update-script) should make no assumptions either way in my humble view; thus, you may wish to modify that scripts to test for the existence of any of the toolbox implemented executables, i.e. cat, su and all files implemented by toolbox (or at least all files in your script!)

What I note is that your fix-update-script is looking for symlinks. This isnt good enough because it will (and DOES / IS) miss other file types such as binaries and scripts. In many ROMS, these files are not symlinks, they are binaries. There may also be scripted versions. You can catch all scenarios with this:

Your line in fix-update-script

my_list=`find bin -type l -exec ls -x {} \; | sed 's/bin\///g'`

should change to test the following:

{create an abbreviated list of entries in your default-symlinks. for example the list would contain one line for each of the commands "su" "cat" and so on, one on each line. sed can do this quite nicely: sed "s/.*\///g" default_symlinks > SHORT_LIST }

{ for each entry in SHORT_LIST check if the file is PRESENT in system/bin. you can use a for/do loop here }

{ if the file IS present, the "then" part should remove corresponding line in update-script, you can use sed again here }

so, suggest:

sed "s/.*\///g" default_symlinks > SHORT_LIST
for ENTRY in `cat SHORT_LIST` ; do test -e system/bin/$ENTRY && delete_entry $ENTRY ; done

and you need another script called delete_entry that receives the name of the file ($ENTRY) for which the corresponding line in update-script that needs to be removed.

of course this assumes default-symlinks contains only system/bin files. You could add more "intelligence" - my suggestion is only an example, because rather than just report problems, I like to offer advice too ;)

You may need to check your other scripts too - I havent gone into them.