Exception Error on starting selendroid server; on executing shell cmd: android.bat list avds

1,830 views
Skip to first unread message

BHAWANI PRASAD

unread,
Mar 27, 2014, 3:00:05 AM3/27/14
to selen...@googlegroups.com
Hello ,
I am getting the exception error on starting selendroid server (selendroid-standalone-0.9.0-with-dependencies ). This happens with earliar versions as well.
I have configured ANDROID_HOME and JAVA_HOME.
Kindly advise.........

Logs are below:::
==========================

C:\Users\bhawani.prasad\Downloads>java -jar selendroid-standalone-0.9.0-SNAPSHOT-with-dependencies.jar
Mar 27, 2014 11:58:12 AM io.selendroid.SelendroidLauncher main
INFO: ################# Selendroid #################
Mar 27, 2014 11:58:12 AM io.selendroid.SelendroidLauncher lauchServer
INFO: Starting selendroid-server port 4444
Mar 27, 2014 11:58:12 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Android\android-sdk\build-tools\18.1.0\aapt.exe remove C:\Users\BHAWAN~1.PRA\AppD
a\Local\Temp\android-driver5568577462331974947.apk META-INF/MANIFEST.MF
Mar 27, 2014 11:58:12 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Android\android-sdk\build-tools\18.1.0\aapt.exe remove C:\Users\BHAWAN~1.PRA\AppD
a\Local\Temp\android-driver5568577462331974947.apk META-INF/CERT.RSA
Mar 27, 2014 11:58:12 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Android\android-sdk\build-tools\18.1.0\aapt.exe remove C:\Users\BHAWAN~1.PRA\AppD
a\Local\Temp\android-driver5568577462331974947.apk META-INF/CERT.SF
Mar 27, 2014 11:58:12 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Android\android-sdk\build-tools\18.1.0\aapt.exe remove C:\Users\BHAWAN~1.PRA\AppD
a\Local\Temp\android-driver5568577462331974947.apk META-INF/ANDROIDD.SF
Mar 27, 2014 11:58:12 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Android\android-sdk\build-tools\18.1.0\aapt.exe remove C:\Users\BHAWAN~1.PRA\AppD
a\Local\Temp\android-driver5568577462331974947.apk META-INF/ANDROIDD.RSA
Mar 27, 2014 11:58:12 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Java\jdk1.7.0_51\bin\jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar
\Users\BHAWAN~1.PRA\AppData\Local\Temp\resigned-android-driver5568577462331974947.apk -storepass android -keystore C:\Users
hawani.prasad\.android\debug.keystore C:\Users\BHAWAN~1.PRA\AppData\Local\Temp\android-driver5568577462331974947.apk androi
ebugkey
Mar 27, 2014 11:58:14 AM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: App signing output: jar signed.

Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate thi
jar after the signer certificate's expiration date (2041-04-21) or after any future revocation date.

Mar 27, 2014 11:58:14 AM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: The app has been signed: C:\Users\BHAWAN~1.PRA\AppData\Local\Temp\resigned-android-driver5568577462331974947.apk
Mar 27, 2014 11:58:16 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Android\android-sdk\tools\android.bat list avds
Mar 27, 2014 11:58:50 AM io.selendroid.SelendroidLauncher lauchServer
SEVERE: Error occurred while building server: io.selendroid.exceptions.ShellCommandException: An error occured while execut
g shell command: C:\Program Files\Android\android-sdk\tools\android.bat list avds
io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while exe
ting shell command: C:\Program Files\Android\android-sdk\tools\android.bat list avds
        at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:113)
        at io.selendroid.server.model.DeviceStore.initAndroidDevices(DeviceStore.java:112)
        at io.selendroid.server.model.SelendroidStandaloneDriver.initAndroidDevices(SelendroidStandaloneDriver.java:164)
        at io.selendroid.server.model.SelendroidStandaloneDriver.<init>(SelendroidStandaloneDriver.java:83)
        at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:91)
        at io.selendroid.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:65)
        at io.selendroid.SelendroidLauncher.lauchServer(SelendroidLauncher.java:67)
        at io.selendroid.SelendroidLauncher.main(SelendroidLauncher.java:114)
Caused by: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\Program Files
ndroid\android-sdk\tools\android.bat list avds
        at io.selendroid.io.ShellCommand.exec(ShellCommand.java:53)
        at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:111)
        ... 7 more
