title: Build Android job with connectedInstrumentTest not working on Jenkins
body: <p>I had configured Jenkins build to build gradle project and run tests on it (using connectedInstrumentTest) but build fail several seconds after start.</p>
  
  <h2>Stacktrace:</h2>
  
  <blockquote>
    <p>com.android.ddmlib.InstallException    at
    com.android.ddmlib.Device.installPackage(Device.java:884)     at
    com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:78)
      at
    com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:97)
      at
    com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:40)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)     at
    java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)     at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744) Caused by:
    com.android.ddmlib.TimeoutException   at
    com.android.ddmlib.AdbHelper.read(AdbHelper.java:686)     at
    com.android.ddmlib.SyncService.doPushFile(SyncService.java:695)   at
    com.android.ddmlib.SyncService.pushFile(SyncService.java:380)     at
    com.android.ddmlib.Device.syncPackageToDevice(Device.java:906)    at
    com.android.ddmlib.Device.installPackage(Device.java:875)     ... 9 more</p>
    
    <p>com.android.builder.testing.ConnectedDevice > runTests[sdk - 4.4.2]
    [31mFAILED [0m</p>
    
    <p>com.android.builder.testing.api.DeviceException:
    com.android.ddmlib.InstallException       at
    com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:81)</p>
    
    <p>null com.android.builder.testing.api.DeviceException:
    com.android.ddmlib.InstallException   at
    com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:81)
      at
    com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:97)
      at
    com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:40)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)     at
    java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)     at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744) Caused by:
    com.android.ddmlib.InstallException   at
    com.android.ddmlib.Device.installPackage(Device.java:884)     at
    com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:78)
      ... 8 more Caused by: com.android.ddmlib.TimeoutException   at
    com.android.ddmlib.AdbHelper.read(AdbHelper.java:686)     at
    com.android.ddmlib.SyncService.doPushFile(SyncService.java:695)   at
    com.android.ddmlib.SyncService.pushFile(SyncService.java:380)     at
    com.android.ddmlib.Device.syncPackageToDevice(Device.java:906)    at
    com.android.ddmlib.Device.installPackage(Device.java:875)     ... 9 more
    :MobileShowcaseApp:connectedInstrumentTest FAILED</p>
  </blockquote>
  
  <p>I changed emulator configuration and it helps - it can connect to new created device, but when tests are rerun device exception is throw again (reinstaling SDK, gradle did not work).</p>