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:
-
Set up virtualUSB on your personal computer.
-
Configure your personal computer (Standalone/On-Prem with self-signed SSL certificate only).
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:
-
MacOS
-
Windows
cd /Applications/virtualUSB.app/Contents/macOS
cd "C:\Program Files\virtualUSB"
-
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
To learn more about a specific command, add the command after help
:
vusb help <command>
login
To log in to your Kobiton account with your email address and password or Kobiton API key, run:
vusb login
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>
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. |
connect
To connect to a device using the device UDID, run:
vusb connect --udid <device-udid>
The first time you run a image: |
disconnect
To disconnect from a device using the device UDID, run:
vusb disconnect --udid <device-udid>
status
To check the status of the currently connected device, run:
vusb status
If a device is connected, the device’s JSON data will be displayed in the terminal.
$ 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
}
export-logs
To export virtualUSB logs, run:
vusb export-logs
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>
When export-logs
is run, a confirmation message will be displayed in the terminal.
$ vusb export-logs
Please wait
Exported to /Users/Alex/Downloads/vulogs.zip
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
Considerations
See this section for considerations when using virtualUSB CLI.