日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

android R编译OTA时报“ExternalError: Invalid ro.product.property_source_order”解决方法

發布時間:2025/3/15 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android R编译OTA时报“ExternalError: Invalid ro.product.property_source_order”解决方法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在make dist DIST_DIR=mydist編譯OTA包時,遇到個錯誤,在以前android版本中倒是沒有遇到過,這里記錄一下。
報錯內容:

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 mainFile "/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 AddImagesToTargetFilesFile "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 701, in LoadInfoDictbuild_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 GetOemPropertyreturn 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 GetBuildPropreturn 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']'**

分析一下對應的common.py代碼吧

common.py腳本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"]

打開板卡中的systme.prop

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

可以看到這兩者不匹配,導致報錯。
修改一下system.prop中ro.product.property_source_order屬性內容,讓這兩者相等即可,編譯就不再報錯了。

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

總結

以上是生活随笔為你收集整理的android R编译OTA时报“ExternalError: Invalid ro.product.property_source_order”解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。