Caused by: io.selendroid.exceptions.ShellCommandException:
        ... 9 more
Exception in thread "main" java.lang.RuntimeException: io.selendroid.exceptions.AndroidDeviceException: io.selendroid.excep
ons.ShellCommandException: An error occured while executing shell command: C:\Program Files\Android\android-sdk\tools\andro
.bat list avds
        at com.google.common.base.Throwables.propagate(Throwables.java:160)
        at io.selendroid.SelendroidLauncher.lauchServer(SelendroidLauncher.java:77)
        at io.selendroid.SelendroidLauncher.main(SelendroidLauncher.java:114)
Caused by: io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occure
while executing shell command: C:\Program Files\Android\android-sdk\tools\android.bat list avds
        at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:113)
        at io.selendroid.server.model.DeviceStore.initAndroidDevices(DeviceStore.java:112)
        at io.selendroid.server.model.SelendroidStandaloneDriver.initAndroidDevices(SelendroidStandaloneDriver.java:164)
        at io.selendroid.server.model.SelendroidStandaloneDriver.<init>(SelendroidStandaloneDriver.java:83)
        at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:91)
        at io.selendroid.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:65)
        at io.selendroid.SelendroidLauncher.lauchServer(SelendroidLauncher.java:67)
        ... 1 more
Caused by: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\Program Files
ndroid\android-sdk\tools\android.bat list avds
        at io.selendroid.io.ShellCommand.exec(ShellCommand.java:53)
        at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:111)
        ... 7 more
Caused by: io.selendroid.exceptions.ShellCommandException:
        ... 9 more


sai krishna

unread,
Mar 28, 2014, 2:55:06 AM3/28/14
to selen...@googlegroups.com
After setting Java_HOME and ANDROID_HOME, create a avd with the api level 19 and try starting server again.


Thanks
Saikrishna

BHAWANI PRASAD

unread,
Mar 28, 2014, 3:49:08 AM3/28/14
to selen...@googlegroups.com
Hi Sai Krishna,
Thanks for the reply, But I am still getting the same error.

But when execute the android.bat from cmd line it works fine.
===========
C:\Program Files\Android\android-sdk\tools>android.bat list avds
Available Android Virtual Devices:
    Name: AVD1
  Device: Nexus One (Google)
    Path: C:\Users\bhawani.prasad\.android\avd\AVD1.avd
  Target: Android 4.1.2 (API level 16)
 Tag/ABI: default/armeabi-v7a
    Skin: 480x800
  Sdcard: 100M
---------
    Name: AVD_19
  Device: Nexus 5 (Google)
    Path: C:\Users\bhawani.prasad\.android\avd\AVD_19.avd
  Target: Android 4.4.2 (API level 19)
 Tag/ABI: default/armeabi-v7a
    Skin: 1080x1920
  Sdcard: 200M

Regards,
Bhawani Prasad

BHAWANI PRASAD

unread,
Apr 1, 2014, 4:37:05 AM4/1/14
to selen...@googlegroups.com
Hi,
Any suggestions/advise as I am still facing this issue....


Regards,
Bhawani


On Thursday, 27 March 2014 12:30:05 UTC+5:30, BHAWANI PRASAD wrote:

sai krishna

unread,
Apr 1, 2014, 5:54:14 AM4/1/14
to selen...@googlegroups.com
Hi 

Looks like your Andriod_Home is not set correctly.

BHAWANI PRASAD

unread,
Apr 1, 2014, 8:09:22 AM4/1/14
to selen...@googlegroups.com
But I am able to retrieve "android.bat list avds" from android\tools cmd prompt..but it takes more time

Eric Edberg

unread,
Apr 3, 2014, 2:52:50 PM4/3/14
to selen...@googlegroups.com

Seledroid Exception:     android.bat lilst avds

I too am experiencing the avd exception problem and after 1+ days of farting around can't resolve this issue.  Like others, I'm new to Selendroid.  I've validate both JAVA_HOME, ANDROID_HOME, and added ah/tools and ah/platform-tools to the global system PATH and ENV.
  • Anybody have an update on this issue?

here is my configuration:

  • Windows ADK Bundle
  • selendroid-test-app-0.9.0.apk
  • I do not have any AVDs created or started
  • i do have 1 Galaxy Nexus mobile connected which is successfully identified
  • Test script provided by DominikDar

