Android recovery update script

Android recovery update script

 

 

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值