cd android
./gradlew assembleDebug # Build debug APK
./gradlew test # Run unit tests
./gradlew connectedAndroidTest # Run instrumented tests (requires device)neuralbridge/
βββ android/ # Android app (runs on device)
β βββ app/src/main/
β β βββ kotlin/.../companion/
β β β βββ mcp/ # Embedded MCP HTTP server (Ktor CIO, port 7474)
β β β βββ service/ # AccessibilityService + command handler
β β β βββ gesture/ # Gesture engine
β β β βββ input/ # Text input, clipboard, key events
β β β βββ screenshot/ # MediaProjection + libjpeg-turbo (JNI)
β β β βββ network/ # TCP server + protobuf codec
β β β βββ uitree/ # UI tree walker + semantic extraction
β β β βββ notification/ # NotificationListenerService
β β βββ cpp/ # JNI (libjpeg-turbo JPEG encoding)
β β βββ res/ # Resources
β βββ proto/ # Protobuf schema (source of truth)
β βββ build.gradle.kts
βββ examples/ # Example MCP client
β βββ mcp_client.py
βββ docs/ # Documentation
βββ CONTRIBUTING.md
βββ SECURITY.md
βββ LICENSE # Apache 2.0
The schema at android/proto/neuralbridge.proto is the source of truth. When you change it, regenerate Kotlin code:
cd android && ./gradlew generateProtoadb logcat -s NeuralBridge:V