How to generate the ota_update.zip on Android 10

Viewed 1107

I was following the instructions on https://source.android.com/devices/tech/ota/tools to generate an OTA_UPDATE.zip on Android 10.

The command I used was

./build/make/tools/releasetools/ota_from_target_files out/dist/kona-target_files-eng.jiezhang.zip ota_update.zip

But it reported errors as below

2020-06-08 13:16:35 - common.py - WARNING : Failed to read SYSTEM/build.prop
2020-06-08 13:16:35 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop
2020-06-08 13:16:35 - common.py - WARNING : Failed to read PRODUCT/build.prop
2020-06-08 13:16:35 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop
2020-06-08 13:16:35 - common.py - WARNING : Failed to read PRODUCT_SERVICES/build.prop
2020-06-08 13:16:35 - common.py - WARNING : Failed to read PRODUCT_SERVICES/etc/build.prop
2020-06-08 13:16:35 - common.py - WARNING : Failed to read ODM/build.prop
2020-06-08 13:16:36 - ota_from_target_files - ERROR   :
   ERROR:
Traceback (most recent call last):
  File "./build/make/tools/releasetools/ota_from_target_files", line 2414, in <module>
    main(sys.argv[1:])
  File "./build/make/tools/releasetools/ota_from_target_files", line 2341, in main
    source_file=OPTIONS.incremental_source)
  File "./build/make/tools/releasetools/ota_from_target_files", line 2080, in WriteABOTAPackageWithBrilloScript
    target_info = BuildInfo(OPTIONS.info_dict, OPTIONS.oem_dicts)
  File "./build/make/tools/releasetools/ota_from_target_files", line 311, in __init__
    self._fingerprint = self.CalculateFingerprint()
  File "./build/make/tools/releasetools/ota_from_target_files", line 424, in CalculateFingerprint
    self.GetBuildProp("ro.build.version.release"),
  File "./build/make/tools/releasetools/ota_from_target_files", line 371, in GetBuildProp
    raise common.ExternalError("couldn't find %s in build.prop" % (prop,))
ExternalError: couldn't find ro.build.version.release in build.prop

I checked the content in the target_files-***.zip. Seems like there is no SYSTEM folder in there. So the python script failed to find the build.prop file.

Does Android 10 change the rules of generating the OTA Update? How can I create it? Thanks.

0 Answers
Related