0

I am trying to get a development environment setup and having some problems with adb. I have eclipse installed and can create android projects and run/debug them in the emulator. But if I attached my device (HTC Evo) and try running on it, adb crashes. My device shows up so adb sees it. Everything is updated to the latest version. I even went and reinstalled my system so I had a clean start. It would still crash when I connect to the device. I restart adb but it just shuts right back down.

Anyone have any suggestions on what I can do to fix this? Running on Windows 7.

EdB
  • 1
  • 1
  • 1

2 Answers2

4

solution for this problem can be found here: http://code.google.com/p/android/issues/detail?id=12141

Frank
  • 136
  • 3
  • although this seems like a nice answer to the question, please : 1) do not copy-paste the link in all your answers, as that can be considered spam, and 2) if you have any affiliation with the website or code you link to, make sure you mention it in your post. – Joris Meys May 09 '11 at 12:04
  • Despite the political aspect of this solution, I have to give it a +1. I have an EVO 3D that would crash when I tried to do anything with Eclipse or launch ddms. The adb.exe included in the posted thread fixed the problem for me. Good find! – Sean Aitken Aug 23 '11 at 16:38
  • Also a good fix for rooted HTC Evo 3d's, as most ROM's allow for more than 64 handles. Thank You. – outkkast Feb 16 '12 at 21:24
0

Here are some questions that will help you diagnose this better:

  1. What version of Android do you have installed? 2.3? do you have the latest drivers installed that you can get from android website?
  2. Are you able to run "adb devices" command and see the handset serial number come up? Where you able to connect and run adb with another device?
  3. Did you try running this scenario with an older version say android 2.2?
  4. Are you using the right data cable? (in case you work with multiple devices from different manufacturers)
  5. And is the handset in USB mode? (something you can set on handset). What is the version of android on handset?
omermuhammed
  • 7,365
  • 4
  • 27
  • 40
  • 1) The Evo has 2.2 on it. I have installed the latest versions of all the drivers I could find. 2) Yes. The Evo shows on the "adb devices" command. The error occurs when I attempt to launch the debugger from Eclipse. 3) The device already has 2.2 on it. Are you referring to the version of something else? 4) The device uses a standard micro usb cable. I can work with the device using standard adb commands. 5) It is in charge only mode as this had worked in the past. Other options are HTC Sync, Disk drive, and USB tethering. Will try those modes too and see what happens. – EdB Jan 01 '11 at 13:59
  • Follow up: After changing the USB mode, I was able to run the debugger on the device. Even in the mode I was having problems with. However, the adb crash will occur if I attempt to run the emulator with the device attached even through I am running the debugger on the emulator. ADB crashes whenever I attempt to run the emulator while the device is attached. ADB reports it is version 1.0.26 – EdB Jan 01 '11 at 14:13
  • [2011-01-01 06:04:58 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host [2011-01-01 06:04:58 - Logcat]An existing connection was forcibly closed by the remote host java.io.IOException: An existing connection was forcibly closed by the remote host at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(Unknown Source) at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.read(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) – EdB Jan 01 '11 at 14:14
  • at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:395) at com.android.ddmlib.Device.executeShellCommand(Device.java:284) at com.android.ddmuilib.logcat.LogPanel$3.run(LogPanel.java:527) [2011-01-01 06:04:59 - DeviceMonitor]Connection attempts: 1 – EdB Jan 01 '11 at 14:14