USB/IP server for Android
A modern, high-performance USB/IP server for Android that allows remote access to connected USB devices over a network connection.
- Real-time USB Device Discovery: Automatically detects and shares connected USB devices
- USB/IP Protocol Support: Full implementation of USB/IP protocol for network USB sharing
- Background Service: Runs as a foreground service for continuous operation
- Cross-platform Compatibility: Works with Linux, macOS, and other USB/IP clients
- Dark Theme: Professional dark interface with excellent contrast
- Live Device List: Real-time device monitoring with connection status
- Material Design 3: Modern Android design system
- Responsive Layout: Optimized for various screen sizes
- Native USB Support: JNI integration for enhanced USB performance
- Auto USB Permissions: Requests USB device access when devices are attached
- Network Monitoring: Maintains wake locks for reliable network connectivity
- USB Speed Detection: Automatically detects and reports USB device speeds
- Bulk & Interrupt Transfers: Full support for all USB transfer types
- USB Host Support: Android device with USB host functionality (OTG support)
- Network Connectivity: WiFi or Ethernet for USB/IP network communication
- Android Version: Android 5.0 (API 21) or higher
- USB Host Permission: Required for accessing USB devices
- Network Permissions: Required for network USB sharing
- Linux/macOS: Native USB/IP client support
- USB/IP Tools: Standard Linux USB/IP utilities
- Network Access: Access to Android device on same network
# Download the latest APK from releases
wget https://github.com/alexonpeace/USBIPServerForAndroid/releases/latest/download/USBIPServerForAndroid.apk- Enable "Install from Unknown Sources" in Android Settings
- Transfer APK file to your Android device
- Open APK file and follow installation prompts
The app will request the following permissions on first launch:
- USB Host Access: Required to communicate with USB devices
- Internet Access: Required for USB/IP network communication
- Notification Access: Required for foreground service status
- Launch the App: Open USB/IP Server on your Android device
- Tap "Start Server": Begins the USB/IP server service
- Background Operation: Service continues running even when app is closed
- Plug in USB Device: Connect any USB device to your Android device
- Grant Permission: When prompted, grant USB access to the app
- Device Appears: Device shows up in the connected devices list
# Discover devices (replace IP with your Android device IP)
sudo usbip list -r [ANDROID_IP]
# Attach a USB device (busid from previous command)
sudo usbip attach -r [ANDROID_IP] -b [BUSID]- Server Port:
3240(default USB/IP port) - Discoverable: Appears as "usbip-server-usbip" on network
- Auto-restart: Service automatically restarts on device reboot
USB/IP server for Android
### Prerequisites
```bash
# Required tools
- Android Studio Arctic Fox or later
- Android NDK 27.x.x (already configured)
- Java 17 JDK (configured in build.gradle)
# Dependencies (automatically managed)
- AndroidX Libraries (AppCompat, Material, RecyclerView, CardView)
- Google Material Components
- Android USB Host APIs
- Clone the Repository
git clone https://github.com/alexonpeace/USBIPServerForAndroid.git
cd USBIPServerForAndroid- Open in Android Studio
# Open the project in Android Studio
# File > Open > Select USBIPServerForAndroid directory- Build APK
# Using Gradle wrapper
./gradlew assembleDebug
# Or build APK
./gradlew build
# APKs will be in app/build/outputs/apk/- Install on Device
adb install app/build/outputs/apk/debug/app-debug.apkUSBIPServerForAndroid/
โโโ app/
โ โโโ build.gradle # App configuration & dependencies
โ โโโ src/main/
โ โ โโโ AndroidManifest.xml # App permissions & configuration
โ โ โโโ java/org/cgutman/
โ โ โ โโโ usbip/
โ โ โ โ โโโ config/ # UI activities & device management
โ โ โ โ โโโ server/ # USB/IP server implementation
โ โ โ โ โโโ service/ # Background service
โ โ โ โ โโโ usb/ # USB utilities & control helpers
โ โ โ โ โโโ utils/ # Stream utilities
โ โ โ โโโ jni/ # Native USB implementation
โ โ โโโ res/ # UI resources (layouts, colors, strings)
โโโ gradle/ # Build configuration
- Foreground Service: Continuously monitors USB devices
- Broadcast Receivers: Handles USB attachment/detachment events
- Permission Management: Requests USB permissions when devices connect
- Network Socket: USB/IP protocol server on port 3240
- Material Design: Modern dark theme interface
- Device List: Live device monitoring with RecyclerView
- Service Controls: Start/stop server with visual feedback
- Permission Handling: User-friendly permission requests
- USB/IP Implementation: Full protocol support for device sharing
- Device Enumeration: Lists available USB devices with metadata
- Urb Processing: Handles USB transfers (bulk, interrupt, control)
- Client Management: Multi-client support for network connections
- Native USB: Enhanced performance with JNI libusblib
- USB Detection: Automatic speed and interface detection
- Transfer Operations: Direct USB host controller access
- Device Control: USB descriptors and endpoint management
- Device Discovery: List available USB devices network-wide
- Device Attachment: Share Android USB devices with remote machines
- Data Transfer: Full USB transfer types (Control, Bulk, Interrupt, Isochronous)
- Device Control: USB control transfers for configuration
- Auto Acceleration: Optimized data transfers for best performance
- Linux (usbip-utils): Native USB/IP client support
- macOS (Linux VM): USB/IP through virtual machines
- Windows: Via WSL2 with usbip-utils
- Network: Any USB/IP compatible client
- Target API 35: Updated for Android 15 compatibility
- Modern USB APIs: Uses latest Android USB framework
- Permission Handling: Implements Android 14+ USB requirements
- Dark Theme: Native system dark theme support
- JNI Integration: Native USB operations for low latency
- Thread Pool: Efficient concurrent USB transfer handling
- Connection Pool: Reused connections for multiple client sessions
- Background Processing: Non-blocking USB operations
- USB Permissions: Explicit user consent for device access
- Network Access: Isolated to USB/IP protocol port
- Background Operation: Respects Android battery optimization
- Data Privacy: No internet connectivity or data collection
We welcome contributions! Here's how to get involved:
- Use the GitHub Issues system
- Include Android version, device model, and detailed reproduction steps
- Provide logcat output when possible
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone and setup
git clone https://github.com/alexonpeace/USBIPServerForAndroid.git
cd USBIPServerForAndroid
# Use Android Studio or command line
./gradlew assembleDebug- Android 15 compatibility
- Dark theme interface
- USB/IP protocol implementation
- Cross-platform client support
- Native USB performance
- Advanced Device Filtering: Selective device sharing
- Device Management UI: Removable device controls
- Performance Metrics: Transfer speed monitoring
- Bulk Operations: Multi-device management
- Android TV Support: Embedded device integration
Q: App crashes immediately on Android 15? A: The app is fully compatible with Android 15 (API 35). Make sure you're using the latest build.
Q: "USB host not supported" error? A: Your Android device may not support USB host mode (OTG). Check your device's specifications.
Q: Device doesn't appear in the list? A: Grant USB permissions when prompted, or use "Refresh" to rescan for devices.
Q: Client can't connect to Android device? A: Ensure both devices are on the same network. Check firewall rules and Android's "Local hotspot" settings.
Q: Slow USB transfers? A: This is normal for USB/IP over WiFi. For best performance, use Ethernet connection when possible.
- GitHub: alexonpeace/USBIPServerForAndroid
- Issues: Report Bugs & Request Features
- Discussions: Community Questions
- Start the server on your Android device
- Connect USB devices and grant permissions
- Discover and attach from your Linux/macOS client
- Enjoy remote USB access from your computer!
Happy USB/IP networking! ๐
This project is licensed under the GNU General Public License v2.0.
Key Points:
- Free software - you can redistribute and/or modify it
- Commercial usage allowed
- Attribution required if derivative work
- See LICENSE for complete terms
โญ If you find this project useful, please star it on GitHub! โจ
Built with โค๏ธ for Android USB enthusiasts and network computing