您好,登錄后才能下訂單哦!
android 6.0 系統(tǒng):在make otapackage時,出現(xiàn)如下錯誤:
unable to load device-specific module; assuming none
using prebuilt recovery.img from IMAGES...
using system.img from target-files
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1719, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1674, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files", line 610, in WriteFullOTAPackage
system_tgt = GetImage("system", OPTIONS.input_tmp, OPTIONS.info_dict)
File "./build/tools/releasetools/ota_from_target_files", line 496, in GetImage
return sparse_img.SparseImage(path, mappath, clobbered_blocks)
File "/home/guofengwan/workspace/rdadroid-6.0/build/tools/releasetools/sparse_img.py", line 50, in __init__
raise ValueError("Magic should be 0xED26FF3A but is 0x%08X" % (magic,))
ValueError: Magic should be 0xED26FF3A but is 0x23494255
make: *** [out/target/product/etau-Lensun_R635D_8810P/etau-ota-eng.guofengwan.zip] Error 1
經(jīng)過查看打包腳本的py代碼,分析出在build/core/Makefile中
@echo "Package OTA: $@"
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \
./build/tools/releasetools/ota_from_target_files -v \
- --block \
加了這個block參數(shù)導致了對Magic的檢查,進而出現(xiàn)了錯誤,去掉此參數(shù)后,編譯通過,那么此參數(shù)的作用是什么呢?見如下文章,http://blog.csdn.net/huangyabin001/article/details/44871481
Android5.x及其之后的版本都可以使用模塊式OTA來保證每個設備使用相同的分區(qū)。模塊式OTA把整個分區(qū)作為一個文件并且生成一個二進制補丁,而不是對比每個文件生成對應的很多個補丁。
模塊式OTA升級的開關就是--block參數(shù)。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。