一、准备基准包
1.Android源码根目录下新建OTA目录 Notebook-PC:~/aosp$ mkdir ~/OTA
2.编译生成基准包A_old make -j4 make otapackage cp out/target/product/<product_XXX>/obj/PACKAGING/target_files_intermediates/full_XXX-target_files-eng.zip ~/OTA/full_XXX-target_files-eng.A_old.zip
3.产生更新 增加一个apk/删除一个apk/修改系统版本号/或者其他能分辨系统差异的变更
4.编译生成基准包B_new make -j4 make otapackage? cp out/target/product/<product_XXX>/obj/PACKAGING/target_files_intermediates/full_XXX-target_files-eng.zip ~/OTA/full_XXX-target_files-eng.B_new.zip
二、编译差分包&签名
1、编译生成差分包 ./build/tools/releasetools/ota_from_target_files -v ?-k?<key_path> -i ~/OTA/full_XXX-target_files-eng.A_old.zip ~/OTA/full_XXX-target_files-eng.B_new.zip ~/OTA/update.zip
具体的参数含义为 : ?-v 显示具体编译命令 ?-k 签名文件路径(如果不指定这个参数,key_path默认取值参考如下规则) ?-i? 产生增量包
<key_path> 取值规则如下,查看ProjectConfig.mk 1)如果MTK_SIGNATURE_CUSTOMIZATION=yes并且MTK_INTERNAL=no, ? ?<key_path>的值为:build/target/product/security/<Project>/releasekey 2)如果MTK_SIGNATURE_CUSTOMIZATION=yes并且MTK_INTERNAL=yes, ? ?<key_path>的值为:build/target/product/security/common/releasekey 3)如果MTK_SIGNATURE_CUSTOMIZATION=no ? ?<key_path>的值为:build/target/product/security/testkey
|