virtualUSB CLI commands

These are the commands you can use with the virtualUSB command-line interface (CLI) tool.

Before you start

You’ll need to complete the following:

Locate virtualUSB CLI

Navigate to the installation directory of virtualUSB.

Open a terminal with administrative privileges on Windows, or a terminal on macOS and enter the following command:

cd /Applications/virtualUSB.app/Contents/macOS
bash
  • All subsequent commands assume that the current location is the virtualUSB CLI folder.

  • Replace vusb with ./vusb for MacOS for the subsequent commands.

help

To list all virtualUSB commands, run:

vusb help
shell

To learn more about a specific command, add the command after help:

vusb help <command>
shell

login

To log in to your Kobiton account with your email address and password or Kobiton API key, run:

vusb login
shell

If your organization uses a custom domain for Kobiton, append the following flags to manually set your API and GRPC base URLs:

vusb login --apibaseurl <url> --grpcbaseurl <url> --username <username> --password <password>
shell
Follow this guide on how to fill in the --apibaseurl and --grpcbaseurl values.
Using flags will expose your credentials in the terminal. Do not use this method while sharing your screen or around others.

logout

To log out of your Kobiton account, run:

vusb logout
shell

connect

To connect to a device using the device UDID, run:

vusb connect --udid <device-udid>
shell

The first time you run a vusb connect command on a MacOS machine, ensure it’s run directly on the machine or through a remote session with full UI access to allow virtualUSB to install the daemon. The permission prompt won’t appear if run in an SSH session. This step is only required once.

image:

disconnect

To disconnect from a device using the device UDID, run:

vusb disconnect --udid <device-udid>
shell

status

To check the status of the currently connected device, run:

vusb status
shell

If a device is connected, the device’s JSON data will be displayed in the terminal.

Example
$ vusb status
{
  "servers": [
    {
      "connectionStatus": "Connected", //Host connection status
      "host": "virtualusb.example.com:10002", //URL of the virtualUSB host
      "linkedDevices": [
        {
          "connectionStatus": "Connected", //Connection status of the device
          "id": "0709C8D4-DD63-E500-8832", //ID of the device
          "name": "Galaxy A11", //Name of the device
          "os": "Android", //Operating system of the device
          "osVersion": "12", // OS version of the device
          "statusDescription": "Connected", //Description of the connection status
          "vendorUniqueIdentifier": "R9JN615AACA" //UDID of the device
        },
        {
          "connectionStatus": "Connected",
          "id": "6A2266BE-F655-57A2-349C",
          "name": "Galaxy Tab A",
          "os": "Android",
          "osVersion": "9",
          "statusDescription": "Connected",
          "vendorUniqueIdentifier": "R52N501VDSA"
        }
      ],
      "name": "virtualusb.example.com:10002",
      "statusDescription": "Connected"
    }
  ],
  "version": "4.0.10924.1230.KOB-31816-vucli@1cb4dae" //virtualUSB version
}
shell

export-logs

To export virtualUSB logs, run:

vusb export-logs
shell

By default, the logs will be downloaded to the system’s default download location, and will contain logs from the past day.

Alternatively, use --out to set a new download location and --days to set how many days back the logs should include:

vusb export-logs --out <download-path> --days <days-back>
shell

When export-logs is run, a confirmation message will be displayed in the terminal.

Example
$ vusb export-logs
Please wait
Exported to /Users/Alex/Downloads/vulogs.zip
shell

setup-adb (Windows only)

To install Android dependencies on your Windows computer, run the below command in a terminal with administrator privilege once:

vusb setup-adb
shell

Considerations

See this section for considerations when using virtualUSB CLI.