When I execute java on the CLI, I obtain a similar error as when executing from Eclipse ADK Bundle

java -jar selendroid-standalone-0.9.0-with-dependencies.jar -port 4444
or
java -jar selendroid-standalone-0.9.0-with-dependencies.jar -app selendroid-test-app-0.9.0.apk

Similar to the other poster, when I execute android.bat list avds, on the cli it completes successfully

C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds

after 40 seconds as mentioned in other posts

Available Android Virtual Devices:

<nothing returns since I wish to test using a real mobile>

Here is the script I'm trying to validate with as an initial set...
This script was executes as-is w/minor path mod

/*
 * Copyright 2012-2014 eBay Software Foundation and selendroid committers.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
import io.selendroid.SelendroidCapabilities;
import io.selendroid.SelendroidConfiguration;
import io.selendroid.SelendroidDriver;
import io.selendroid.SelendroidLauncher;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class SelendroidIntegrationTest {
  private static SelendroidLauncher selendroidServer = null;
  private static WebDriver driver = null;

  @Test
  public void testShouldBeAbleToEnterText() {
    WebElement inputField = driver.findElement(By.id("my_text_field"));
    inputField.sendKeys("Selendroid");
    Assert.assertEquals("Selendroid", inputField.getText());
  }

  @BeforeClass
  public static void startSelendroidServer() throws Exception {
    if (selendroidServer != null) {
      selendroidServer.stopSelendroid();
    }
    SelendroidConfiguration config = new SelendroidConfiguration();
    config.addSupportedApp("src/selendroid-test-app-0.9.0.apk");
    selendroidServer = new SelendroidLauncher(config);
    selendroidServer.lauchSelendroid();

    SelendroidCapabilities caps =
        new SelendroidCapabilities("io.selendroid.testapp:0.9.0");

    driver = new SelendroidDriver(caps);
  }

  @AfterClass
  public static void stopSelendroidServer() {
    if (driver != null) {
      driver.quit();
    }
    if (selendroidServer != null) {
      selendroidServer.stopSelendroid();
    }
  }

}



here is the error displayed by the Eclipse SDK Bundle:

Apr 03, 2014 1:37:09 PM io.selendroid.SelendroidLauncher lauchServer


INFO: Starting selendroid-server port 4444

Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/MANIFEST.MF
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/CERT.RSA
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/CERT.SF
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/ANDROIDD.SF
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/ANDROIDD.RSA
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Java\jdk1.7.0_51\bin\jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar C:\ADKB\workspace\CMDS WebTest\src\resigned-selendroid-test-app-0.9.0.apk -storepass android -keystore C:\Users\ele\.android\debug.keystore C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk androiddebugkey
Apr 03, 2014 1:37:11 PM io.selendroid.builder.SelendroidServerBuilder signTestServer


INFO: App signing output: jar signed.

Warning:

No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2041-08-15) or after any future revocation date.

Apr 03, 2014 1:37:11 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: The app has been signed: C:\ADKB\workspace\CMDS WebTest\src\resigned-selendroid-test-app-0.9.0.apk
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe dump badging C:\ADKB\workspace\CMDS WebTest\src\resigned-selendroid-test-app-0.9.0.apk
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe dump badging C:\ADKB\workspace\CMDS WebTest\src\resigned-selendroid-test-app-0.9.0.apk
Apr 03, 2014 1:37:11 PM io.selendroid.server.model.SelendroidStandaloneDriver initApplicationsUnderTest
INFO: App io.selendroid.testapp:0.9.0 has been added to selendroid standalone server.
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/MANIFEST.MF
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/CERT.RSA
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/CERT.SF
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/ANDROIDD.SF
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/ANDROIDD.RSA
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Java\jdk1.7.0_51\bin\jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar C:\Users\ele\AppData\Local\Temp\resigned-android-driver9070064163513721178.apk -storepass android -keystore C:\Users\ele\.android\debug.keystore C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk androiddebugkey
Apr 03, 2014 1:37:12 PM io.selendroid.builder.SelendroidServerBuilder signTestServer


INFO: App signing output: jar signed.

Warning:

No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2041-08-15) or after any future revocation date.

Apr 03, 2014 1:37:12 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: The app has been signed: C:\Users\ele\AppData\Local\Temp\resigned-android-driver9070064163513721178.apk
Apr 03, 2014 1:37:12 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=0146B0651001E009, model=null, targetVersion=null]
Apr 03, 2014 1:37:12 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=0146B0651001E009, model=Galaxy Nexus, targetVersion=ANDROID17]
Apr 03, 2014 1:37:12 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=0146B0651001E009, model=Galaxy Nexus, targetVersion=ANDROID17]
Apr 03, 2014 1:37:12 PM io.selendroid.android.impl.DefaultDeviceManager initializeAdbConnection
INFO: my devices: null
Apr 03, 2014 1:37:12 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
Apr 03, 2014 1:37:35 PM io.selendroid.SelendroidLauncher lauchServer
SEVERE: Error occurred while building server: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
    at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:113)
    at io.selendroid.server.model.DeviceStore.initAndroidDevices(DeviceStore.java:110)
    at io.selendroid.server.model.SelendroidStandaloneDriver.initAndroidDevices(SelendroidStandaloneDriver.java:162)


    at io.selendroid.server.model.SelendroidStandaloneDriver.<init>(SelendroidStandaloneDriver.java:83)
    at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:91)
    at io.selendroid.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:65)
    at io.selendroid.SelendroidLauncher.lauchServer(SelendroidLauncher.java:67)

    at io.selendroid.SelendroidLauncher.lauchSelendroid(SelendroidLauncher.java:90)
    at SelendroidIntegrationTest.startSelendroidServer(SelendroidIntegrationTest.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds


    at io.selendroid.io.ShellCommand.exec(ShellCommand.java:53)
    at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:111)

    ... 24 more
Caused by: io.selendroid.exceptions.ShellCommandException:
    ... 26 more


Amit Kumar Garg

unread,
Apr 3, 2014, 5:07:50 PM4/3/14
to
I was facing similar issues and could not get it working with an emulator on windows. I tried with an actual device (HTC ONE) and connected it through an USB cable and it started working for me. I haven;t spent a lot of time on this but could get it working with the actual device.

Dominik Dary

unread,
Apr 4, 2014, 1:45:03 AM4/4/14
to selen...@googlegroups.com
Hi Eric,

if you execute manually: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds

What is the result you get?

On my windows machine I deleted all emulators and even if no hardware device is connected, the selendroid-standalone gets started properly.

Eric Edberg

unread,
Apr 4, 2014, 1:19:25 PM4/4/14
to selen...@googlegroups.com

Dominik,

I had included that test in my original post and through I responded earlier in the day.  May be is was a directed email to you?
I'm reposting to the group...

In this example I did not have any AVDs running.
When I manually started an AVD and then executed the command it correctly listed it.
I don't have a screen shot of this test handy.

Similar to the other poster, when I execute android.bat list avds, on the cli it completes successfully

C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds

after 40 seconds as mentioned in other posts

Available Android Virtual Devices:

<nothing returns since I wish to test using a real mobile>

Similar to another post about this exact issue, when executing the JAR from the cli, it times out after 20 seconds or so.  In this post someone suggested editing the JAR and changing the timeout in one of the io.xx.yy modules to 50000 (ms) which made it work.  I'm not capable of doing this quite yet... 

I've just rebooted (again) and will try again from scratch...

Eric L. Edberg

Eric L. Edberg

unread,
Apr 4, 2014, 4:16:48 PM4/4/14
to selen...@googlegroups.com


Partial Solution / Work-Around (GAK)

After working 2 days to resolve the "android list avds" problem I became frustrated.
If the damn program does not work then just comment it out!
  • I updated tools\android.bat and placed a "goto Myend" at the start of the file and appended a ":MyEnd" at the end of the file
  • This essentially executed the .bat script but did nothing

When I executed the example program started and actually started using this test apk.

java -jar selendroid-standalone-0.9.0-with-dependencies.jar -app selendroid-test-app-0.9.0.apk

My next test will be to try to execute a Selenium script that operates the android browser which is my real goal.

  • If anybody has a very short test script for Selenium and Selendriod I'd appreciate a URL pointer.
  • I can successfully start the legacy AndroidDriver() which is depricated and control the browser, but it looses communications with the device periodically.  This would actual work for me if I could debug the timeout issues... 

I'm still interested in debugging.   The actual problem probably lies in the JAR that's executed in the .bat from the tmp directory.  I may try to debug that given time.... 

Eric Edberg

Reply all
Reply to author
Forward
Message has been deleted
0 new messages