1. 解压update.zip
目录结构为:
|----boot.img
|----system/
|----recovery/
|----recovery-from-boot.p
|----etc/
|----install-recovery.sh
|---META-INF/
|CERT.RSA
|CERT.SF
|MANIFEST.MF
|----com/
|----google/
|----android/
|----update-binary
|----updater-script
|----android/
|----metadata
|----otacert
2. 添加需要加入的目录
|----test_dir
|-----file1
|-----file2
|-----file3
|-----file4
|-----file5
|-----file6
|----delete_file.sh
|----dir
|-----file5
delete_file.sh的内容为:
rm /data/file3.txt
主要为了测试在Recovery执行shell脚本
assert(getprop("ro.product.device") == "rk30sdk_joyplus" ||
getprop("ro.build.product") == "rk30sdk_joyplus");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/mtd/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mtd/by-name/system", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
ui_print("yedu-lijinwei start");
mount("ext4","EMMC","/dev/block/mtd/by-name/userdata","/data");
package_extract_dir("test_dir", "/data");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
"/system/bin/chown", "/system/bin/cmp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
"/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
"/system/bin/kill", "/system/bin/ln",