9

I'm using the maven android plugin to build my projects and deploy them to a device.

Using mvn clean install android:undeploy android:deploy I can successfully deploy to my 2.2 ZTE blade :

[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Successfully uninstalled com.jameselsey.apps from P729J_SBM_ZTE_ZTE-BLADE
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Successfully installed D:\development\james-projects\MyApp\target\myapp-0.5-SNAPSHOT.apk to P729J_SBM_ZTE_ZTE-BLADE

However this doesn't seem to work when I plug in my Samsung GT-I9000 on 2.3.3, this is what I get :

[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Successfully uninstalled com.jameselsey.apps from 333297C93FD200EC_samsung_GT-I9000
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
01:36:59 E/Device: Error during Sync: timeout.

What would be causing the timeout?

j0k
  • 22,600
  • 28
  • 79
  • 90
Jimmy
  • 16,123
  • 39
  • 133
  • 213
  • Please add details about which other non-Maven commands you have tried for doing the same thing. For example 'adb install' etc... and what the outcome was. – Hugo Josefson May 28 '12 at 17:47
  • You need to increase timeout time somehow. This is a typical problem with eclipse as well. – Warpzit Apr 12 '13 at 13:30
  • While I can't tell you why this is happening I can tell you that I had the same issue and that it went away once I commanded adb beforehand to uninstall the app via `adb uninstall com.jameselsey.apps` – avalancha Aug 21 '13 at 06:19
  • Maybe it's because of cable lenght? Is it the same cable for connecting both devices ? Try to connect cable directly to the motherboard port (not to the front panel or usb hub) – Anton-M Aug 28 '13 at 08:51

2 Answers2

1

I faced this problem in eclipse and it was because of ADB connection timeout.

default was 5000 ms and it got fixed after changing that to 10000.

Captain overflow
  • 312
  • 2
  • 11
  • According to this: http://jayway.github.io/maven-android-plugin/deploy-mojo.html that means run it with -Dandroid.adb.connectionTimeout=10000 and if it works add it to your properties. – user988346 Sep 19 '14 at 08:18
0

Actually, the connection timeout mentioned by @Capitain overflow is only for the plugin to first open a socket against the device. After that the installation process has its own timeout (in minutes) which is controlled by an environment variable (as per ddmlib: ADB_INSTALL_TIMEOUT defaults to 4 minutes)

Roberto Andrade
  • 1,793
  • 1
  • 21
  • 27