nandupdate/
|------------------mknandupdate.sh 生成update.zip包脚本
|------------------signapk.jar 加密公钥及加密 out/host/linux-x86/framework/
|------------------testkey.pk8 build/target/product/security/
|------------------testkey.x509.pem build/target/product/security/
|------------------README.txt 相关说明文档
|------------------update/
|----- META-INF/com/google/android/
|----update-binary
|----updater-script
解释:
1>mknandupdate.sh:
1 cd update 2 zip -qyr ../update-unsign.zip . 3 cd .. 4 java -jar -Xmx800m ./signapk.jar -w ./testkey.x509.pem ./testkey.pk8 update-unsign.zipupdate.zip |
-Xmx800m :设置JAVA的堆栈大小。java.lang.OutOfMemoryError: Java heap space 引起的。
2>README.txt:
关于NAND升级工具的使用方法以及注意事项: 1、此工具仅支持system.img和boot.img升级,不支持uboot.bin升级。 2、需要在LINUX环境下解压和操作。 3、请将system.img和boot.img拷入update目录 4、# ./mkupdatezip.sh 5、拷贝生成的update.zip到TF卡的根目录。 6、关闭设备将TF卡插入外卡插槽中。 升级步骤: 1)首先按下Vol+键,再按下power键(一直按下状态,直到进入升级模式) 2)然后通过触摸按键操作(VOL-向下、VOL+向上、POWER选择) 3)通过“POWER”键选择进入“apply update from external storage” 4)进入SDCARD,选择update.zip包 5)待升级完成(),选择“reboot system now” 6)系统重启,升级完成 |
4>updater-script :bootable/recovery/updater.c中的宏SCRIPT_NAME的值而定。
ui_print(""); ui_print("+-------------------------------------------------------+"); ui_print("| NOW Nand Recovery |"); ui_print("+--------------------------------------------------------+"); ui_print(""); show_progress(1.000000, 60); ui_print("unzip boot.img ..."); package_extract_file("boot.img","/tmp/boot.img"); ui_print(""); ui_print("flashing boot.img ..."); write_raw_image("/tmp/boot.img","kernel"); ui_print("flash boot.img done."); ui_print(""); ui_print("delete /tmp/boot.img"); delete_recursive("/tmp/boot.img"); ui_print("delete /tmp/boot.img successful"); ui_print("==========================="); ui_print("unzip system.img ..."); package_extract_file("system.img","/tmp/system.img"); ui_print(""); ui_print("umount /system ..."); unmount("/system"); ui_print("flashing system.img ..."); write_raw_image("/tmp/system.img","System"); ui_print("flash system.img done."); ui_print(""); ui_print(""); show_progress(1.000000, 0); |