(二)android升级--完整包updater-script脚本语法简介及执行流程

本文介绍了Android升级过程中updater-script脚本的语法和执行流程,包括assert条件检查、显示进度、文件系统格式化、挂载、文件提取、符号链接创建、权限设置等操作,并详细阐述了脚本执行的各个步骤,如时间戳对比、版本检查、进度条显示、系统分区处理等。
摘要由CSDN通过智能技术生成

一、update-script脚本源码

assert(!less_than_int(1377158385, getprop("ro.build.date.utc")));

assert(getprop("ro.product.device") == "g18ref" ||
       getprop("ro.build.product") == "g18ref");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/system", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
        "/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
        "/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
        "/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
        "/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
        "/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
        "/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
        "/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
        "/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
        "/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
        "/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
        "/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
        "/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
        "/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
        "/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
        "/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
        "/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
        "/system/xbin/fbset", "/system/xbin/fbsplash", "/system/xbin/fdisk",
        "/system/xbin/fgrep", "/system/xbin/find", "/system/xbin/flash_lock",
        "/system/xbin/flash_unlock", "/system/xbin/flashcp",
        "/system/xbin/flock", "/system/xbin/fold", "/system/xbin/free",
        "/system/xbin/freeramdisk", "/system/xbin/fstrim", "/system/xbin/fsync",
        "/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
        "/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
        "/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
        "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
        "/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
        "/system/xbin/install", "/system/xbin/ionice", "/system/xbin/iostat",
        "/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
        "/system/xbin/killall5", "/system/xbin/less", "/system/xbin/ln",
        "/system/xbin/los
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值