Skip to content

About

๐ŸŒ The Free, Open-Source VirtualHere Alternative for Android & Android TV โ€” Rootless USB/IP server, Sunshine handoff, DualSense haptics & sim racing FFB

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

7 Commits

Folders and files

Repository files navigation

๐ŸŒ USBAnywhere Android โ€” The Free, Open-Source VirtualHere Alternative for Android & Android TV

๐ŸŒ Language / Idioma: English | Espaรฑol

v3.2.0 | Part of the USBAnywhere Ecosystem
๐ŸŒ Official Website | ๐Ÿ“ฆ Releases & APK | ๐Ÿ”— USBAnywhere Windows Client | ๐Ÿ–ฅ๏ธ USBAnywhere Windows Server | ๐Ÿ’ฌ Reddit Community | โ˜€๏ธ Sunshine & Moonlight Setup | ๐Ÿ“– Strategic Roadmap | ๐Ÿ”„ Engineering Workflow

Website Reddit Community Ko-fi Platform Android TV UI Protocol License Quality Gate Footprint

Why pay $49.00 per server and be restricted to a single USB device?
USBAnywhere Android is the definitive open-source USB-over-IP engine for Android phones, tablets, and Android TV / Google TV (Nvidia Shield). It seamlessly integrates into the USBAnywhere Suite, enabling zero-cost, multi-device USB tunneling between your living room TV and remote gaming PCs running Sunshine/Moonlight or the USBAnywhere Windows Client.


โš”๏ธ Why Choose USBAnywhere Over VirtualHere?

Feature USBAnywhere Android VirtualHere Android
Pricing & License 100% Free & Open Source (GPLv3) ๐Ÿ’ฐ $49.00 USD per server (locked to hardware)
Simultaneous USB Devices โ™พ๏ธ Unlimited โš ๏ธ 1 Device Only in trial
Root Requirement ๐Ÿ›ก๏ธ Zero Root Required (OTG user-space mediation) โš ๏ธ Generic Android driver
Sunshine & Moonlight Integration โšก Built-in Webhook (Port 3242) + Auto-Handoff โŒ Manual batch scripts and disconnect pain
Gamepad Quick-Toggle ๐ŸŽฎ Guide + Select (2.5s) switch TV/PC โŒ None
DualSense & Sim Racing ๐ŸŽ๏ธ Dedicated Haptics Buffer & FFB Jitter-Guard โš ๏ธ Packet drop & wheel shudder over Wi-Fi
Android TV / Shield 10-Foot UI ๐Ÿ“บ Native D-Pad Focus & Leanback Banner ๐Ÿ•ฐ๏ธ Basic Android interface
WAN & Remote Connectivity ๐Ÿ”’ Tailscale, WireGuard & Cyber QR Token โŒ Manual port forwarding
Package Size ๐Ÿš€ 2.07 MB APK (Includes 20.5K device database) ~6 MB

๐ŸŒ The USBAnywhere Triad: Multi-Platform Synergy

flowchart LR
    subgraph LivingRoom ["๐Ÿ›‹๏ธ Living Room (Android TV / Nvidia Shield)"]
        ATV["<b>USBAnywhere Android</b><br><i>(Rootless Server / Client)</i>"]
        GP["๐ŸŽฎ Gamepad / Sim Wheel / Hotas"]
        DAC["๐ŸŽง USB DAC / Mic"]
        GP --> ATV
        DAC --> ATV
    end

    subgraph Network ["๐ŸŒ Low-Latency Network (LAN / Tailscale VPN)"]
        direction TB
        NET["TCP Port 3240 (USB/IP)<br>HTTP Port 3242 (Sunshine Webhook)<br>mDNS Discovery (_usbanywhere._tcp)"]
    end

    subgraph GamingPC ["๐Ÿ–ฅ๏ธ Gaming Room / Cloud Host"]
        WIN_C["<b>USBAnywhere Windows Client</b><br><i>(WHQL Driver + WSK Engine)</i>"]
        WIN_S["<b>USBAnywhere Windows Server</b><br><i>(usbipd-win GUI)</i>"]
        SUN["โ˜€๏ธ Sunshine Game Streamer"]
    end

    ATV <==> NET
    NET <==> WIN_C
    NET <==> WIN_S
    NET <==> SUN
Loading
  1. Android as Living Room USB Server: Plug racing wheels (Logitech G29, Fanatec), flight sticks, or DualSense gamepads into your Nvidia Shield or Android TV box. Stream your game with Sunshine/Moonlight while the USBAnywhere Windows Client receives raw USB packets with full force feedback and adaptive triggers.
  2. Android as Client for Remote Peripherals: Access 3D printers (OctoPrint), CNCs, SDR dongles, or office scanners connected to a Windows host running USBAnywhere Windows Server.
  3. Sunshine Auto-Handoff: Sunshine triggers POST /api/stream/start on launch and POST /api/stream/stop on exit, automatically toggling controller ownership without manual intervention.

