Android recovery update script
时间:2010-06-28 来源:studyboy_3w
Generate update script :
make-update-script out/target/product/generic/system/ out/target/product/generic/android-info.txt > update-script
Commands:
/* assert <boolexpr>
*/
/* format <root>
*/
/* delete <file1> [<fileN> ...]
* delete_recursive <file-or-dir1> [<file-or-dirN> ...]
*
* Like "rm -f", will try to delete every named file/dir, even if
* earlier ones fail. Recursive deletes that fail halfway through
* give up early.
*/
/* copy_dir <src-dir> <dst-dir> [<timestamp>]
*
* The contents of <src-dir> will become the contents of <dst-dir>.
* The original contents of <dst-dir> are preserved unless something
* in <src-dir> overwrote them.
*
* e.g., for "copy_dir PKG:system SYSTEM:", the file "PKG:system/a"
* would be copied to "SYSTEM:a".
*
* The specified timestamp (in decimal seconds since 1970) will be used,
* or a fixed default timestamp will be supplied otherwise.
*/
/* run_program <program-file> [<args> ...]
*
* Run an external program included in the update package.
*/
/* set_perm <uid> <gid> <mode> <path> [... <pathN>]
* set_perm_recursive <uid> <gid> <dir-mode> <file-mode> <path> [... <pathN>]
*
* Like "chmod", "chown" and "chgrp" all in one, set ownership and permissions
* of single files or entire directory trees. Any error causes failure.
* User, group, and modes must all be integer values (hex or octal OK).
*/
/* show_progress <fraction> <duration>
*
* Use <fraction> of the on-screen progress meter for the next operation,
* automatically advancing the meter over <duration> seconds (or more rapidly
* if the actual rate of progress can be determined).
*/
/* symlink <link-target> <link-path>
*
* Create a symlink, like "ln -s". The link path must not exist already .
* Note that <link-path> is in root:path format, but <link-target> is
* for the target filesystem (and may be relative).
*/
/* write_radio_image <src-image>
* write_hboot_image <src-image>
* Doesn't actually take effect until the rest of installation finishes.
*/
/* write_raw_image <src-image> <dest-root>
*/
/* mark <resource> dirty|clean
*/
/* done
*/
Example:
assert compatible_with("0.2") == "true"
show_progress 0.1 0
write_radio_image PACKAGE:radio.img
show_progress 0.5 0
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:
set_perm 0 3004 02755 SYSTEM:bin/ping
symlink toolbox SYSTEM:bin/kill
show_progress 0.2 0
format BOOT:
write_raw_image PACKAGE:boot.img BOOT:
show_progress 0.2 10
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/sunrock/archive/2009/12/14/5005530.aspx