Skip to content

adb.exe: more than one device/emulator,多个设备时出现错误,需要变更代码 #308

@Dylan-lijl

Description

@Dylan-lijl

System Info / 系統信息

Android Debug Bridge version 1.0.41
Version 35.0.2-12147458
Installed as D:\data\android_sdk\platform-tools\adb.exe
Running on Windows 10.0.19045

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

多个设备时报错
'adb.exe: more than one device/emulator'

Expected behavior / 期待表现

main.py的check_system_requirements添加一个device_id参数,并在调用时传递args.device_id,198行命令需要先指定设备id:

result = subprocess.run(
                ["adb", "-s", device_id, "shell", "ime", "list"],
                capture_output=True,
                text=True,
                timeout=10,
            )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions