android 6.0系統 make otapackage 錯誤

android 6.0 系統:在make otapackage時,出現如下錯誤:

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


經過查看打包腳本的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參數導致了對Magic的檢查,進而出現了錯誤,去掉此參數後,編譯通過,那麼此參數的作用是什麼呢?見如下文章,http://blog.csdn.net/huangyabin001/article/details/44871481


Android5.x及其之後的版本都可以使用模塊式OTA來保證每個設備使用相同的分區。模塊式OTA把整個分區作爲一個文件並且生成一個二進制補丁,而不是對比每個文件生成對應的很多個補丁。

模塊式OTA升級的開關就是--block參數。





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章