๐Ÿ”— USBAnywhere Ecosystem Components

Component Platform / Role Description
USBAnywhere Client ๐Ÿ–ฅ๏ธ Windows 10/11 (x64 / ARM64) Connect to remote USB devices with WHQL drivers & WSK engine
USBAnywhere Server ๐ŸŒ Windows 10/11 (.NET 9.0) Share local USB peripherals over network with GUI & Auto-Bind
USBAnywhere Android ๐Ÿ“ฑ Android & Android TV Rootless USB/IP server, Sunshine handoff & DualSense haptics
Official Website ๐ŸŒ Web Portal Interactive guides, documentation & download hub
Reddit Community ๐Ÿ’ฌ r/UsbAnywhere Support, discussions, community setups & announcements
Support on Ko-fi โ˜• Community Support hosting, driver testing & open-source engineering
Downloads & Mirrors ๐Ÿ“ฆ Backup Archive Centralized distribution mirror and checksum verification

โšก Key Highlights

๐Ÿ”Œ Rootless USB/IP Server (Port 3240)

  • Zero Root Required: Operates completely in user-space using android.hardware.usb.UsbManager (UsbDeviceConnection, controlTransfer, bulkTransfer).
  • Share gamepads, flight sticks, racing wheels, 3D printers, CNCs, and webcams connected via USB-OTG or USB-C hubs.
  • High-Performance Foreground Service with WakeLock and WifiLock preventing Android OS power throttling.

๐ŸŽฎ Gaming Synergy & Esports Polling Engine

๐Ÿ“ฑ Background Execution & Mobile Gaming

  • Full Foreground Service Persistence:
    • Operates as a resilient Android Foreground Service (UsbIpServerService) typed with android:foregroundServiceType="connectedDevice".
    • Holds an active PARTIAL_WAKE_LOCK and WIFI_MODE_FULL_HIGH_PERF lock, ensuring the Android kernel never throttles network traffic or kills the USB mediation daemon when running mobile games, emulators, or switching apps.
    • Informative persistent status notification in the Android notification shade with real-time client connection metrics.

๐ŸŽฎ Live Esports Gamepad HUD & Simulator

  • Sunshine Auto-Handoff & Quick-Toggle:
    • Embedded HTTP micro-server (Port 3242) for Sunshine do and undo commands.
    • Gamepad combo (Guide + Select held for 2.5s) toggles control between Android TV navigation and PC USB/IP streaming.
  • Sony DualSense Engine:
    • Circular isochronous audio buffer delivering pristine haptics and adaptive triggers over Wi-Fi without audio underflows.
  • Sim Racing & HOTAS FFB Jitter-Guard:
    • Monotonic sequence ordering and stale packet dropper eliminating violent wheel shakes from delayed Wi-Fi packets.
  • Multiplayer Hub Slot Locks:
    • Deterministic P1-P4 player binding tied to USB port topology so controllers never scramble player numbers.
  • Live Esports Gamepad HUD:
    • Real-time frequency tracker in Hz, min/max bounds, jitter ($\sigma$ in ms), analog stick crosshairs, and 1000/8000 Hz synthetic simulator.

๐Ÿ”’ WAN Zero-Trust Security & Audio Bridge

  • Tailscale & WireGuard Native Discovery:
    • Automatically identifies CGNAT (100.64.0.0/10) and VPN interfaces.
    • Generates compact pairing tokens (UA1:...) and renders dynamic Cyber QR codes natively on Compose Canvas without heavy third-party libraries.
  • Friction-Free WAN Mesh & TLS 1.3:
    • Direct RFC-compliant USB/IP protocol negotiation over encrypted VPN tunnels (Tailscale/WireGuard) with zero PIN friction.
  • UAC2 Audio & Headset Microphone Bridge:
    • 48 kHz / 16-bit PCM stereo bridge with user-selectable buffer profiles: 2ms (Esports local), 4ms (Wi-Fi), 8ms (WAN).

๐Ÿ“บ 10-Foot UI for Android TV & Google TV

  • Official Leanback launcher integration with custom high-contrast cyber banner (tv_banner.xml).
  • Declares android.hardware.touchscreen=false for full Android TV Play Store compliance.
  • D-Pad remote control focus indicators with glowing NeonCyan borders.

๐Ÿ—„๏ธ Embedded 20.5K Device Database

  • Offline SQLite catalog with 3,427 vendors and 20,551 products indexed from official USB-IF databases.
  • Semantic classification: ๐ŸŽฎ Gamepad, ๐ŸŽ๏ธ Racing Wheel, ๐Ÿ–ฑ๏ธ Mouse, โŒจ๏ธ Keyboard, ๐Ÿ“ท Camera, ๐Ÿ–จ๏ธ 3D Printer, ๐ŸŽง Audio, ๐Ÿ’พ Storage, ๐Ÿ”Œ Generic.

