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.
- Toggled Android debugging mode
- Reinstalled the Google USB driver
- Restored the OS to a previously working backup (CyanogenMod)
- Swapped the USB cord
- Rebooted the phone/computer multiple times
- 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.
I can't stress that switching USB ports is key. Often front panel USB ports can be defective.
This approach worked for me:
adb kill-server
adb start-server
Device Manager, "View" menu, "Devices by Connection":
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 tostop adbd
and restart itstart adbd
. Device is now "online" again.It's just because your computer doesn't have the right driver. To fix that:
Download and extract Android SDK
Go to Device Manager (Right Click on Computer --> Properties --> Device Manager
On the right pane expand portable devices to find your device
Right click on your device name and click Update Driver Software
Browse my computer for driver software
Browse to your Android SDK folder on step 1.
Next and you're done
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.Try to restart the adb server as follows:
I have also came across the same problems as yours. And restarting the adb server will resolve this problem.