http://hi.baidu.com/j_fo/blog/item/81ae650953ea5ec13ac76312.html
手动制作update.zip包的过程:
1.创建一个update目录,
例如:
update/
update/system
update/system/app
update/system/app/doodle_jump.
update/META-INF
update/META-INF/com
update/META-INF/com/google
update/META-INF/com/google/
update/META-INF/com/google/
该目录包含doodle_jump游戏,
META-INF目录下包含升级脚本,update-script脚本的内容如下:
show_progress 0.500000 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.100000 0
大家可以根据自己的升级内容添加相应的命令。
2.创建压缩包
在update/目录下运行:
$ zip -qry ../update.unsigned.zip ./
将在update/的父目录下产生update.
3.签名
$ java -Xmx512m -jar signapk.jar -w key.x509.pem key.pk8 update.unsigned.zip update.zip
生成签过名的update.zip包,其中
signapk.jar,key.x509.pem,
4.将签过名的update.
重启系统进入recovery模式,选择
apply update.zip,成功后重启手机
ok,现在手机上已经有doodle_jump游戏了,
refer: http://hi.baidu.com/j_fo/blog/item/53a45b82206837af0df4d21a.html How to Create Android Update Zip PackageThere are several ways to install applications or library files to an Android Phone. You can use Marketapplication to find and install or adb command line tool to install or push the files to Android file system. These are all easy to implement for single file but if you have several applications or library files to install at once, it might be better to use update zip file. The update zip file is Android advanced system to install applications or lib files to Android file system using recovery tool. This method is commonly used by rom or theme developers to distribute their package. Creating an update zip file is quite easy, all you have to do is put the files in corresponding directory in Android file system and an update-script file to copy the files. For example, to install Calculator.apk intosystem/app and copy libsec-ril.so file into system/lib :
update-script syntax reference (definitions from recovery.c android source code):
----------用Android自带的signapk.jar + .x509.pem + .pk8签名应用程序
|