android R编译Super镜像时报错问题分析和定位
在android R版本全編譯時,遇到編譯打包super.img時報錯,這里介紹一下這種問題如何定位原因和解決,主要是描述一下分析的思路。
錯誤日志如下:
out/target/product/tt/obj/PACKAGING/check-all-partition-sizes_intermediates/misc_info.txt )" Traceback (most recent call last):File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/internal/stdlib/runpy.py", line 174, in _run_module_as_mainFile "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/internal/stdlib/runpy.py", line 72, in _run_codeFile "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/__main__.py", line 12, in <module>File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/internal/stdlib/runpy.py", line 174, in _run_module_as_mainFile "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/internal/stdlib/runpy.py", line 72, in _run_codeFile "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 271, in <module>File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 265, in mainFile "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 253, in CheckPartitionSizesFile "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 245, in RunFile "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 242, in _CheckAllPartitionSizesFile "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 61, in CheckLe RuntimeError: sum of sizes of ['youroem_dynamic_partitions'] is greater than BOARD_SUPER_PARTITION_SIZE / 2: 2147483648 4290772992 == 4290772992 > 2147483648 == 2147483648 [100% 312/312] Target super fs image for debug: out/target/product/tt/super.img 2021-07-12 10:20:00 - build_super_image.py - INFO : Building super image from info dict... 2021-07-12 10:20:00 - sparse_img.py - INFO : Total of 217749 4096-byte output blocks in 20 input chunks.核心錯誤在句日志
RuntimeError: sum of sizes of [‘youroem_dynamic_partitions’] is greater than BOARD_SUPER_PARTITION_SIZE / 2: 2147483648
4290772992 == 4290772992 > 2147483648 == 2147483648
初步看起來是size比較的問題,追一下python腳本代碼,從日志錯誤來看是調(diào)用的check_partition_sizes.py腳本,去build目錄下find一下,找到后打開check_partition_sizes.py,找到報錯的行號
查看一下max_size的定義和sum_size的來源,基本上就明白咋回事了,就是指在打開A/B配置的情況下,sum_size不能大于max_size的一半,對應(yīng)到板卡makefile中的BOARD_SUPER_PARTITION_SIZE值,最后編譯到了out產(chǎn)物中的misc_info.txt中,打包super時最后會檢查一下這個size
到這里就基礎(chǔ)明白跟BOARD_SUPER_PARTITION_SIZE有關(guān)了,全局查看一下發(fā)現(xiàn)走到8GB的那個配置了,導(dǎo)致的報錯,初步修改是打開ENABLE_VIRTUAL_AB宏,解決了當前的報錯,先分析到這里吧。
總結(jié)
以上是生活随笔為你收集整理的android R编译Super镜像时报错问题分析和定位的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C++ (public, protect
- 下一篇: [最新答案V0.4版]微软等数据结构+算