AndroControl is a secure remote control application that allows you to control your Linux system's mouse and keyboard from your Android smartphone.
- Mouse Control: Move cursor, left/right/middle click, double-click, drag, and scroll
- Keyboard Control: Full QWERTY keyboard with modifier keys (Ctrl, Alt, Shift, Super/Win)
- Special Keys: Function keys (F1-F12), navigation keys, Tab, Escape, etc.
- Key Combos: Support for keyboard shortcuts like Ctrl+C, Alt+Tab, etc.
- TLS Encryption: All communication is encrypted using TLS 1.2/1.3
- TOFU Security: Trust-On-First-Use certificate pinning with user confirmation
- Token Authentication: Secure token-based authentication
- QR Code Setup: Scan QR code from server for easy connection setup
- Multiple Servers: Save and manage multiple server configurations
- Haptic Feedback: Vibration feedback for button presses
- Heartbeat: Connection health monitoring with automatic reconnection
The solution follows a client-server architecture:
- Backend (Go): A lightweight server running on the target Linux system that receives control signals over TLS-encrypted TCP and executes them using uinput
- Frontend (Android): A Material Design app that sends mouse and keyboard inputs to the server
- Linux system with uinput kernel module
- Go 1.21+ (for building from source)
- Android 6.0 (API 23) or higher
- Camera permission (for QR code scanning)
- Network access to the server
-
Install uinput kernel module:
sudo modprobe -i uinput
To load on boot, add
uinputto/etc/modules. -
Build and run the server:
cd Backend-GO go build -o AndroControl ./AndroControl -
First run: The server will:
- Generate TLS certificates (stored in
certs/) - Generate an authentication token (stored in
auth_token) - Display a QR code for easy mobile setup
- Start listening on port 5050
- Generate TLS certificates (stored in
- Build the APK from source or download a release
- Install on your Android device
- Connect via QR code (recommended):
- Open the app and tap the QR scanner icon
- Scan the QR code displayed by the server
- Verify the certificate fingerprint and accept
- Or connect manually:
- Add a new server with IP, port, and token
- Verify the certificate fingerprint on first connection
- Swipe on the touchpad to move the cursor
- Tap for left click
- Long press for right click
- Double tap for double click
- Two-finger swipe for scrolling
- Use the L/M/R buttons for click and drag operations
- Tap the Keyboard button to show the keyboard panel
- Use the on-screen QWERTY keyboard or the native keyboard
- Toggle Ctrl/Alt/Shift/Win modifiers for key combinations
- Special keys: Tab, Esc, Arrow keys, Home, End, Delete, F1-F12
All communication between the app and server is encrypted using TLS 1.2 or 1.3. The server generates a self-signed certificate on first run.
On first connection, the app displays the server's certificate fingerprint for verification. Once accepted, the fingerprint is saved and verified on subsequent connections. If the certificate changes, you'll receive a warning.
The server generates a secure random token on first run. This token must be provided by the client to authenticate. Tokens are stored securely using Android Keystore encryption.
Each authenticated connection receives a session token with a 30-minute TTL. Sessions are automatically refreshed during active use.
- Default port: 5050
- Protocol: TCP with TLS
- Both devices must be on the same network (or have appropriate routing)
- Firewall must allow TCP traffic on the configured port
cd Backend-GO
go build -o AndroControlcd Frontend
./gradlew assembleDebugThe APK will be in Frontend/app/build/outputs/apk/debug/.
AndroControl/
├── Backend-GO/ # Go server
│ ├── main.go # Main entry point, uinput handling
│ ├── auth.go # Token authentication
│ ├── session.go # Session management
│ ├── tls.go # TLS certificate handling
│ ├── protocol.go # Command protocol
│ ├── validation.go # Input validation
│ ├── ratelimit.go # Rate limiting
│ ├── qrcode.go # QR code generation
│ └── connmanager.go # Connection management
├── Frontend/ # Android app
│ └── app/src/main/java/com/aranaj/androcontrol/
│ ├── MainActivity.java # Main UI and controls
│ ├── TlsHelper.java # TLS/TOFU implementation
│ ├── SecureStorage.java # Encrypted storage
│ ├── Protocol.java # Communication protocol
│ ├── HeartbeatManager.java # Connection health
│ ├── Server.java # Server model
│ ├── ServerManager.java # Server persistence
│ └── QRScannerActivity.java # QR code scanning
└── Assets/ # Screenshots and resources
- Ensure uinput module is loaded:
lsmod | grep uinput - Check if port 5050 is available:
ss -tlnp | grep 5050 - Run with sudo if uinput permissions are insufficient
- Verify both devices are on the same network
- Check firewall settings on the server
- Ensure the correct IP address and port are configured
- If you regenerated server certificates, clear the saved fingerprint in the app
- Go to server settings and delete/re-add the server
- Ensure the server has permissions to use uinput
- Check server logs for error messages
See LICENSE file.
This software is provided as-is. Use at your own risk. The authors are not responsible for any damages or misuse of this application.