adb logcat hangs with “waiting for device” message

2019-03-17 11:38发布

When I type adb devices command on terminal, it shows device is connected

List of devices attached

0123456789ABCDEF device

But when I type adb logcat command, it hangs with below message

waiting for device

Can anybody tell me what is the problem behind this? I test the device on cts.

13条回答
▲ chillily
2楼-- · 2019-03-17 11:46

This happend to me on OS X mountain lion. To fix it I had to
open Activity Monitor, filter all processes named "adb" and force quit them (I had 3 running). Then reconnect the device and everything was working again.

查看更多
Anthone
3楼-- · 2019-03-17 11:46

On my Samsung Galaxy S4 I had the same problem but after 10-20 seconds a dialog pops up on the phone where I have to accept the debug request

查看更多
做个烂人
4楼-- · 2019-03-17 11:50

I got Nexus tab today and I had to go to Settings -> About Tablet -> (tap 7 or 8 times) on Build Number.

Then 'Developer Options' showed up above 'About Tablet'.

Next in Developer Options, after enabling USB Debugging I was able to get the logs

For Mac Users:

cd /Applications/Android/sdk/platform-tools

./adb logcat

查看更多
\"骚年 ilove
5楼-- · 2019-03-17 11:51

I had this same problem on Ubuntu 12.04. Thankfully MickeyMicro had the solution that worked for me:

  1. Run the command: gksudo gedit /etc/udev/rules.d/51-android.rules

  2. Add the following line to the blank file

SUBSYSTEM=="usb", ATTR{idVendor}="2080", MODE="0666" (I used this one on 12.04)

SUBSYSTEM=="usb", SYSFS{idVendor}="2080", MODE="0666" (Another recommended for 10.04)

  1. Save and close gedit.

  2. Run the command: sudo chmod a+rx /etc/udev/rules.d/51-android.rules

  3. Restart the system.

  4. Run the command: sudo sh -c "mkdir -p ~/.android; echo 0x2080 > ~/.android/adb_usb.ini; adb kill-server; adb devices"

  5. Verify that you have permissions to access the device. adb devices should return normal response, rather than a "???????????? no permissions" message.

http://forum.cyanogenmod.com/topic/23163-need-help-for-adb-connection-on-ubuntu/

查看更多
等我变得足够好
6楼-- · 2019-03-17 11:52

When I have experienced this infinite "waiting for device" on Windows I had simply forgotten to enable usb-debugging in the developer options of my device.

查看更多
来,给爷笑一个
7楼-- · 2019-03-17 11:53

I had similar problem on Galaxy S3, with adb running on Ubuntu 11.10 OS. In my case, If I reconnect the device (pull the USB connection and reconnect it), the log cat starts working. This happens only for the first time I connect the device after powering it up. Once logcat starts working, then it continues to work smoothly, without needing to reconnect.

查看更多
登录 后发表回答