[Epic 4G Android Development] nubecoder:
Below is a list of functions that can be used in Edify scripts and explanations about them.

This info was compiled from here.

Credit: http://www.netmite.com/android/mydroid/2.0/build/tools/releasetools/

As you can see this is from "www.netmite.com/android/mydroid/2.0/build/tools/releasetools/" so it may be outdated.

NOTE: I also compared this info with the leaked DK28 FROYO updater-script, it seems that for the samsung phones BML is used in place of MTD.

If someone can confirm this I will edit the values below.

Note: The double quotes are shown where they are required.

If someone has a better resource for this stuff, please share it!

I hope someone finds this useful.

==================================================

Assert that the current system build fingerprint is one of the given strings.

assert(file_getprop("/system/build.prop", "ro.build.fingerprint") == "string" ||
file_getprop("/system/build.prop", "ro.build.fingerprint") == "string");

Assert that the build on the device is older (or the same as) the given timestamp.

assert(!less_than_int(timestamp, getprop("ro.build.date.utc")));

Assert that the device identifier is the given string.

assert(getprop("ro.product.device") == "string1" ||
getprop("ro.build.product") == "string2");

Asert that the bootloader version is one of the given strings.

assert(getprop("ro.bootloader") == "string1" ||
getprop("ro.bootloader") == "string2");

Update the progress bar, advancing it over 'frac' over the next 'dur' seconds. 'dur' may be zero to advance it via SetProgress commands instead of by time.

show_progress(frac, dur);

Set the position of the progress bar within the chunk defined by the most recent ShowProgress call. 'frac' should be in [0,1] format.

set_progress(frac);

Check that the given file (or MTD reference) has one of the given sha1 hashes. See notes above about MTD!

assert(apply_patch_check("filepath", "sha1Hash", "sha1Hash"));

Check that there's at least 'amount' space that can be made available on /cache.

assert(apply_patch_space(amount));

Mount the given 'what' at the given path. 'what' should be a partition name if kind is "MTD", or a block device if kind is "vfat". No other values of 'kind' are supported. See notes above about MTD!

mount("kind", "what", "path");

Unpack a given directory from the OTA package into the given destination directory.

package_extract_dir("src", "dst");

Log a message to the screen (if the logs are visible).

ui_print("message");

Format the given MTD partition. See notes above about MTD!

format("MTD", "partition");

Delete files

delete("pathToFile1", "pathToFile2", "pathToFile3");

Apply binary patches to the given srcfile to produce tgtfile (which may be "-" to indicate overwriting the source file.

apply_patch("sourceFile", "targetFile", targetSHA1, targetSize, "patchSHA1:patchFile");

Arrange to update the given firmware image.

assert(package_extract_file("firmware.bin", "/tmp/firmware.bin"),
write_firmware_image("/tmp/firmware.bin", "firmware.bin"),
delete("/tmp/firmware.bin"));

Write the given package file into the given MTD partition. See notes above about MTD!

assert(package_extract_file("partition.img", "/tmp/partition.img"),
write_raw_image("/tmp/partition.img", "partition"),
delete("/tmp/partition.img"));

Set file ownership and permissions.

set_perm(uid, gid, mode, "pathtofile");

Recursively set path ownership and permissions.

set_perm_recursive(uid, gid, dmode, fmode, "path");

Create symlinks.

symlink("dest", "pathToLink1", "pathToLink2", "pathToLink3");