简体   繁体   English

adb shell 说没有找到设备,但是 adb -s<serialno> 壳厂

[英]adb shell says no device found, but adb -s <serialno> shell works

I'm having a curious situation with the adb shell command.我对adb shell命令有一个奇怪的情况。

adb devices

shows my device connected as expected;显示我的设备按预期连接; however when I try但是当我尝试

adb shell

with no arguments, it responds error: no device found .没有参数,它响应error: no device found HOWEVER, when I run但是,当我跑步时

adb -s <device_serial_number_from_adb_devices> shell

I'm able to get into the shell successfully.我能够成功进入shell。 Which is fine, except that I'm having some other adb-related problems due to it not connecting with default params.这很好,除了我遇到了一些其他与 adb 相关的问题,因为它没有与默认参数连接。

Additional info:附加信息:

  • usb debugging enabled (again, works when I specify the serialno)启用 USB 调试(再次,当我指定序列号时有效)
  • W7/64bit laptop W7/64位笔记本电脑
  • adb shell works fine on another macosx machine, so the problem seems to be specific to my android installation adb shell 在另一台 macosx 机器上工作正常,所以问题似乎特定于我的 android 安装
  • I've uninstalled and reinstalled the google usb driver from the android SDK我已经从 android SDK 卸载并重新安装了 google usb 驱动程序
  • restarted adb server (kill-server, start-server)重新启动 adb 服务器(kill-server、start-server)
  • tried android adb update尝试android adb update

Can any adb experts shed some light?任何亚行专家都可以解释一下吗? Thanks!谢谢!

I don't know if you are still looking for an answer to this but I had the exact same problem recently.我不知道你是否还在寻找这个问题的答案,但我最近遇到了完全相同的问题。 This is a result of setting the ANDROID_SERIAL variable in system variables.这是在系统变量中设置 ANDROID_SERIAL 变量的结果。 I had done so when trying to set up CI builds (Cukes and Units) to run on a physical device and emulator separately (ADB wasn't playing nice when both builds were being run on the same phy我在尝试设置 CI 构建(Cukes 和 Units)以分别在物理设备和模拟器上运行时这样做了(当两个构建都在同一个 phy 上运行时,ADB 表现不佳

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM