How to pass the additional emulator arguments in Appium 1.3.4.1

In Windows 7, I have installed the additional emulator Genymotion and I have started the virtual devices manually. It is working fine. I would like to run the emulator through appium, but it fails.

But the emulator is visible in the Appium Launch AVD drop-down box and also in the command prompt.

Here my Launch AVD is: Nexus 5 - 4.4.4 - API 19 - 1080x1920(I have chosen this from the Launch Device Dropdown menu).

Now when I try to run the appium with pre-launch mode, it gives some error like:

Starting Node Server
usage: main.js [-h] [-v] [--shell]
main.js: error: Unrecognized arguments: Nexus 5 - 4.4.4 - API 19 - 1080x1920.
[--localizable-strings-dir LOCALIZABLESTRINGSDIR] [--app APP]
[--ipa IPA] [-U UDID] [-a ADDRESS] [-p PORT]
[-ca CALLBACKADDRESS] [-cp CALLBACKPORT] [-bp BOOTSTRAPPORT]
[-k] [-r BACKENDRETRIES] [--session-override] [--full-reset]
[--no-reset] [-l] [-lt LAUNCHTIMEOUT] [-g LOG]
[--log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}]
[--log-timestamp] [--local-timezone] [--log-no-colors]
[-G WEBHOOK] [--native-instruments-lib]
[--app-pkg ANDROIDPACKAGE] [--app-activity ANDROIDACTIVITY]
[--app-wait-package ANDROIDWAITPACKAGE]
[--app-wait-activity ANDROIDWAITACTIVITY]
[--android-coverage ANDROIDCOVERAGE] [--avd AVD]
[--avd-args AVDARGS]
[--device-ready-timeout ANDROIDDEVICEREADYTIMEOUT] [--safari]
[--device-name DEVICENAME] [--platform-name PLATFORMNAME]
[--platform-version PLATFORMVERSION]
[--automation-name AUTOMATIONNAME] [--browser-name BROWSERNAME]
[--default-device] [--force-iphone] [--force-ipad]
[--language LANGUAGE] [--locale LOCALE]
[--calendar-format CALENDARFORMAT] [--orientation ORIENTATION]
[--tracetemplate AUTOMATIONTRACETEMPLATEPATH] [--show-sim-log]
[--show-ios-log] [--nodeconfig NODECONFIG] [-ra ROBOTADDRESS]
[-rp ROBOTPORT] [--selendroid-port SELENDROIDPORT]
[--chromedriver-port CHROMEDRIVERPORT]
[--chromedriver-executable CHROMEDRIVEREXECUTABLE]
[--use-keystore] [--keystore-path KEYSTOREPATH]
[--keystore-password KEYSTOREPASSWORD] [--key-alias KEYALIAS]
[--key-password KEYPASSWORD] [--show-config] [--no-perms-check]
[--command-timeout DEFAULTCOMMANDTIMEOUT] [--keep-keychains]
[--strict-caps] [--isolate-sim-device] [--tmp TMPDIR]
[--trace-dir TRACEDIR] [--intent-action INTENTACTION]
[--intent-category INTENTCATEGORY] [--intent-flags INTENTFLAGS]
[--intent-args OPTIONALINTENTARGUMENTS]

Node Server Process Ended

Attached the screenshots,

The available devices in command prompt and the AVD name.

Error occurs, when starting the Appium with Pre-launch mode

Even I tried with full “Launch AVD name” and also with the “some_ip:port”. But still it gives the same kind of error.

What kind of parameter/ syntax needs to be given in that Arguments section.

The following code works for the above question.

static String deviceName = "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920";

public static void main(String[] args) throws InterruptedException, ExecuteException, IOException {

    DesiredCapabilities capabilities = new DesiredCapabilities();

    DefaultExecutor executor = new DefaultExecutor();
    DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();

    CommandLine launchEmul = new CommandLine("C:/Program Files/Genymobile/Genymotion/player");
    launchEmul.addArgument("--vm-name");
    launchEmul.addArgument("\""+deviceName+"\"");
    executor.setExitValue(1);
    executor.execute(launchEmul, resultHandler);
    Thread.sleep(40);

    capabilities.setCapability("deviceName","Google Nexus 5 - 4.4.4 API 19 - 1080x1920");   
    capabilities.setCapability("platformVersion", "4.3");
    capabilities.setCapability("platformName", "Android");
    capabilities.setCapability("app","D:/SOFTWARES/Apks/GOA.apk");

    driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
    System.out.println("SetUp is successful and Appium Driver is launched successfully");

}

But still I would like to know, how to make the genymotion emulator to run from the appium server settings.

I don’t have much experience with the windows gui. Gould might try asking here: https://github.com/appium/appium-dot-exe

@0x1mason Thank you!

In the Appium app server (NOT the node server), in Android Settings, in the Launch Device section, there is a box named Arguments. What is the syntax for this box? For instance, I would like to use the -no-boot-anim avd option. When I enter -no-boot-anim or “-no-boot-anim” and then click launch I get an error similar to the one in the original post. Any help?

@jablaze haven’t tried with the Appium application’s arguments field box. I have done by passing those arguments through code.