Device going offline randomly (and appearing multiple times as offline) in Eclipse - fixes?

蹲街弑〆低调 提交于 2019-12-03 00:56:13

I was just tinkering around at home with some development, and started noticing this behavior for the first time. After reading through the suggestions (USB plugs in particular), I got to thinking that the USB cable I had at hand is pretty wimpy looking, so I grabbed the cable I normally use for work (it's a larger diameter, dunno what that means internally), and since then everything has been working fine.

So for anyone landing here with these troubles, you might also check to make sure it isn't the USB cable.

Toggle on/off for 'USB Debugging' in settings worked for me.

My case is...
Nexus-4, Android version. 4.2.2
Because of Security Enhancements in Android 4.2.2, my device was offline.

Android 4.2.2 introduces secure USB debugging which when enabled ensures only host computers authorized by the user can access the internals of a USB connected device using the ADB tool included with the Android SDK.

Update your SDK, accept the RSA key on your phone.

Here is some references.

http://www.infoq.com/news/2013/02/android-4-2-2
http://www.androidcentral.com/semi-pro-tip-android-422-here-your-android-sdk-might-need-updating

Simon Arvidsson

I had a similar problem. I just solved it by plugging in the cable into the usb2 port instead of usb3.

If your platform and platform-tools path is set:

Then from command prompt:

adb kill-server

    adb start-server

It will definitely solve the problem as it restarts the daemon with the specific port

Make sure you don't have HTC Sync or Samsung Kies trying to steal adb connection. If you do, simply stop them when you're debugging.

Try these two things, now everything is working for me:

  1. Install the device's manufacturer USB Drivers.

  2. Replace the data cable you are using.

I get this problem too, sometime it helps to connect it to another USB-port.

This is because of over stack/stack overflow. 1. Switch off and Switch on your Android Device 2. Restart your ADB server(adb -kill server and adb -start sever) 3. Check the mounted SD card and check the USB debug ON

I had this problem for long time and now I found solution that works good for me. In DDMS perspective there is an arrow on devices tab which has 'Reset adb' option. This action resolved my problem.

I have been in this situation a number of times and many of the above solutions usually work. Today none of them worked. Restarted ADB server, toggled USB debugging off and on, tried a different cable and port, re-installed driver, restarted computer. Experienced the same problem on other computers. No luck...

Solution for me: Restarted the android device.

I just solved the problem by rebooting my Android phone. Hope it works for you.

Some of the above suggestions would help sometimes but not consistently. Like many, I've suspected the USB cables but in the end I've decided that it was the USB jack on my Android device simply wearing out from so much use. I guess they're only meant to be plugged in once or twice a day to charge, and not 10 times a day 5 days a week doing development. In this case a new cable may help but there may be no good solution short of a new device.

I also searched high and low for a solution to this problem. The description of my problem when getting ready to compile and run my project over adb/USB:

  • I would 'Run' or Cntrl-F11, for the Android Device Chooser window to pop-up
  • plug in my Samsung Galaxy Nexus
  • the state would show Offline then Online (for varying lengths of time) then Offline again
  • my workaround has been to click fast during the window where it shows Online

I tried reinstalling different drivers suggested by various sources, and even tried 5 different USB cables. But in the end, what fixed it was plugging the USB cable into one of the free USB sockets in the back panel of my PC, instead of the front where it's more accessible.

However, peculiarly this problem only happens with my Samsung Galaxy Nexus (which is rooted and currently running Codename Android ROM) and not with my HTC Nexus One (running CyanogenMod). My N1 would always stay online even if plugged into the front USB panel.

So now I'm still running the ADB drivers that come with the Android SDK, my PC is self-built (running Asus P5Q Pro motherboard <- a likely culprit here), and my OS is Win7 64-bit. And both my phones are staying Online connected to adb.

Thus I suggest those with similar problems to try different cables and USB ports.

same problem with galaxy s2 / windows 7 / eclipse juno switch off usb debugging helps, somtimes also killing and restarting adb seams to be

Chihiro Saito

I had a similar disconnect issue in which the connection gets lost soon after a reboot. On my LG VS840 4G phone, changing the USB connection mode from Mass Storage to Internet Connection helped. Apps Key > Settings > Connectivity > Default connection mode > Internet Connection.

Changing the usb port worked out for me, also check if you are using usb hubs for connecting the devices. front usb port and back usb ports also make a difference. preferably use back usb port.

In my case the issue with offline mode was the phone being plugged in a USB 3.0 port/USB hub. As soon as I moved it to a USB 2.0 port it worked with no issues.

2016 and this problem is still happenning , using Lenovo device android 4.4.2. The majority of proposed solution work 'sometimes'.

Still there is no explanation for this.

What worked for me was installing the Wifi ADB (app) and it even liberated me from usb cable limitations.BTW the device does not appear in android device monitor but appears upon running app Shift+f10.

Not sure if anyone will find this answer valuable, but I had a similar situation, where my device was online, and then randomly went offline. I tried things like checking the cable, adb kill-server, and so on. What finally worked for me was restarting my computer and my phone. I feel like this will only be applicable if you find that your device is suddenly offline, when it was working fine before.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!