Android OTA FOTA制作命令

FOTA OTA升级包制作方案:

./build/tools/releasetools/ota_from_target_files  -k releasekey  path  -i 原始OTA包路径1  待升级OTA包路径2  生成的OTA包路径update.zip


FOTA OTA降级包制作方案


./build/tools/releasetools/ota_from_target_files --downgrade or   --override_timestamp -k releasekey path  -i 原始OTA包路径1  待降级OTA包路径2  生成的OTA包路径update.zip

 

-k releasekey 是编译android签名用文件

-i 参数带升级前后两个ota包

--downgrade
      Intentionally generate an incremental OTA that updates from a newer
      build to an older one (based on timestamp comparison). "post-timestamp"
      will be replaced by "ota-downgrade=yes" in the metadata file. A data
      wipe will always be enforced, so "ota-wipe=yes" will also be included in
      the metadata file. The update-binary in the source build will be used in
      the OTA package, unless --binary flag is specified. Please also check the
      doc for --override_timestamp below.

--override_timestamp
      Intentionally generate an incremental OTA that updates from a newer
      build to an older one (based on timestamp comparison), by overriding the
      timestamp in package metadata. This differs from --downgrade flag: we
      know for sure this is NOT an actual downgrade case, but two builds are
      cut in a reverse order. A legit use case is that we cut a new build C
      (after having A and B), but want to enfore an update path of A -> C -> B.
      Specifying --downgrade may not help since that would enforce a data wipe
      for C -> B update. The value of "post-timestamp" will be set to the newer
      timestamp plus one, so that the package can be pushed and applied.

--downgrade or   --override_timestamp 参数错在差异简单一点:

--downgrade:data wipe will always be enforced, so "ota-wipe=yes" will also be included in the metadata file

所以--downgrade 会擦除整个data分区,最好不要用这个--downgrade。
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值