KOTLIN 1.9.24 · JETPACK COMPOSE · FASTAPI

An Android AI companion built for local privacy first.

NexaDroid is a 14-module Android application with a Python FastAPI companion. It indexes personal context into 128-dimensional local vectors and a Knowledge Graph, inspects your screen only on explicit tap, and gates every OS action behind a confirmation dialog.

Android Modules
14 Gradle
Local Database
10 Room Tables
Encryption
AES-256-GCM
Min / Target SDK
API 26 / 34
Subsystems

Built with real Android OS APIs, not mock wrappers.

Each capability lives in an isolated Gradle module with strict Hilt DI boundaries and JVM/integration test coverage.

01 :ai-engine + :local-models

Deterministic Hybrid Routing

HybridAiRouter checks offline mode, privacySensitive lock, connectivity, and complexity (>18 words or reasoning verbs) before selecting built-in NexaCore, GGUF/Ollama models, or OpenAI / Anthropic / Gemini—with automatic local fallback.

02 :memory + :database

3-Layer Memory & 128-D Vectors

EmbeddingEngine generates normalized 128-dim embeddings locally on device. MemoryRepository blends cosine similarity, lexical overlap, pinning, and 1-hop KnowledgeGraphEngine neighbors across 24h short-term and encrypted long-term Room tables.

03 :screen-intelligence

Explicit-Consent Screen OCR

ScreenCaptureService uses Android MediaProjection with a mandatory OS foreground notification only on tap. NexaAccessibilityService discards any isPassword node, and PrivacyPolicyGuard blocks banking and password managers by default.

04 :automation + :voice

Gated Actions & Voice Barge-In

IntentActionParser proposes 9 structured ActionTypes—apps, Settings, WorkManager ReminderWorker, SMS drafts, notifications, and multi-step routines—all forced through ActionConfirmationDialog. Voice supports instant TTS interruption on mic tap.

Obsidian Neural & Luminous Quartz

All 8 Jetpack Compose Screens

Explore the real adaptive Material 3 navigation destinations from MainActivity.kt—tap tabs, switch themes above, or tap inside the phone preview.

09:41 5G · 94%
Architecture

14 Android Modules + FastAPI Companion

Select any module below to inspect its package, responsibilities, and verified components from the repository.

ANDROID MULTI-MODULE GRADLE STACK · android/
COMPANION BACKEND · backend/ + docker-compose.yml

FastAPI REST & WebSocket Hub

Optional self-hosted sync server mirroring mobile 128-dim embeddings, RAG memory, project CRUD, and streaming responses over TLS or local LAN.

  • GET / POST/api/v1/chat
  • GET / POST/api/v1/memory
  • POST/api/v1/screen/analyze
  • POST/api/v1/automation/plan
  • GET / POST/api/v1/models · /projects
  • WS/ws/assistant
Zero-Trust Design

Verifiable Privacy Controls in Code

Every sensitive surface—key storage, accessibility inspection, screen capture, and device automation—is guarded in :security and :database.

CryptoManager.kt

Android Keystore AES-256-GCM

Encrypts sensitive memories with AES/GCM/NoPadding under alias nexadroid_master_aes_key_v1 and stores cloud API keys in EncryptedSharedPreferences.

PrivacyPolicyGuard.kt

Sensitive Package Blocklist

Excludes banking, wallet, authenticator, incognito, and password-manager packages (1password, bitwarden, keepass, etc.) from screen inspection by default.

NexaAccessibilityService.kt

Password-Safe UI Inspection

Skips all nodes where isPassword == true, stays unarmed until explicitly toggled, and keeps allowCloudScreenUpload disabled by default.

LocalDataWiper.kt

Confirmed Wipe & Audit Trail

Every action routes through ActionConfirmationDialog and logs to Room AuditLogEntity. A two-step wipe clears DB tables, DataStore, keys, and downloaded GGUF files.

Developer Quick Start

Build, Test & Self-Host

Verified Gradle unit tests (5/5 suites) and Pytest backend integration tests (5/5 passing).

git clone https://github.com/yashab-cyber/NexaDroid.git
cd NexaDroid/android
./gradlew testDebugUnitTest assembleDebug
# Output APK: android/app/build/outputs/apk/debug/app-debug.apk