Seamlessly control and stream your Android phone from a Linux desktop application over the internet or LAN — without ADB runtime dependencies and without root.
├── android/ # Android Agent Application (Kotlin + Android SDK)
│ ├── app/ # Mobile Application Module (Foreground Service, KeyStore, OkHttp)
│ ├── build.gradle.kts
│ └── settings.gradle.kts
├── linux/ # Linux Desktop Controller (Rust, GTK4, libadwaita styling, Tokio, SQLite)
│ ├── src/ # Controller client, identity manager, sqlite storage, and GTK4 UI
│ ├── tests/ # End-to-end integration tests
│ └── Cargo.toml
├── relay/ # Standalone Relay & Signaling Server (Rust, Tokio, WebSockets)
│ ├── src/ # Authenticated session registry & message router
│ └── Cargo.toml
├── protocol/ # Shared Protocol & Cryptographic Specification (Rust)
│ ├── src/ # Envelope models, Ed25519 crypto, deterministic Device IDs
│ └── Cargo.toml
├── tools/
│ └── mock_agent/ # Mock Android Agent CLI for automated protocol & pairing testing
├── docs/
│ ├── ARCHITECTURE.md # Architectural specification and security model
│ └── PROTOCOL.md # Protocol v1 format and message reference
└── Cargo.toml # Monorepo Cargo Workspace configuration
[ Android Phone ] (Kotlin)
│ - Ed25519 identity in KeyStore
│ - Background Foreground Service with Partial WakeLock
▼
[ WebSocket / WebRTC ] (Authenticated Handshake & Signaling)
▼
[ Rust Relay Server ] (Tokio)
▲
[ WebSocket / WebRTC ]
│
[ Linux Desktop ] (Rust + GTK4 + libadwaita + SQLite)
• Status Badge: "● Android Connected"
• Mouse -> Touch input, Keyboard -> Android, Screen Streaming
# Bind to 0.0.0.0:8080 or custom port
RELAY_BIND="0.0.0.0:8080" cargo run -p bridge-relay# Launch GTK4 GUI Controller
cargo run -p bridge-linux -- --relay ws://127.0.0.1:8080
# Or run in Headless CLI mode:
cargo run -p bridge-linux -- --headless --relay ws://127.0.0.1:8080cd android
./gradlew assembleDebug
# Generated APK: android/app/build/outputs/apk/debug/app-debug.apkadb install android/app/build/outputs/apk/debug/app-debug.apk- Open the Android Desktop Bridge app.
- Enter the Relay Server URL (e.g.,
ws://10.0.2.2:8080for emulator or LAN IP). - Tap Start Bridge Service (starts Foreground Service).
- Enter the displayed 6-digit PIN into the Linux Controller pairing box and click Pair with Android.
- Once paired, the Linux window and Android app update status to:
● Android Connected
If you don't have an Android device at hand, test the full pairing flow using the Mock Agent CLI:
cargo run -p bridge-mock-agent -- --relay ws://127.0.0.1:8080 --pin 123456cargo test --allTests include:
- Protocol envelope serialization and deserialization
- Ed25519 signature creation and verification
- Deterministic Device ID computation
- SQLite trusted device persistence
- Full Relay ↔ Linux ↔ Agent pairing integration test
cd android
./gradlew testDebugUnitTestTests include:
- BouncyCastle Ed25519 key generation, derivation, and verification
- Protocol message round-trip encoding and decoding