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 updated many times, until I couldn't update any more, but I never got a prompt on my screen; I just kept getting the device offline.
My problem was that I was running the ADB command from a different directory to what was actually being updated.
The correct updated directory for the ADB exe is:
Be sure to use
adb
from yourplatform-tools
folder, after updating the SDK tools.I finally got this working after I realized I was using an outdated version of ADB copied in
/usr/bin
.The best way I figured is by disabling and then enabling the device from Device Manager and running the adb devices command.
The device will be back online. It's faster.
I was having this problem and none of the other answers helped. What was necessary, after updating the SDK and installing the API for 4.2.2, was running:
Another problem I was having was that I was trying to connect ADB over Wi-Fi, which is my only option because the USB ports on my Mac are really finnicky. Unfortunately, ADB over Wi-Fi doesn't show the security question in 4.2.2, so you need to find a USB cable that'll work and connect over USB at least once to accept the security question, but after you do that once, you can connect over Wi-Fi.
For anyone wondering about 4.2.2, there is a security question that appears on the phone requesting RSA verification with the PC. Be sure your tools are updated AND you allow the PC access by verifying the security question on the devices in question. This fixed it for me.
And as always, verify you have debugging enabled in the developer options ;)
Sometime this may happen because of adb server error (i think). It always saying
Just kill server and start again. It worked for me.