Android recovery update script

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.