๐Ÿ›ก๏ธ Non-Intrusive Opt-In Architecture

  • BootCompletedReceiver and UsbAttachedReceiver are android:enabled="false" by default in the Manifest.
  • Dynamic PackageManager.setComponentEnabledSetting ensures zero background battery drain or unwanted OS dialogs until explicitly enabled in Settings.


๐Ÿ“ฑ Navigation & App Architecture

The user interface is built on Jetpack Compose Material 3 with native 10-foot D-Pad remote control focus indicators for Android TV / Google TV:

Tab Icon Purpose
Server ๐Ÿ”Œ One-tap rootless USB/IP server start/stop, real-time USB-OTG peripheral discovery, and connection status hero card.
Client ๐Ÿ’ป Multi-tier auto-discovery of remote USB/IP servers (Parallel TCP 3240 subnet scan, UDP 3241 probe & mDNS), manual host IP connection, and connection guide.
Gamepad ๐ŸŽฎ Live polling rate monitor in Hz, jitter ($\sigma$ in ms), 1000/8000 Hz simulator, Sunshine auto-handoff, and multiplayer slot locks.
Settings โš™๏ธ Esports low-latency tuning (TCP_NODELAY, ring buffers), opt-in auto-start on boot/USB, TV kiosk mode, and port configuration (:3240, :3242).

๐Ÿ“ Source Tree Structure

app/src/main/
โ”œโ”€โ”€ AndroidManifest.xml                  # Leanback, Non-Touch, USB Host, Foreground Service
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ usb_catalog.db                   # SQLite database (3,427 vendors, 20,551 products)
โ”œโ”€โ”€ java/com/usbanywhere/
โ”‚   โ”œโ”€โ”€ MainActivity.kt                  # Edge-to-edge Compose host & D-Pad key dispatcher
โ”‚   โ”œโ”€โ”€ audio/                           # UAC2 Audio Bridge & Jitter Buffering
โ”‚   โ”œโ”€โ”€ catalog/                         # Semantic Hardware Classification Engine (SQLite)
โ”‚   โ”œโ”€โ”€ client/                          # USB/IP Client Implementation (mDNS, UDP, Roaming)
โ”‚   โ”œโ”€โ”€ data/                            # Persistent AppPreferences & UsbModels
โ”‚   โ”œโ”€โ”€ gamepad/                         # Gamepad Testing & Polling Rate Engine
โ”‚   โ”œโ”€โ”€ gaming/sunshine/                 # Sunshine Webhook (Port 3242) & Handoff Manager
โ”‚   โ”œโ”€โ”€ network/wan/                     # Tailscale/WireGuard WAN & Cyber QR Matrix
โ”‚   โ”œโ”€โ”€ protocol/                        # Standard Binary USB/IP Wire Protocol (RFC Draft)
โ”‚   โ”œโ”€โ”€ receiver/                        # Non-Intrusive Boot & USB Attached Receivers
โ”‚   โ”œโ”€โ”€ security/                        # TLS 1.3 Socket Factory & Encryption Helpers
โ”‚   โ”œโ”€โ”€ server/                          # Rootless USB/IP Server Daemon (Port 3240)
โ”‚   โ””โ”€โ”€ ui/                              # Jetpack Compose Material 3 (Cyber Neon Theme)
โ””โ”€โ”€ res/drawable/
    โ””โ”€โ”€ tv_banner.xml                    # Android TV 320x180 dp Leanback home banner

๐Ÿ› ๏ธ Building & Verification

Prerequisites

  • JDK: JDK 17+ or JDK 21 (Microsoft Hotspot)
  • Android SDK: Build Tools 35.0.0+, Platform API 35/36
  • Gradle: 8.9+ (Wrapper included)

Compilation Commands

# 1. Run unit test suite (38 tests)
.\gradlew.bat test

# 2. Build Minified Signed Production APK (2.07 MB)
.\gradlew.bat assembleRelease

# 3. Build Google Play Store App Bundle (4.26 MB)
.\gradlew.bat bundleRelease

Automated Testing & Quality Gate

# Execute the full unit test suite (38 tests)
.\gradlew.bat test

๐Ÿ”’ Security & Contribution Policy

This repository adheres to strict Zero-Trust engineering and security practices. Contributions, security audits, and issue reports are welcomed via standard GitHub Pull Requests and Issues.


๐Ÿ“„ License

This project is licensed under the GNU General Public License v3.0 (GPLv3).

USBAnywhere Android is 100% Free and Open Source. You are free to run, study, share, and modify the software under the terms of the GNU General Public License as published by the Free Software Foundation.

See LICENSE for full legal terms and conditions.

About

๐ŸŒ The Free, Open-Source VirtualHere Alternative for Android & Android TV โ€” Rootless USB/IP server, Sunshine handoff, DualSense haptics & sim racing FFB

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages