Skip to main content

Virtual USB CLI: Start the Server

Connect your local machine to the Sauce Labs Data Center where your Real Device Cloud private devices are hosted. You must initiate this command in its own separate command line terminal, since it acts as a continuously running log.

Usage

$ <main class> [OPTIONS] server [OPTIONS]

Options Details

--datacenter

| REQUIRED | ENUM |

Specifies the Sauce Labs data center where your Real Device Cloud private devices are hosted. Valid values are EU, US, US_EAST.

--serverHost

| OPTIONAL | URL ADDRESS |

A specific Virtual USB server host address. The default value, if not specified, is http://127.0.0.1.

--serverPort

| OPTIONAL | STRING |

A specific vUSB server port. The default value, if not specified, is 33657.

--adbPortMin

| OPTIONAL | STRING |

Specifies a vUSB server Android Debug Bridge (ADB) port. Default value: 7000.

--adbPortRange

| OPTIONAL | STRING |

Specifies a vUSB server ADB port range. Default value: 100.

--proxyHost

| OPTIONAL | STRING |

Specifies the HTTP proxy host.

--proxyPort

| OPTIONAL | STRING |

Specifies the HTTP proxy port. Default value: 0.

--proxyUser

| OPTIONAL | STRING |

Specifies the HTTP proxy user.

--proxyPassword

| OPTIONAL | STRING |

Specifies the HTTP proxy password.

--startUsbmuxd

| OPTIONAL | BOOLEAN |

Starts the usbmuxd server. Default value: false.

Examples

Basic Example with Required Flags

Start Server Request
java -jar virtual-usb-client.jar server --datacenter US
Sample Response
19:06:10.060 [main] INFO com.saucelabs.vusb.client.Runner - Runner Version 2.0.0
19:06:11.032 [main] INFO com.saucelabs.vusb.client.server.VirtualUsbServer - Initializing vUSB-Server...
19:06:11.038 [main] INFO com.saucelabs.vusb.client.server.VirtualUsbServer - vUSB-Server initialized
19:06:11.039 [main] INFO com.saucelabs.vusb.client.server.rest.WebServer - Starting Virtual USB server on port 33657.
19:06:11.103 [main] INFO com.saucelabs.vusb.client.server.rest.WebServer - Virtual USB server is up.

Full Example with Optional Flags

java -jar virtual-usb-client.jar server \
--datacenter US \
--adbPortRange 700 \
--adbPortMin 1000 \
--serverHost http://127.0.0.1 \
--serverPort 8080 \
--startUsbmuxd true