Android S版本差分包制作

先上结论:

out/host/linux-x86/bin/ota_from_target_files -v --block --path out/host/linux-x86/ -i old.zip new.zip ota_update.zip

如果要跳过postinstall加快ab升级速度

​​​​​​​可以添加参数 --disable_fec_computation  --skip_postinstall 

运行环境:Ubuntu 18.04

这个是针对Split build编译,如果是full编译,make otapackage估计也是要用out下生成的bin文件

如果使用Android R的做包命令

./build/tools/releasetools/ota_from_target_files --path out/host/linux-x86 -v -i old.zip new.zip update.zip

会出现报错

Warning: releasetools script should be invoked as hermetic Python executable -- build and run `ota_from_target_files` directly.
Traceback (most recent call last):
  File "./build/tools/releasetools/ota_from_target_files", line 241, in
    import ota_utils
  File "/code2/code2/S0MP1/develop/build/make/tools/releasetools/ota_utils.py", line 21, in
    import ota_metadata_pb2
  File "/code2/code2/S0MP1/develop/build/make/tools/releasetools/ota_metadata_pb2.py", line 7, in
    from google.protobuf import descriptor as _descriptor
ImportError: No module named google.protobuf

即使是安装了protobuf 依然会接着报一堆乱七八糟的错误

你可能感兴趣的:(android,ubuntu,java)