title: Adb install/uploading of apk taking ages
body: <p>I never had any problem uploading my applications on my devices (Galaxy SPlus and Nexus 10) but for an unknown reason, now uploading an APK on my Nexus 10 take ages... on 20 times I tried, I reached the end only one time.</p>
  
  <p>Did anyone know how I can debug/verbose APK uploading to know at which speed it goes ? I don't know what is the way the APK is uploaded, can someone give me a hint of where to look for ? I want to investigate but I don't know what to do ?</p>
  
  <p>The device is correctly responding to adb commands, I can see it under Eclipse, I can download/upload files with DDMS file explorer, everything is working as usual, but when running/debugging my application, Eclipse get stuck on "Uploading my-application.apk onto device 'R32D1035MCE'".</p>
  
  <p>Could you please help ?</p>
  
  <p>EDIT :</p>
  
  <p>I have reseted my device to factory default, it does no help.</p>
  
  <p>Also, I have enabled traces with ADB_TRACE=all in my environment settings, and the trace show that adb is waiting for something, but I have no clue.</p>
  
  <p>EDIT :</p>
  
  <p>Still investigating, my Nexus 10 was working again, and then suddenly it stopped working. In the DDMS log, I have the following error message :</p>
  
  <pre><code>[2013-06-23 01:09:30 - ddmlib] An established connection was aborted by the software in your host machine
  java.io.IOException: An established connection was aborted by the software in your host machine
      at sun.nio.ch.SocketDispatcher.write0(Native Method)
      at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
      at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:89)
      at sun.nio.ch.IOUtil.write(IOUtil.java:60)
      at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450)
      at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
      at com.android.ddmlib.Client.sendAndConsume(Client.java:607)
      at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
      at com.android.ddmlib.Client.requestAllocationStatus(Client.java:453)
      at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:835)
      at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:803)
      at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:621)
      at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:44)
      at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:580)
  </code></pre>
  
  <p>It looks like related to this problem : <a href="https://stackoverflow.com/questions/5618664/an-established-connection-was-aborted-by-the-software-in-your-host-machine">An established connection was aborted by the software in your host machine</a></p>
  
  <p>But none of the solutions given are working for me.</p>
  
  <p>Is there a way to reset the network connection that adb is doing with the device ?</p>
  
  <p>EDIT : a solution have been found as suggested by chris-stratton, using "adb install -r package.apk", usage of -r command switch that force a re-installation unblocks the device frozen state.</p>