After connecting my device to my real device (Galaxy S / Android 2.3.3) and lauching the DDMS Heap tab, sometimes the device disconnects and is no longer available as vaild Android target for the Android Device Chooser dialog. Un- and re-plugging the USB cable have no effect, killing the adb server process or shut down eclipse does not either. As my last resort I've to reboot the device and re-connect USB, this seems to work but this approach has a lot wrinkles, if you know what i mean.
Is there a better solution available?!
Thank you!
There is nothing you can do about it. It's a known issue with all Android Phones based on the OMAP chipset.
It's not that the chipset is bad in any way, but it is fact that the USB-OTG device driver from OMAP is buggy. The driver works well until you stress it hard enough. Lots of logcat outputs cause this, as well as ADB debugging.
Disabling and re-enabling the usb-debug fixes the problem for a while. You can even see the USB-driver failing on the kernel-log by calling 'dmesg' on the shell.
As far as I know all OMAP3 and OMAP4 based devices suffer from this driver-bug.
Related
Constant issue with being able to connect an Android device via USB to Android Studio running on a Mac.
Tried numerous things like:
Switching USB debugging mode on Android to MTP or PTP
Restarting the Android devices and Android Studio and/or Mac
trying adb kill-serverand then adb devices, which usually resulted in:
List of devices attached
daemon not running. starting it now on port 5037
adb E 655 23135 usb_osx.cpp:327] Could not open interface: e00002c5
adb E 655 23135 usb_osx.cpp:289] Could not find device interface
daemon started successfully
But not actually finding the connected device.
I just wanted to write it down in case someone else comes across this issue.
It took me more than a couple of days to solve this while I was banging my head trying to understand what seems to be the problem.
Note: For me it was a cable issue.
I have Nexus6P with 2 original cables:
Type-C to Type-C
Short Type-C to regular USB
The problem was I was trying to hook the cable 1 directly from the Nexus to the Mac Pro (which didn't work since I think the Mac has a thunderbolt protocol on the Type-C inputs)
Then I tried a Type-C to regular USB cable with an adapter from to make it Type-C to Type-C (bear in mind this wasn't the original cable I got with my phone)
Only when I used the original short cable (cable 2) with an adapter it worked.
Although the non-original cable I used was a high-end cable - it still didn't work
Hope it helps other people who struggle with this
There are some great responses that worked for others, like this one or this one which seemed to work for others.
In my case, the issue was Tizen Studio (I was working on a watch app for Samsung Gear). Through this poster's research, found that the adb error could not open interface: e00002c5 implies that the usb device is already in use by some other driver.
So it seems Tizen Studio takes up the usb driver resource even though it is not using it. Quitting the application will automatically allow adb devices to list your device and run the project on it.
Hope this helps other lost souls.
if Xcode runs please turn it off
then everything worked again
When I plug my phone into my computer with USB Debugging enabled, literally nothing happens. The computer does not even detect a device has been plugged in and the phone does not show the charging LED.
When USB Debugging is turned off, without disconnecting my phone my computer detects it.
I think there's an issue with ADB on the phone as the error occurred after trying to patch ADBD using Chainfire's ADBD insecure.
So long without a reasonable answer?
Vivo Y55A, but your solution is probably similar, because this is a pretty generic issue. With platform-tools installed, using "adb devices" I saw nothing attached. Developer Options was of course activated (via tapping Build Number 8 times), and USB Debugging was set to "on." Below those options are "USB Debugging Mode" which I had forgotten to set to MTP (it was on Picture Mode or something). Still no device.
I changed the USB cable and that solved the problem. Aside from being faulty, some cables may have only the power connectors wired, and the serial lines may not have any connection. Do try at least a couple of other cables, as well as a couple of other USB ports (sometimes the driver pointing to a particular port may be faulty).
USB debugging can sometimes be hectic. I've faced similar issues without any reasons. The best thing you can do is, root your phone using any popular rooting software and then download WIFI ADB. Its pretty simple and decent to use.
When I run adb devices there are no devices showing as connected. My device is a LG Optimus Exceed 2 running 4.4.2
There are many of these posts around, so here's what I've done:
I'm using the cord that came with the phone. It charges and tries to sync photos, so it isn't an issue here. Switching usb ports and trying a powered usb hub doesn't affect it either.
I've added the vendor id (0x1004) to ~/.android/adb_usb.ini
Restarted and unplugged any combination of things you can think of
USB Debugging is on. And has been restarted. Same with Unknown sources.
I have never used EasyTether, nor is it installed anywhere on my computer.
Updated adb, updated my sdk.
Restarted adb server
Tried installing LG's drivers: http://www.lg.com/us/support-mobile/lg-VS450PP (They say they don't support Mac S/W upgrade, yet they have a package to install. No help there)
I have a Nexus S running 4.1 that works, and an old LG phone running Gingerbread that connect.
Any wizards out there who've already struggled with this who have advice?
I tried all of the connection types (charge, MTP, PTP) but perhaps not "Internet Connnection, modem"? You can change it by pulling down the system-wide drop down menu and touching "USB connection".
This is how I fixed it, but I thought I'd tried this already, so I can't guarantee it wasn't this in conjunction with one of the things done above.
PTP seemed to do the trick. Never had to do that on any other device...
I had the exact same problem. Selectin Internet Connection and then Ethernet as the USB connection type fixed it and everything is working as expected now.
I know this sounds like a stupid answer, but the same thing happened to me. It turns out the micro USB cord was just bad - which is weird, because it still charged the phone perfectly fine. After testing the bad cable unsuccessfully on a phone that had been recognized on my mac before, I switched to a different micro USB cable, and that made all the difference.
This is late in the game but I had an additional step to all the other suggestions. The phone was showing up in the System Profiler after I switched the usb mode to 'MTP' mode, but I didn't see any usb tethering options. After adding the phone's vendor ID to the usb ini file, enabling the developer and usb debugging, killing and restarting adb, I still didn't see my device in adb devices.
I finally had to download the Mac driver for the phone directly from LG.com. After installing and rebooting on the computer, the device showed up in adb devices.
So I've read nearly every stack overflow answer about this issue, but still no solution. My device keeps getting disconnected. I've switched through 12 wires, I've tried every USB port; nothing. Eclipse keeps dropping the connection. It happens most often when I enter debug mode. Has anyone found a solution to this? Is this a bug in the new update? Seriously, this makes debugging and testing so painful. It slows down my testing by at least 3 times. There has to be a better solution.
First thing I tend to try is the following commands in cmd/terminal
adb kill-server
adb start-server
And lastly,
adb devices
To check the device is connected.
Following that I'd try restarting the device, and perhaps as a last resort uninstall/reinstall it's drivers.
Edit: also, do you have access to another device? In the past I've had issues with specific devices constantly dropping out.
I experience that when my nexus7 2012 kept disconnecting; root cause was the USB3 connection.
Changing to a USB2 port fixed my issues; can you try switching to a lower speed port?
I was having a very similar problem but using Android Studio on OS X. By default Android Studio points to an SDK inside it's application bundle so I changed the SDK location setting to point to another version of the Android SDK I had downloaded manually and this seems to have fixed the disconnection issues I was having.
Instructions for changing the SDK location setting can be found in this answer.
My connected device (an Acer) was working a treat until I rebooted my mac. After the reboot, Eclipse dropped the connection every single time I ran the app. I tried two cables and every port in my iMac but nothing worked. I had to disconnect and reconnect the device for every run (a real pain when debugging!).
What worked for me was to run the app. When the window appeared to choose the device to run on (which was empty), I disconnected then reconnected the device, but before clicking to run, I checked the box (bottom left) to use this device for each run. It now runs every time directly on the device.
a unpowered usb hub did fix the problem for me. it was happening on both my samsung s6 and my sony z5 premium.and both on my pc and my mac. (using android studio).
Use short usb cable. The shorter the length of cable, the more stable the adb connection. I had the same problem for long time. I changed the cable to shorter one and I haven't got that problem anymore.
While debugging, my device frequently disconnects from my PC, usually after every debug session. The device still appears in the DDMS list but the status is "offline". The only way to fix it is to reconnect the USB cord, which becomes a pain after doing it 10 times every hour. There are no visible error messages when it happens.
I thought it was a physical connectivity problem with my USB cord or my device, but I recently upgraded to a brand-new Galaxy Nexus with a brand-new USB cord and it still happens. Now I'm convinced it's a software issue.
Is there any reason why my devices goes offline frequently? Are there any programs that are known to interfere with the Android/ADB connection?
Yup, you are right. It seems to be a software issue.I have faced this annoying thing many times, it happens now and then. I think what happens is that the adb's connection with the device/emulator breaks or becomes faulty, so android starts showing the device as offline. To correct this problem. Go to DDMS-->Devices Tab-->Click the option "Reset adb" (which is the last option, on clicking the dropdown arrow) . You will then see some error report in the console, but after a minute your emulator would be ready to be used without problems. I do it all the time and it works. Try this instead of manually plugging/unplugging the device.
Please check this answer https://stackoverflow.com/a/26425489/1200583 that is for mac but maybe is the same for other OSs
I find it faster to just plug/unplug, but doing the following in command-line should do the same thing:
adb kill-server
adb start-server
We feel your pain. In case you're using the command-line, you can do the same thing by typing "adb kill-server".
I was able to fix this problem for good by updating Samsung Kies, which installed an updated driver for my phone. I suggest you try reinstalling any device drivers.
Patiently, try fixing the USB cord by massaging it and reconnect it to the USB hub securly but not to tight. Also, do not connect with too many USB extended cables or hub or the connection between the device and Eclipse IDE will interfere the duration.
And one thing, do tried putting your device and the USB cord to any flat surface (e.g. table) to support the long cable?
I had the same problem with Galaxy Nexus running CM 10.1.
Updating KIES with latest version seems to have fixed the issue.
Connect your device through a powered USB hub. Some machines, including new apple macbooks, do not have enough power in the USB ports causing ADB to constantly disconnect.
If your device is rooted, you can connect it to adb via wifi. This is very comfortable, much more than wired USB. Of course you don't always have a rooted device.
I also faced this issue. Adb disconnect my Android device each time just after installing the app in android device from eclipse. The issue was with my USB Cable. I was using the USB cable of Blackberry Phone. To resolve this issue i just changed the USB Cable with Android's USB cable(The cable that comes with new Android Phone) and every thing started working fine.
If you are running on Mac OS Sierra and Android Studio 2.1.2 or 2.2.0 then just upgrade your SDK-Platform Tools to 24.0.4 and Restart Android Studio. This will fix it.
The following two solutions worked for me.
You can try either of the two or both of them.
Restart device.
Free some internal storage space (Works in most of the cases).