分类: LINUX
2010-06-28 09:53:50
Generate update script :
make-update-script out/target/product/generic/system/ out/target/product/generic/android-info.txt > update-script
Commands:
/* assert
*/
/* format
*/
/* delete
* delete_recursive
*
* 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
*
* The contents of
* The original contents of
* in
*
* 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
*
* Run an external program included in the update package.
*/
/* set_perm
* set_perm_recursive
*
* 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
*
* Use
* automatically advancing the meter over
* if the actual rate of progress can be determined).
*/
/* symlink
*
* Create a symlink, like "ln -s". The link path must not exist already
.
* Note that
* for the target filesystem (and may be relative).
*/
/* write_radio_image
* write_hboot_image
* Doesn't actually take effect until the rest of installation finishes.
*/
/* write_raw_image
*/
/* mark
*/
/* 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