Chinaunix首页 | 论坛 | 博客
  • 博客访问: 285010
  • 博文数量: 91
  • 博客积分: 1772
  • 博客等级: 上尉
  • 技术积分: 930
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-17 19:49
文章分类

全部博文(91)

文章存档

2012年(1)

2011年(36)

2010年(50)

2008年(4)

我的朋友

分类: 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 will become the contents of .
* The original contents of are preserved unless something
* in 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 [ ...]
*
* 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 of the on-screen progress meter for the next operation,
* automatically advancing the meter over seconds (or more rapidly
* 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 is in root:path format, but is
* 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 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

阅读(1757) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~