我正在尝试使用来自 Qualcomm 的材料在 Ubuntu 20 下为 DragonBoard 410c 构建我自己的 Android 版本。我已经从 Qualcomm 开发人员门户网站下载了文件,linux_android_board_support_package_vla.br_.1.2.7-01010-8x16.0-4.zip
其中包含我解压缩到文件夹中的材料,~/Documents/linux_android_board_support_package_vla.br.1.2.7-01010-8x16.0-4
使材料可用包括外壳脚本DB410c_build.sh
。
解包和设置是通过DB410c_build.sh
执行各种操作来完成的,例如.repo
使用 shell 脚本使用的 python 文件生成目录树并下载源代码。
我从各种 python 脚本中遇到了许多语法错误,看来这是为 python 2 编写的,到目前为止我已经能够解决。顺便说一句,python --version
报告python 2.7.18
但我仍然看到表明正在使用 python 3 的错误。
最新的错误来自python脚本,.repo/repo/subcmds/smartsync.py
当它执行时,我得到以下错误,我一直无法弄清楚或通过搜索找到解决方案。
Traceback (most recent call last):
File "/home/rick/Documents/linux_android_board_support_package_vla.br.1.2.7-01010-8x16.0-4/APQ8016_410C_LA.BR.1.2.7-01010-8x16.0_6.0.1_Marsh_Mallo_P2/.repo/repo/main.py", line 42, in <module>
from subcmds import all as all_commands
File "/home/rick/Documents/linux_android_board_support_package_vla.br.1.2.7-01010-8x16.0-4/APQ8016_410C_LA.BR.1.2.7-01010-8x16.0_6.0.1_Marsh_Mallo_P2/.repo/repo/subcmds/__init__.py", line 33, in <module>
mod = __import__(__name__,
File "/home/rick/Documents/linux_android_board_support_package_vla.br.1.2.7-01010-8x16.0-4/APQ8016_410C_LA.BR.1.2.7-01010-8x16.0_6.0.1_Marsh_Mallo_P2/.repo/repo/subcmds/smartsync.py", line 16, in <module>
from sync import Sync
ModuleNotFoundError: No module named 'sync'
完整的python源文件,smartsync.py
如下:
#
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from sync import Sync
class Smartsync(Sync):
common = True
helpSummary = "Update working tree to the latest known good revision"
helpUsage = """
%prog [<project>...]
"""
helpDescription = """
The '%prog' command is a shortcut for sync -s.
"""
def _Options(self, p):
Sync._Options(self, p, show_smart=False)
def Execute(self, opt, args):
opt.smart_sync = True
Sync.Execute(self, opt, args)
这只是从https://developer.qualcomm.com/hardware/dragonboard-410c/software下载的该文件中的 python 脚本的最新问题,试图使用
Android Board Support Package
vLA.BR.1.2.7-01010-8x16.0-4
以前的大多数错误都是由于语法不正确,以及except
一些很容易找到解决方案的错误(谢谢 StackOverFlow!)。raise
print
import
但是我找不到关于这个的任何信息。