Skip to main content

Virtual USB CLI: Disconnect Session

Close a Virtual USB (vUSB) session that you joined originally using the connect command.

Android Only

After disconnecting a session with an Android device, disconnect your device from ADB by running adb disconnect followed by your <IPAddress>:<portNumber>.

Usage

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

Options Details

--sessionId

| REQUIRED | STRING |

The unique identifier of the test session to disconnect. You can retrieve the session ID of an active session using the sessions command.

--serverHost

| OPTIONAL | URL ADDRESS |

A specific vUSB 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.

Examples

Basic Example with Required Flags

Disconnect Request
java -jar virtual-usb-client.jar disconnect --sessionId d03a1b81-158d-4bb4-bcc9-074e43dd8465
Sample Response
07:57:34.700 [main] INFO com.saucelabs.vusb.client.Runner - Runner Version 2.0.0
Disconnected

Full Example with Optional Flags

java -jar virtual-usb-client.jar disconnect \
--sessionId d03a1b81-158d-4bb4-bcc9-074e43dd8465 \
--serverHost http://127.0.0.1 \
--serverPort 33657 \