Android Studio - Device is connected but 'offline'

Aaron G picture Aaron G · Jun 21, 2015 · Viewed 123k times · Source

This is quite a common question, but none of the solutions appear to work for me. First time asker, so apologies if I get the conventions wrong.

I am trying to connect my Galaxy S5 to my computer running Ubuntu 14.04 so I can do some android development. I have recently downloaded and installed Android Studio and the SDK and my device is detected when it's connected via USB but the device either appears as 'unauthorized' or 'offline'. I know I should be expecting the RSA key prompt but this never appears.

I have tried:

  • Checking debugging was enabled
  • Running adb kill-server and adb devices
  • Restarting (the device, developer options, the machine)
  • Simple unplugging and replugging the USB cable
  • Checking my adb version (it is 1.0.31)
  • Trying different USB ports
  • Revoking USB debugging authorizations
  • Toggling enabling ADB Integration from within Android Studio
  • Connecting as PTP device and MTP device

I have tried it on a separate machine that runs fedora and this works fine with no issues, the promopt appears right away. Therefore I imagine it is not the USB cable that is faulty.

Any ideas?

Answer

Phan Van Linh picture Phan Van Linh · May 16, 2016

Try these:

  • Unplug and replug the USB cable.
  • If it still doesn't work, unplug the USB cable, disable then enable USB debugging in the device settings.
  • If the above two methods fail, reboot the device.
  • If rebooting the device also fails, reboot Android Studio too.
  • If reboot Android Studio still fail, try adb kill-server then adb start-server

Hope this helps.