Android adb 设备连接后按键失灵

Android adb 设备连接后按键失灵

我的一台运行 Ubuntu 16.04 的机器出现了问题。

重现问题的步骤:

  1. 通过 USB 连接 Android 设备
  2. 运行“adb 设备”
  3. 开始输入

按键开始出现故障,就像我按住了某个键,但实际上我已经完全移开了手。只有断开 Android 设备的 USB 连接才能解决此问题。

我试过多个 Android 设备,它们都存在同样的问题。我还有几位同事的 PC 硬件设置完全相同,但他们没有遇到这个问题。有人能建议我如何调试这个问题以查看问题出在哪里吗?

编辑:

evtest 日志(按下“k”之前插入的设备):

Event: time 1498086624.661268, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
Event: time 1498086624.661268, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
Event: time 1498086624.661268, -------------- SYN_REPORT ------------
Event: time 1498086627.085272, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70009
Event: time 1498086627.085272, type 1 (EV_KEY), code 33 (KEY_F), value 1
Event: time 1498086627.085272, -------------- SYN_REPORT ------------
fEvent: time 1498086627.141262, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70009
Event: time 1498086627.141262, type 1 (EV_KEY), code 33 (KEY_F), value 0
Event: time 1498086627.141262, -------------- SYN_REPORT ------------
Event: time 1498086634.805269, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7000a
Event: time 1498086634.805269, type 1 (EV_KEY), code 34 (KEY_G), value 1
Event: time 1498086634.805269, -------------- SYN_REPORT ------------
gEvent: time 1498086634.869271, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7000a
Event: time 1498086634.869271, type 1 (EV_KEY), code 34 (KEY_G), value 0
Event: time 1498086634.869271, -------------- SYN_REPORT ------------
Event: time 1498086646.165257, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7000e
Event: time 1498086646.165257, type 1 (EV_KEY), code 37 (KEY_K), value 1
Event: time 1498086646.165257, -------------- SYN_REPORT ------------
kEvent: time 1498086646.415080, type 1 (EV_KEY), code 37 (KEY_K), value 2
Event: time 1498086646.415080, -------------- SYN_REPORT ------------
Event: time 1498086646.451088, type 1 (EV_KEY), code 37 (KEY_K), value 2
Event: time 1498086646.451088, -------------- SYN_REPORT ------------
Event: time 1498086646.487099, type 1 (EV_KEY), code 37 (KEY_K), value 2
Event: time 1498086646.487099, -------------- SYN_REPORT ------------
Event: time 1498086646.523132, type 1 (EV_KEY), code 37 (KEY_K), value 2
Event: time 1498086646.523132, -------------- SYN_REPORT ------------
Event: time 1498086646.559089, type 1 (EV_KEY), code 37 (KEY_K), value 2
Event: time 1498086646.559089, -------------- SYN_REPORT ------------
Event: time 1498086646.595088, type 1 (EV_KEY), code 37 (KEY_K), value 2

答案1

我找到了问题所在。我有一个有源 4 端口 USB 集线器,我的键盘插在上面一。当我将键盘直接连接到 PC 时,问题就消失了。

相关内容