Android ADB device offline, can't issue comman

2019-01-03 04:07发布

I can't connect to my device anymore using ADB through the command line or in Eclipse.

Running the command

adb devices

returns the device name, but it says it's offline.

Things I've tried.

  1. Toggled Android debugging mode
  2. Reinstalled the Google USB driver
  3. Restored the OS to a previously working backup (CyanogenMod)
  4. Swapped the USB cord
  5. Rebooted the phone/computer multiple times
  6. Updated the Android SDK

I really don't have any clue what's going on. Anything else you think I can try, I'm all ears.

To be clear, if you're having this same issue the problem is probably an out-of-date SDK. As of 4.2.2 there is a security feature that requires you to confirm the RSA fingerprint of the connecting device. Open the SDK manager and update the tools! Then reboot.

30条回答
虎瘦雄心在
2楼-- · 2019-01-03 04:58

late but I found the easiest way just go to DDMS and follow as shown in image...

enter image description here

查看更多
不美不萌又怎样
3楼-- · 2019-01-03 04:58

Worked for me: in the begining it worked and after a while went to offline. I did the follwong: adb kill-server adb start-server. Plug the phone again with usb to PC adb devices, output of empty list provided. adb tcpip 5555, adb connect <mobile wifi ip address> Then it became online again.

查看更多
时光不老,我们不散
4楼-- · 2019-01-03 05:00

I hit the same issue on a Nexus 7 running 4.2.2 OTA update. I'm almost certain I had an ADB connection over USB and Wi-Fi after the update until it just stopped working. To fix, I updated my SDK using:

android update sdk --no-ui

Now my development tools are:

  • SDK rev 16.0.2
  • SDK tools rev 21.1
  • SDK API 17, rev 2
查看更多
啃猪蹄的小仙女
5楼-- · 2019-01-03 05:00

Try by turning off usb debugging once and then enabling it agin and then connect your device with system: link

查看更多
仙女界的扛把子
6楼-- · 2019-01-03 05:00

For me nothing worked. I spent about 12 hours constantly searching on the Internet and trying the solutions that worked for other people having similar issues.

Finally I ended up with just doing the ADB stuff over the LAN. The setting was right next to the USB Debug setting and in ADB it can be activated with "adb connect [IPADDRESS]:[PORT]". The port was 5555 on my phone.

I hope this helps someone to get back to work instead of having to deal with constant drawbacks.

查看更多
Rolldiameter
7楼-- · 2019-01-03 05:01

Installed the latest android sdk.
Changed the USB port of the device.
Changed from MTP -> Charge only -> MTP.
It worked.

查看更多
登录 后发表回答