简体   繁体   中英

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

I'm having a curious situation with the adb shell command.

adb devices

shows my device connected as expected; however when I try

adb shell

with no arguments, it responds 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. Which is fine, except that I'm having some other adb-related problems due to it not connecting with default params.

Additional info:

  • usb debugging enabled (again, works when I specify the serialno)
  • W7/64bit laptop
  • adb shell works fine on another macosx machine, so the problem seems to be specific to my android installation
  • I've uninstalled and reinstalled the google usb driver from the android SDK
  • restarted adb server (kill-server, start-server)
  • tried 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. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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