android - 将 adb 与具有相同序列号的多个设备一起使用

标签 android adb

<分区>

有两个设备连接到我的电脑。但是当我启动adb时,它们的序列号都是“0123456789ABCDEF”。

当我尝试安装 APK 时,安装失败并显示“多个设备”错误消息。 enter image description here

另外,我正在开发一个蓝牙应用程序,我需要同时使用两个设备。

最佳答案

adb devices -l 命令打印出一些额外的设备参数,这些参数也可以与 adb -s 一起使用。显然,只有当这些额外参数中的任何一个是唯一的时,它才会有所帮助。幸运的是,linuxosx 用户 adb devices -l 在这些系统中也报告了唯一的 USB 端口号:

$ adb devices -l
List of devices attached
XXXXXXXXXX             device usb:2-1.6.7.7 product:shamu model:Nexus_6 device:shamu

$ adb -s usb:2-1.6.7.7 shell
shell@shamu:/ $

关于android - 将 adb 与具有相同序列号的多个设备一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30214744/

相关文章:

android - 如何在连接到远程系统的设备上部署和执行应用程序?

android - 将 MapView 另存为位图

android - Android Studio 3.3 升级后,我的 APK 将构建但不会运行

android - WebView.enableSlowWholeDocumentDraw 是否存在于当前 Activity 之外?

android - 淡出当前 Activity 的 View

android - “adb shell am set-inactive <packageName> true “does' t 工作

Android ADB - 无法连接到 '192.168.1.4:5037' : Connection refused

java - 如何仅将appium指定给一台设备

android - 如何使用位置或加速度计或其他方式在 Android 应用程序中获得速度

java - Android AAR lib - 资源链接失败