Android r compiles OTA times error: ExternalError: Invalid ro.product.property_source_order

In make dist dist_ When compiling OTA package, dir = mydist encountered an error, which was not encountered in previous Android versions. Here is a record
error report content:

2021-07-02 09:53:29 - common.py - WARNING : Failed to read ODM/build.prop
2021-07-02 09:53:29 - add_img_to_target_files.py - ERROR   : 
   ERROR:
Traceback (most recent call last):
  File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 999, in <module>
  File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 993, in main
  File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 733, in AddImagesToTargetFiles
  File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 701, in LoadInfoDict
    build_info = BuildInfo(d)
  File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 393, in __init__
    self._device = self.GetOemProperty("ro.product.device")
  File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 509, in GetOemProperty
    return self.GetBuildProp(key)
  File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 451, in GetBuildProp
    return self._ResolveRoProductBuildProp(prop)
  File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 476, in _ResolveRoProductBuildProp
    "Invalid ro.product.property_source_order '{}'".format(source_order))
**ExternalError: Invalid ro.product.property_source_order '['odm', 'vendor', 'product', 'product_services', 'system']'**

Analyze the corresponding common. Py code

common.py script
 def _ResolveRoProductBuildProp(self, prop):
   default_source_order = self._GetRoProductPropsDefaultSourceOrder()
   source_order_val = self._GetRawBuildProp(
        "ro.product.property_source_order", None)
   source_order = source_order_val.split(",")
       if any([x not in default_source_order for x in source_order]):
      raise ExternalError(
          "Invalid ro.product.property_source_order '{}'".format(source_order))#挂在这行

  def _GetRoProductPropsDefaultSourceOrder(self):
  ...
  return BuildInfo._RO_PRODUCT_PROPS_DEFAULT_SOURCE_ORDER_CURRENT

  _RO_PRODUCT_PROPS_DEFAULT_SOURCE_ORDER_CURRENT = [
      "product", "odm", "vendor", "system_ext", "system"]

Open systme.prop in the board

ro.product.property_source_order=odm,vendor,product,product_services,system

It can be seen that the two do not match, resulting in an error
modify the ro.product.property in system.prop_ source_ The content of the order property, so that the two are equal, the compiler will no longer report an error.

#ro.product.property_source_order=odm,vendor,product,product_services,system
ro.product.property_source_order=odm,vendor,product,system_ext,system


Read More: