最近在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本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-01/127287.htm