Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
514 views
in Technique[技术] by (71.8m points)

adb - Android Studio - Device is connected but 'offline'

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...