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条回答
我只想做你的唯一
2楼-- · 2019-03-17 11:55

In my case, I was using an old version of adb, make sure you have the latest version of adb. You can download here, extract and run straight within the folder ./adb.

查看更多
爷、活的狠高调
3楼-- · 2019-03-17 11:56

Please go to the developer options on the phone and click "Revoke USB debugging authorization"

Enable it again and try to get the logs. This is basically waiting for the device to get connected. Make sure to authorize USB access from device as well.

查看更多
【Aperson】
4楼-- · 2019-03-17 12:03

I had a similar problem, but for different reasons. My issue came from programing usb accessory on android, which changes the vid/pid when in accessory mode. The solution for me that worked was the following:

  1. Connect the phone
  2. Run the usb host side accessory mode commands (Example website: http://android.serverbox.ch/?p=262 )
  3. Phone should have reconnected in accessory mode (Ensure the PID has adb: 0x2D01)
  4. adb kill-server
  5. sudo adb start-server (This caused the phone to re-ask auth permission)
  6. adb logcat (In my case I wanted to watch the logs, this now worked in accessory mode)
查看更多
乱世女痞
5楼-- · 2019-03-17 12:06

I have also experienced similar problems I think I solved it by having the USB debugging option switched on within Developer Options in Settings.

REPEAT The following steps above, it should work!

查看更多
Root(大扎)
6楼-- · 2019-03-17 12:06

What OS are you using? It can be a variety of different reasons. Did you make sure you only have either the emulator running or a device attached? If so, you can direct your adb command by using the -d or the -e flag.

查看更多
趁早两清
7楼-- · 2019-03-17 12:07

I am not pretty much sure if this works for you but can you please try the steps below:

# Kill and restart      
$ adb kill-server      
$ adb start-server     
 daemon not running. starting it now *      
 daemon started successfully *         

# Device appears, but is listed as offline

$ adb devices      
$ adb logcat
查看更多
登录 后发表回答