Please notice this version of Virtual USB has been deprecated. We highly encourage updating to our latest version: Android Virtual USB Changelog
If you're still using version 1.0 - 1.2 we are not able to provide any support or guarantee the functionality of Virtual USB. If you have any question, please get in touch with us!
Versions 1.0-1.2 Only
These instructions are for versions 1.0-1.2 of Virtual USB for real devices. Use this link to get the most recent version: Click Here
- This feature is available only on Private Android devices
- Make sure you're using an ADB version above 1.0.39
Launch and Connect Virtual USB to a Real Device Live Testing Session
You can also find instructions for using the Virtual USB client by running
java -jar client.jar --help.
Download and install the Virtual USB for Live Testing client to the same machine where you have Android Studio installed.
Use this link to download the Virtual USB Client.
Get your User API key from the Account Settings menu in the Sauce Labs Real Device Cloud web interface.
Finding Your Real Device API Key
This is not the same as your project API key, and is specific to your Sauce Labs account.
From a command line, launch the client.
US Data Center
If you are testing on a device in the US data center, you should also include the flags:
- Log in to app.testobject.com and start a Live Testing session on one of the available Android devices.
The project for the session should correspond to the API key you entered in Step 2, which is the account you logged in with.
Open a new command line terminal, and query which sessions are running.
- This command will return a list of open sessions, find the
<sessionId>and copy it.
Use the live testing
<sessionId>to connect the Virtual USB client to the real device in your session:
When Virtual USB connects to your live testing session, it will return a port number for the connection. Copy the port number and use it to connect adb to your session device using Virtual USB.
At this point vUSB is fully connected and you can use Android Studio to debug your app, execute automation that is based on adb, or use any other tool that is adb compliant. For example, using adb shell, you can start the camera of the connected device:
Closing a Virtual USB connection
Make sure you disconnect your device from ADB using
adb disconnect <IPAddress>:<portNumber>
Close your SauceLabs device view in your browser
Unsupported ADB commands
These ADB commands are not supported for use with Sauce Labs Virtual USB.