Virtual USB, Debug your apps on Real Mobile Devices

You are here:
< All Topics
Overview:

A mobile (app) debugging tool called Virtual USB (vUSB) replicates using a USB cable to connect a TestGrid Real Devices Cloud to your personal computer. You can use your preferred in-house development and testing tools to debug because they integrate into your development environment as if the device were directly linked to your workstation.

  1. Build and deploy apps directly from any IDE (e.g., Android Studio or Xcode).
  2. Make the most of your early-stage development.
  3. Use a mix of live and automated testing as it fits your use case.
  4. Monitor device performance metrics such as CPU consumption, device memory, and network data performance (depending on what the IDE or your tools offer).

Note: We supported virtual remote USB solely for debugging your application purposes and did not support it for any automation execution runs or connections.

Prerequisite:
  • A TestGrid account (Log in or sign up for a free trial license)
  • Your TestGrid Username and User token access key
  • For security reasons, you’ll need to have TestGrid Private Devices Cloud enabled as part of your Enterprise/OOn-Prem to use virtual USB. This feature allocates a dedicated pool of TestGrid Real Devices Cloud to your organization only.
  • Windows, macOS, or Linux operating system.
  • Administrative rights to install software on your machine.
  • Have the Java Development Kit (JDK) installed.
  • A mobile native app or web app.
  • If you’re testing an iOS app:
    • macOS or Linux is required (not supported for Windows).
    • Have Xcode installed (macOS only).
  • If you’re testing an Android app:
    • Android Debug Bridge (ADB) version higher than 1.0.39
    • Android Studio 4 or higher.

 

Step 1: Send an email to support@testgrid.io to request access to the RemoteUSB.jar. Once our support team receives the request, you will be given access to download the RemoteUSB.jar file.

 

Step 2: Go to the command prompt on your local machine and launch the below command to establish the connection from your local machine to our Real Device Cloud.

 

$ java -jar RemoteUSB.jar Server --username <username> --password <password> --server https://publicdev.testgrid.io

// or If you have any user tokens, use the below commands:

$ java -jar RemoteUSB.jar Server --userToken <your_token> --server https://publicdev.testgrid.io

 

For Ex:

 

Note: Our virtual USB only supports Java version 20 and above. Please ensure that your local machine meets this requirement.

Determine the user’s token:

a) Go to the Dashboard and then click on the Created “Test Runs Application.”. After that, click on “Test Case Writer” and then click on “Versions.” On the same screen, look for the “i” button in the upper right corner.

 

 

b) Select the “i” button icon, and from there, obtain the user token.

 

 

Step 3: A pop-up appears asking the application executable to accept. Click on Allow.

 

 

 

Once you’ve executed the above command line, it becomes a session data log, running continuously in the background. Do not close it, and keep it separate from terminals.

 

Step 4: Find out the list of devices on the cloud. Run the below command.

 

java -jar RemoteUSB.jar List

 

Step 5: To start a session with a device on the cloud. Run the below command.

 

java -jar RemoteUSB.jar Connect <UDID>

 

 

 

 

Step 6: Upon successful connection, the command prompt appears below.

 

 

Step 7: Upon connecting to XCode, we can see the device is connected, which provides developers with a unified workflow for user interface design, coding, testing, and debugging.

 

 

Step8:  To disconnect the device from the cloud Execute the below command.

 

java -jar RemoteUSB.jar Disconnect <UDID>

 

Once the command has been successfully executed, the prompt will look like this.

 

 

As simple as that! Happy Testing 😇

 

Table of Contents