{"id":23235777,"url":"https://github.com/billmeyer/virtual-usb-scripts","last_synced_at":"2025-08-02T17:10:19.627Z","repository":{"id":89566499,"uuid":"288732798","full_name":"billmeyer/virtual-usb-scripts","owner":"billmeyer","description":null,"archived":false,"fork":false,"pushed_at":"2020-08-19T13:11:42.000Z","size":8758,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T12:06:01.833Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/billmeyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-19T12:59:48.000Z","updated_at":"2020-08-19T13:11:44.000Z","dependencies_parsed_at":"2023-06-29T03:00:58.909Z","dependency_job_id":null,"html_url":"https://github.com/billmeyer/virtual-usb-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/billmeyer/virtual-usb-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fvirtual-usb-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fvirtual-usb-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fvirtual-usb-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fvirtual-usb-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/billmeyer","download_url":"https://codeload.github.com/billmeyer/virtual-usb-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fvirtual-usb-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268424027,"owners_count":24248118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T03:29:31.059Z","updated_at":"2025-08-02T17:10:19.598Z","avatar_url":"https://github.com/billmeyer.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual USB for Android - CLI Start\n\nThe offical documentation for Virtual USB can be found on the Sauce Labs Wiki at [https://wiki.saucelabs.com/display/DOCS/Testing+with+Virtual+USB+on+Real+Devices]().\n\n## Setup\n\nThese scripts expect that environment variables are set for __TESTOBJECT_USER_API_KEY__.\n\nThe value for __TESTOBJECT_USER_API_KEY__ can be found by signing into [https://app.saucelabs.com]() and navigating to __SAUCE APPS__ \u0026rarr; __Legacy RDC__ \u0026rarr; click on the \"head\" located in the upper right corner \u0026rarr; __Account Settings__.\n\nThe value in the __User API Key__ field is what you want to set as your __TESTOBJECT_USER_API_KEY__ environment variable.\n\n## Start the Virtual USB server\n\nFrom a terminal window, the actual command to start the server is:\n\n    java -jar vusb-client.jar server --datacenter US\n\nThe `vusb-server.sh` script does the same thing:\n\n    ./vusb-server.sh\n    07:34:33.167 [main] INFO com.saucelabs.vusb.client.Runner - Runner Version 1.8.0\n    07:34:33.389 [main] INFO com.saucelabs.vusb.client.server.VirtualUsbServer - Initializing vUSB-Server...\n    07:34:33.392 [main] INFO com.saucelabs.vusb.client.server.VirtualUsbServer - vUSB-Server initialized\n    07:34:33.393 [main] INFO com.saucelabs.vusb.client.server.rest.WebServer - Starting Virtual USB server on port 33657.\n    07:34:33.638 [main] INFO com.saucelabs.vusb.client.server.rest.WebServer - Virtual USB server is up.\n\n## Getting Connected\n\n### Start the Session\n\n1. From within your web browser, login to [https://app.saucelabs.com]() and navigate to __SAUCE APPS__ \u0026rarr; __Legacy RDC__.\n\n2. Find the app you want to start on a device in the list and click on it.\n3. You should see the option to do __LIVE TESTING__, __AUTOMATED TESTING__, and __ISSUES__.  Click on __LIVE TESTING__.\n4. If you need to use a Sauce Connect Tunnel, select it from the drop down list.\n5. Find an available device from the list of devices.\n6. Click __Open Device__.\n\n## Find the running session\n\n1. Start a new terminal window.\n2. Be sure the __TESTOBJECT_USER_API_KEY__ environment variable is still set.  If not, set it.\n3. To get a list of active sessions, the command format is:\n\n        java -jar vusb-client.jar -vv sessions --apiKey ${TESTOBJECT_USER_API_KEY}\n\n    The `vusb-sessions.sh` script does the same thing:\n\n        ./vusb-sessions.sh\n        07:45:49.592 [main] INFO com.saucelabs.vusb.client.Runner - Runner Version 1.8.0\n        07:45:49.639 [main] TRACE com.saucelabs.vusb.client.Runner - Enable super-verbose logging.\n        07:45:49.639 [main] DEBUG com.saucelabs.vusb.client.Runner - Runner launched with command:sessions\n        List of active sessions\n        c0f0a58f-a796-4542-acd0-271b3ba16228\t\tGoogle Pixel 3 POC156\t\tANDROID\t\t9\n\n    Take a copy of the session ID (ie., `c0f0a58f-a796-4542-acd0-271b3ba16228`) as it is used in the next step.\n\n### Connect Virtual USB to the Running Session\n\nTo connect Virtual USB to a running session, the command is in the format:\n\n    java -jar vusb-client.jar -vv connect --apiKey ${TESTOBJECT_USER_API_KEY} --sessionId ${SESSIONID}\n\nThe `vusb-connect.sh` script does the same thing allowing you to pass the Session ID on the command line as an argument to the script:\n\n    ./vusb-connect.sh c0f0a58f-a796-4542-acd0-271b3ba16228\n    07:47:07.510 [main] INFO com.saucelabs.vusb.client.Runner - Runner Version 1.8.0\n    07:47:07.557 [main] TRACE com.saucelabs.vusb.client.Runner - Enable super-verbose logging.\n    07:47:07.557 [main] DEBUG com.saucelabs.vusb.client.Runner - Runner launched with command:connect\n    localhost:7000\tonline\n\n### Connect ADB\n\nConnect __adb__ to the Virtual USB session so that it can be used by the desktop apps:\n\n    adb connect localhost:7000\n    * daemon not running; starting now at tcp:5037\n    * daemon started successfully\n    connected to localhost:7000\n\n## Getting Disconnected\n\n### Disconnect ADB\n\nDisconnect __adb__ from the Virtual USB device before ending the session:\n\n    adb disconnect localhost:7000\n\n### Disconnect the session\n\nThe command to disconnect from an establish Virtual USB session has the format:\n\n    java -jar vusb-client.jar -vv disconnect --sessionId ${SESSIONID}\n\nThe `vusb-disconnect.sh` script does the same thing allowing you to pass the Session ID on the command line as an argument to the script:\n\n    ./vusb-disconnect.sh c0f0a58f-a796-4542-acd0-271b3ba16228\n    07:51:28.792 [main] INFO com.saucelabs.vusb.client.Runner - Runner Version 1.8.0\n    07:51:28.839 [main] TRACE com.saucelabs.vusb.client.Runner - Enable super-verbose logging.\n    07:51:28.839 [main] DEBUG com.saucelabs.vusb.client.Runner - Runner launched with command:disconnect\n    Disconnected\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbillmeyer%2Fvirtual-usb-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbillmeyer%2Fvirtual-usb-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbillmeyer%2Fvirtual-usb-scripts/lists"}