Android 制作 升级包
来源:互联网 发布:mysql 经典书籍 编辑:程序博客网 时间:2024/05/16 18:36
http://hi.baidu.com/j_fo/blog/item/81ae650953ea5ec13ac76312.html
1.创建一个update目录,
重启系统进入recovery模式,选择
refer:
http://hi.baidu.com/j_fo/blog/item/53a45b82206837af0df4d21a.html
How to Create Android Update Zip Package
There 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 :
- Create an empty folder (eg. C:\myupdate)
- Create C:\myupdate\system\app folder for Calculator.apk and C:\myupdate\system\lib folder forlibsec-ril.so
- Create C:\myupdate\META-INF\com\google\android folder for update-script file.
- Create the update-script file with the following syntax:
show_progress 0.1 0copy_dir PACKAGE:system SYSTEM:show_progress 0.1 10
Line 1&5 : show progress bar
Line 3: copy system folder from update package to Android’s /systemNote: you should add one extra line at the end of the file (Line 6)
- Compress the entire contents of C:\myupdate folder to zip (not the myupdate folder itself)
- Sign the myupdate.zip file
java -jar signapk.jar certificate.pem key.pk8 myupdate.zip update.zip
Note: you can find tutorial on how to sign the update.zip file here
- Copy the update.zip file to sdcard and apply it from recovery console
update-script syntax reference (definitions from recovery.c android source code):
- copy_dir
Syntax: copy_dir <src-dir> <dst-dir> [<timestamp>]
Copy the contents of <src-dir> to <dst-dir>. The original contents of <dst-dir> are preserved unless something in <src-dir> overwrote them.
Ex: copy_dir PACKAGE:system SYSTEM: - format
Syntax: format <root>
Format a partiti0n
Ex: format SYSTEM:, will format entire /system . Note: formatting erases data irreversibly. - delete
Syntax: delete <file1> [... <fileN>]
Delete file.
EX: delete SYSTEM:app/Calculator.apk, will delete Calculator.apk from system/app directory. - delete_recursive
Syntax: delete_recursive <file-or-dir1> [... <file-or-dirN>]
Delete a file or directory with all of it’s contents recursively
Ex: delete_recursive DATA:dalvik-cache, will delete /data/dalvik-cache directory with all of it’s contents - run_program
Syntax: run_program <program-file> [<args> ...]
Run an external program included in the update package.
Ex: run_program PACKAGE:install_busybox.sh, will run install_busybox.sh script (shell command) included in the update package. - set_perm
Syntax: set_perm <uid> <gid> <mode> <path> [... <pathN>]
Set ownership and permission of single file or entire directory trees, like ‘chmod’, ‘chown’, and ‘chgrp’ all in one
Ex: set_perm 0 2000 0550 SYSTEM:etc/init.goldfish.sh - set_perm_recursive
Syntax: set_perm_recursive <uid> <gid> <dir-mode> <file-moe> <path> [... <pathN>]
Set ownership and permission of a directory with all of it’s contents recursivelyEx: set_perm_recursive 0 0 0755 0644 SYSTEM:app
- show_progress
Syntax: show_progress <fraction> <duration>
Use 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).
Ex: show_progress 0.1 0 - symlink
Syntax: symlink <link-target> <link-path>
Create a symlink (like ‘ln-s’). The <link-path> is in root:path format, but <link-target> is
for the target filesystem (and may be relative)
----------
用Android自带的signapk.jar + .x509.pem + .pk8签名应用程序
signapk.jar:由/platform/build/tools/signapk/编译产出,可以在/out/host/linux-x86/framework/中找到。
签名:
java -jar signapk.jar platform.x509.pem platform.pk8 MyDemo.apk MyDemo_signed.apk 得到具有对应权限的APK
优化APK:
zipalign -v 4 MyDemo_signed.apk MyDemo_new.apk
查循APK是否优化过:
zipalign -c -v 4 MyDemo.apk
- android 升级包制作
- Android 制作 升级包
- 制作android 升级包
- Android 制作 升级包
- 制作Android 升级包
- Android 升级包的制作
- android OTA升级包制作
- android升级–升级包的制作
- Android:制作Update.zip升级包
- android update.zip升级包的制作
- Android系统OTA升级包制作
- Android OTA升级包制作流程
- (一)android升级--升级包的制作
- android ota 升级包制作分析 (2 包结构)
- 升级包制作
- OTA升级包制作
- 制作升级包脚本
- Android系统Recovery工作原理1-- 升级包 的 制作
- sd卡下目录简介
- php扩展依赖
- VS2008反应慢改进方法
- HDU 1430 关系映射 + 打表 .
- 树:一些关于树的面试题
- Android 制作 升级包
- 身份认证和访问控制实现原理
- android创建隐藏文件或者文件夹,并对其读写操作
- iframe跨域访问
- listView入门
- HttpURLConnection超时处理
- Debian系统升级
- 爱摘苹果的小明
- rror: #20: identifier "RCC_PLLSource_HSE_Div1" is undefined