Error during Sync: timeout when deploying apk to device using maven
Asked Answered
N

2

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?

Nickelous answered 23/5, 2012 at 12:48 Comment(4)
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.Tittup
You need to increase timeout time somehow. This is a typical problem with eclipse as well.Volvox
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.appsToyatoyama
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)Eduardo
L
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.

Leiker answered 4/9, 2013 at 6:50 Comment(1)
According to this: 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.Truckle
D
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)

Dympha answered 14/2, 2015 at 1:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.