也没有fastboot_protocol.c
时间: 2023-12-12 12:04:12 浏览: 38
如果在高通 abl edk2 中没有 fastboot_protocol.c 文件,可以尝试以下方法获取品牌名称:
1. 打开高通 abl edk2 代码,找到 platform.c 文件。
2. 在该文件中搜索 "DTB_FILE_NAME" 字符串。
3. 找到 "DTB_FILE_NAME" 字符串后面的字符串,该字符串即为设备名称。
4. 根据设备名称查询品牌列表,获取对应的品牌名称。
注意,以上方法仅适用于高通 abl edk2 中获取设备名称,其他平台可能需要使用不同的方法获取品牌信息。如果以上方法不能满足您的需求,请提供更多的上下文信息,我会尽力为您提供更准确的解答。
相关问题
self = ChainMap({}, {'im30': 'pax_branch_7.0_3.xx_release', 'im30v2': 'A133_V2_4_T509_pax_branch_release', 'a80': 'pax_branch...3700': 'MTK_android11_pax_branch_user', 'a8300': 'A133_V2_4_pax_branch_release', 'a6650': 'A6650_pax_branch_user'}, {}) key = 'a80s' def __missing__(self, key): > raise KeyError(key) E KeyError: 'a80s' /usr/lib/python3.8/collections/__init__.py:890: KeyError During handling of the above exception, another exception occurred: request = <SubRequest 'upgrade_os_by_fastboot' for <Function test_Antutu_Score_PER1>> get_device_in_config = ('172.16.120.187:6714', '172.16.25.170', 'false', 'A80S', True) get_sn_fastboot_sn = {'1240047508': '241050374620301a044f', '1240193065': '140050344410142b03ce', '1640000442': '1400788643245025084f', '2210000495': 'NRUO65VOT4TWON99', ...} @pytest.fixture(scope='session', autouse=False) def upgrade_os_by_fastboot(request, get_device_in_config, get_sn_fastboot_sn): """ 更新固件 """ _serial, ip, regex, device_name, is_version_test = get_device_in_config # 一些配置参数 # _serial = get_serial logger.info(exec_cmd("adb devices -l")) if util.wait_for_device(_serial, timeout=10 * 60) is False: assert False, "{} device is offline".format(_serial) return # 优先从命令行获取 fastboot_sn = request.config.getoption(CmdOption.DEVICE_FASTBOOT.value) if fastboot_sn is None: fastboot_sn = get_sn_fastboot_sn.get(_serial) if fastboot_sn is None: logger.warning(f"也许你需要在{get_sn_fastboot_sn_map_path()}配置对应的fastboot sn") fastboot_sn = _serial path = os.getcwd() logger.info("upgrade_os_by_fastboot path:%s" % path) logger.info(exec_cmd("rm -rf ./Uniphiz_*")) logger.info(exec_cmd("rm -rf ./PayDroid_*")) logger.info(exec_cmd("rm -rf ./IM30_A80_PayDroid_*")) if is_version_test is False: # CI的日常测试任务 upgrade_result = upgrade_now(_serial, device_name, fastboot_sn, "", "fastboot") else: # CI的版本测试任务 > upgrade_result = upgrade_now_version_test(_serial, device_name, fastboot_sn, "", "fastboot") ../CI_Code_Pull/tests/conftest.py:209: 这是什么错误
这是一个KeyError错误。在你的代码中,`__missing__`方法被调用时,抛出了一个KeyError异常,因为在字典中找不到键为'a80s'的值。
在这段代码中,你定义了一个名为`self`的ChainMap对象,并在其中存储了多个字典。当你使用`self['a80s']`来获取键为'a80s'的值时,由于字典中没有该键,触发了`__missing__`方法。
在`__missing__`方法中,你抛出了一个KeyError异常,该异常表示字典中找不到指定的键。然后,在捕获到这个KeyError异常后,又触发了另一个异常,导致整个错误堆栈。
要解决这个问题,你可以检查一下是否正确设置了ChainMap对象中的字典,并确保你要获取的键存在于其中。也可以考虑在`__missing__`方法中提供一个默认值,以避免抛出异常。
tools\fastboot flash cache system/cache.img tools\fastboot flash aboot system/emmc_appsboot.mbn tools\fastboot flash boot system/boot.img tools\fastboot flash persist system/persist.img tools\fastboot flash recovery system/recovery.img tools\fastboot flash -S 500M system system/system.img tools\fastboot flash userdata system/userdata.img tools\fastboot flash splash system/splash_90.img tools\fastboot flash qpdata1 system/param_id_lvds_1920_1080.txt
这些指令是用来在 bootloader 模式下使用 fastboot 工具执行的。
以下是每个指令的作用:
1. "tools\fastboot flash cache system/cache.img":将 cache.img 文件刷写到设备的缓存分区。
2. "tools\fastboot flash aboot system/emmc_appsboot.mbn":将 emmc_appsboot.mbn 文件刷写到设备的 aboot 分区。
3. "tools\fastboot flash boot system/boot.img":将 boot.img 文件刷写到设备的引导分区。
4. "tools\fastboot flash persist system/persist.img":将 persist.img 文件刷写到设备的 persist 分区。
5. "tools\fastboot flash recovery system/recovery.img":将 recovery.img 文件刷写到设备的恢复分区。
6. "tools\fastboot flash -S 500M system system/system.img":将 system/system.img 文件刷写到设备的系统分区,并设置分区大小为 500M。
7. "tools\fastboot flash userdata system/userdata.img":将 userdata.img 文件刷写到设备的用户数据分区。
8. "tools\fastboot flash splash system/splash_90.img":将 splash_90.img 文件刷写到设备的闪屏分区。
9. "tools\fastboot flash qpdata1 system/param_id_lvds_1920_1080.txt":将 param_id_lvds_1920_1080.txt 文件刷写到设备的 qpdata1 分区。
这些指令的具体作用和文件路径可能因设备型号和厂商而有所不同,请根据实际情况进行操作。在执行这些操作之前,请确保你对设备和操作有足够的了解,并备份重要数据以防意外发生。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)