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条回答
倾城 Initia
2楼-- · 2019-01-03 04:40

I can't stress that switching USB ports is key. Often front panel USB ports can be defective.

查看更多
我命由我不由天
3楼-- · 2019-01-03 04:40

This approach worked for me:

  1. adb kill-server
  2. Disable the offline device in Device Manager (see image below)
  3. Enable the device in Device Manager
  4. adb start-server

Device Manager, "View" menu, "Devices by Connection":

enter image description here

查看更多
爷的心禁止访问
4楼-- · 2019-01-03 04:41

I used adb connect <device_ip> and non of the other solutions worked because my problem was on the other side. On the device I needed to stop adbd and restart it start adbd. Device is now "online" again.

查看更多
小情绪 Triste *
5楼-- · 2019-01-03 04:42

It's just because your computer doesn't have the right driver. To fix that:

  1. Download and extract Android SDK

  2. Go to Device Manager (Right Click on Computer --> Properties --> Device Manager

  3. On the right pane expand portable devices to find your device

  4. Right click on your device name and click Update Driver Software

  5. Browse my computer for driver software

  6. Browse to your Android SDK folder on step 1.

  7. Next and you're done

查看更多
Emotional °昔
6楼-- · 2019-01-03 04:46

One more possibility for people with flaky ADB connections, and if they're on a Mac and have Android File Transfer installed: I found that file transfer was interfering with my ADB connection, causing it to stop working intermittently.

Killing the Android File Transfer Agent.app process that looks for compatible devices (for example, the Nexus 7) being connected to the Mac cures the flakiness for me.

查看更多
时光不老,我们不散
7楼-- · 2019-01-03 04:46

Try to restart the adb server as follows:

adb kill-server

adb start-server

I have also came across the same problems as yours. And restarting the adb server will resolve this problem.

查看更多
登录 后发表回答