Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ADB device offline, can't issue commands

Try running adb devices after running adb kill-server. Security question pops up after that. Worked for me.


I just got the same problem today after my Nexus 7 and Galaxy Nexus were updated to Android 4.2.2.

The thing that fixed it for me was to upgrade the SDK platform-tools to r16.0.1. For me, this version was not displayed in my SDK Manager, so I pulled it down from http://dl.google.com/android/repository/platform-tools_r16.0.1-windows.zip directly.

You then need to rename the platform-tools directory and unzip it to android-sdk-windows/platform-tools. Using the SDK Manager, I had also updated to the latest sdk-tools before this.

If your whole Eclipse and ADT are ancient, you may need to update them as well, but I didn't need to.

Note: you may need to run SDK Manager twice (once to update itself) before you will see the latest packages.


It also seems to occur frequently when you connect to the device using the Wi-Fi mode (in Android Studio or in the console by running adb tcpip 5555 for example).

To fix:

  1. Disconnect the USB connection—or turn off the device's Wi-Fi if you're connected over Wi-Fi.
  2. Close Android Studio/Eclipse/other IDE.
  3. Run adb kill-server to ensure adb is not running.
  4. Restart your Android device.
  5. After your device restarts, connect it via USB and run adb devices. This should start the ADB daemon. Your device should now be online again.

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

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


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 ;)