最近在RK3288 Android5.1上使用make otapackage命令編譯OTA升級包時,出現如下錯誤:
No RK Loader for TARGET_DEVICE rk3288 to otapackage
package add resource.img to BOOT and RECOVERY
No uboot for uboot/uboot.img to otapackage
No trust for uboot/trust.img to otapackage
No charge for uboot/charge.img to otapackage
No parameter for TARGET_DEVICE rk3288 to otapackage
Package target files: out/target/product/rk3288/obj/PACKAGING/target_files_intermediates/rk3288-target_files-eng.guochongxin.zip
building image from target_files RECOVERY...
Traceback (most recent call last):
File "./build/tools/releasetools/make_recovery_patch", line 68, in
main(sys.argv[1:])
File "./build/tools/releasetools/make_recovery_patch", line 39, in main
input_dir, "RECOVERY")
File "/home/guochongxin/rk/rk3288_5.1/build/tools/releasetools/common.py", line 411, in GetBootableImage
info_dict)
File "/home/guochongxin/rk/rk3288_5.1/build/tools/releasetools/common.py", line 365, in BuildBootableImage
p4 = Run(sign_cmd)
File "/home/guochongxin/rk/rk3288_5.1/build/tools/releasetools/common.py", line 86, in Run
return subprocess.Popen(args, kwargs)
File "/usr/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: * [out/target/product/rk3288/obj/PACKAGING/target_files_intermediates/rk3288-target_files-eng.guochongxin.zip] Error 1
發現是drmsigntool沒有編譯進去,於是cd build/tools/drmsigntool/,然後mm -B,再回到源碼根目錄下make otapackage,然後看到如下錯誤:
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1577, in
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1534, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files", line 493, in WriteFullOTAPackage
info_dict=OPTIONS.info_dict)
File "/home/guochongxin/rk/rk3288_5.1/build/tools/releasetools/common.py", line 883, in init
self.module = imp.load_module("device_specific", info)
File "/tmp/targetfiles-JetnRt/META/releasetools.py", line 138
try:
^
IndentationError: unindent does not match any outer indentation level
make: ** [out/target/product/rk3288/rk3288-ota-eng.guochongxin.zip] Error 1
後來發現是在device/rockchip/common/releasetools.py裡面有個try的縮進不對導致。
更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2
更多Android相關信息見Android 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=11