yashab-cyber/NexaDroid
À propos
NexaDroid - Next-Generation Privacy-First Android AI Companion with Hybrid Local/Cloud Routing, RAG Memory, Screen OCR, Voice, and Automation
Sécurité et confidentialitéWhat you can do
- Hybrid AI Engine - Routes requests across built-in offline NexaCore, local GGUF/Ollama models (Qwen 2.5, Llama 3.2, Gemma 2), and cloud providers (OpenAI, Anthropic, Gemini, or FastAPI Proxy) based on complexity, privacy flags, connectivity, and routing policy (AUTO, LOCAL_ONLY, CLOUD_PREFERRED, OFFLINE).
- 3-Layer Personal Memory - Short-Term rolling session context (24h TTL), Long-Term pinned/encrypted memories, and an entity-relation Knowledge Graph (person, project, topic, url) indexed with 128-dim normalized dense embeddings. Supports Markdown & JSON export.
- Screen Intelligence - On-demand foreground MediaProjection screenshot OCR (ML Kit), gallery screenshot OCR, and password-safe AccessibilityService UI tree analysis. Extracts URLs, emails, dates, and currency amounts with one-tap selective saving to Memory.
- Android Automation Engine - Executes user-confirmed intents: open installed apps, navigate Android Settings, schedule WorkManager notification reminders, launch websites, copy/share text, open prefilled SMS drafts, inspect/dismiss notifications, and run sequential multi-step WorkflowPlan routines.
Progression mesurée des étoiles
- in 24h
- 0
- in 7 days
- Historique en cours
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Original
NexaDroid
Next-Generation Privacy-First Android AI Operating Companion
Live Website · Download APK (v1.0.0) · Architecture · API Docs · Security · X (@yashabcyber)
Customizing the Logo: Replace
website/assets/logo.pngwith your uploaded logo (512x512PNG recommended). Both this README and the public website reference this single asset automatically.
Table of Contents
- Vision
- Core Capabilities
- 8 Production UI Screens
- System Architecture
- Quick Start
- Testing & Verification
- Security & Privacy Guarantees
- Documentation
Vision
NexaDroid transforms an Android smartphone into a context-aware, privacy-respecting personal computing environment. Unlike stateless chatbots, NexaDroid combines:
- On-device and cloud AI intelligence with automatic offline fallback.
- Persistent multi-layer personal memory backed by vector semantic search and a Knowledge Graph.
- Explicit-consent screen understanding using Android
MediaProjection, ML Kit OCR, and safeguardedAccessibilityServiceinspection. - Confirmation-gated Android automation for apps, settings, reminders, notifications, messaging drafts, and multi-step routines.
Core Capabilities
| Subsystem | What It Delivers |
|---|---|
| Hybrid AI Engine | Routes requests across built-in offline NexaCore, local GGUF/Ollama models (Qwen 2.5, Llama 3.2, Gemma 2), and cloud providers (OpenAI, Anthropic, Gemini, or FastAPI Proxy) based on complexity, privacy flags, connectivity, and routing policy (AUTO, LOCAL_ONLY, CLOUD_PREFERRED, OFFLINE). |
| 3-Layer Personal Memory | Short-Term rolling session context (24h TTL), Long-Term pinned/encrypted memories, and an entity-relation Knowledge Graph (person, project, topic, url) indexed with 128-dim normalized dense embeddings. Supports Markdown & JSON export. |
| Screen Intelligence | On-demand foreground MediaProjection screenshot OCR (ML Kit), gallery screenshot OCR, and password-safe AccessibilityService UI tree analysis. Extracts URLs, emails, dates, and currency amounts with one-tap selective saving to Memory. |
| Android Automation Engine | Executes user-confirmed intents: open installed apps, navigate Android Settings, schedule WorkManager notification reminders, launch websites, copy/share text, open prefilled SMS drafts, inspect/dismiss notifications, and run sequential multi-step WorkflowPlan routines. |
| Voice Intelligence | Android SpeechRecognizer + configurable TextToSpeech (rate, pitch, auto-speak), instant playback interruption (barge-in), and opt-in foreground wake-phrase stripping. |
| Security & Privacy | Android Keystore AES-256-GCM field encryption, EncryptedSharedPreferences for API keys, live Permission Dashboard, excluded app protections, auditable execution logs, and total local wipe (LocalDataWiper). |
8 Production UI Screens
Designed with a minimalist Obsidian Neural (dark) and Luminous Quartz (light) Material 3 system featuring adaptive NavigationBar / NavigationRail, an interactive 3-step Onboarding experience, and custom NexaDroidLogo / NeuralPulseOrb branding:
- Home / AI Chat — Hybrid routing badges, RAG memory citations, inline confirmation cards, voice input, TTS barge-in, and per-turn strict local privacy lock.
- Memory Center — All / Long-Term / Short-Term / interactive
KnowledgeGraphCanvastabs, semantic search, create/edit/pin/delete, and Markdown/JSON export. - Screen Intelligence — Consent-gated
MediaProjectioncapture, photo picker OCR, armed Accessibility UI reader, entity extraction, and capture recall history. - Automation Center — Quick Action launcher, Multi-Step Workflow Builder & Runner, live Notification Assistant digest, and execution audit history.
- AI Model Manager — Routing mode selector, Offline Mode toggle, local GGUF downloader with progress & SHA-256 verification, cloud switcher, and token/latency telemetry.
- Project & Task Manager — Priority-based project tracking with WorkManager 30-minute notification reminders.
- Settings & Privacy — Theme switcher, encrypted API key manager, live Permission Dashboard, excluded package list, voice sliders, FastAPI sync config, and two-step Delete All Local Data.
- System Activity Dashboard — Live network/WebSocket status, storage counters, token analytics, and auditable action log.
System Architecture
flowchart LR
UI["8 Compose Screens (:app, :feature-settings, :ui-components)"] --> Router["HybridAiRouter (:ai-engine)"]
Router --> Local["LocalInferenceEngine (:local-models)"]
Router --> Cloud["CloudAiOrchestrator (:cloud-ai)"]
Router --> Memory["MemoryRepository & KnowledgeGraph (:memory)"]
Screen["ScreenIntelligenceEngine (:screen-intelligence)"] --> Memory
UI --> Auto["AutomationEngine & WorkManager (:automation)"]
UI --> Voice["VoiceConversationController (:voice)"]
Memory --> DB["Room + DataStore + Keystore (:database, :security)"]
Cloud --> Net["OkHttp + WebSocket (:networking)"]
Net <--> Backend["FastAPI + PostgreSQL / SQLite (backend/)"]
Repository Structure
.
├── android/ # 14-module Android Studio Gradle project (AGP 8.5.2, Kotlin 1.9.24)
│ ├── app/ # Application entry, adaptive shell, Onboarding, Chat, Memory, Screen, Automation
│ ├── core/ # Immutable domain models, DispatcherProvider, AppResult, TextUtils
│ ├── security/ # CryptoManager (AES-256-GCM), SecureCredentialStore, PrivacyPolicyGuard, PermissionAuditor
│ ├── database/ # Room NexaDatabase (10 entities/DAOs), NexaPreferencesDataStore, LocalDataWiper
│ ├── networking/ # ConnectivityMonitor, CloudApiClients, NexaBackendClient (REST + WebSocket)
│ ├── local-models/ # LocalModelRegistry, ModelDownloadManager, LocalInferenceEngine
│ ├── cloud-ai/ # CloudAiOrchestrator (OpenAI, Anthropic, Gemini, Backend Proxy)
│ ├── ai-engine/ # HybridAiRouter, IntentActionParser
│ ├── memory/ # EmbeddingEngine, KnowledgeGraphEngine, MemoryRepository
│ ├── screen-intelligence/ # ScreenCaptureService, NexaAccessibilityService, ScreenIntelligenceEngine
│ ├── automation/ # AutomationEngine, ReminderWorker, NexaNotificationListenerService
│ ├── voice/ # SpeechToTextManager, TextToSpeechManager, VoiceConversationController
│ ├── ui-components/ # NexaDroidTheme, NexaDroidLogo, NeuralPulseOrb, ActionConfirmationDialog, KnowledgeGraphCanvas
│ └── feature-settings/ # AI Model Manager, Project & Task Manager, Settings & Privacy, System Activity Dashboard
├── backend/ # Python FastAPI service, REST + WebSocket hub, SQLAlchemy ORM, PostgreSQL DDL & pytest suite
├── website/ # Public showcase website (GitHub Pages) + brand logo (website/assets/logo.png)
├── config/ # Environment variable template (.env.example)
├── docs/ # Architecture, API, Database Schema, Build & Security guides
└── docker-compose.yml # FastAPI + PostgreSQL 16 containerized stack
Quick Start
1. Install Android APK (Fastest)
Download app-debug.apk directly from the NexaDroid v1.0.0 Release on an Android 8.0+ (API 26+) device.
2. Open & Build in Android Studio
git clone https://github.com/yashab-cyber/NexaDroid.git
cd NexaDroid/android
./gradlew testDebugUnitTest assembleDebug
Or open the android/ directory directly in Android Studio and run the app configuration (minSdk 26, targetSdk 34).
3. Run the FastAPI Backend (Optional Cloud Sync)
Zero-Config Local Mode (SQLite):
cd backend
cp ../config/.env.example .env
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
Production Mode (Docker + PostgreSQL 16):
docker compose up --build
In the Android app under Settings & Privacy, set Backend URL to http://10.0.2.2:8000 (emulator) or your LAN/HTTPS backend host.
Testing & Verification
- Android Unit Tests & APK Build:
Verified 5/5 Gradle unit test suites passing (cd android && ./gradlew testDebugUnitTest assembleDebugTextUtilsTest,PrivacyPolicyGuardTest,EmbeddingEngineTest,IntentActionParserTest,LocalInferenceEngineTest) and clean APK assembly (app-debug.apk). - Backend Integration & WebSocket Tests:
Verified 5/5 pytest integration tests passing across health/models, memory/knowledge-graph RAG chat, screen consent gating, automation confirmation gating, projects, privacy wipe, and WebSocket streaming.cd backend && pytest -v
Security & Privacy Guarantees
- Zero Covert Screen Capture:
ScreenCaptureServiceactivates only on explicit user action with a visible OS foreground notification. - No Password Inspection:
NexaAccessibilityServicediscards password nodes (isPassword == true) and never persists screen text automatically. - Confirmation-Gated Actions: Sensitive automation actions require explicit confirmation in
ActionConfirmationDialogand cannot execute without authorization. - Local-First Defaults: Cloud screen analysis is disabled (
false) by default; sensitive memories and API keys are AES-256 encrypted locally.
Documentation
- Architecture Guide
- REST & WebSocket API Reference
- Database Schema Reference
- Build & Configuration Guide
- Security & Privacy Architecture
Author & Connect
- Creator: Yashab Alam (
yashab-cyber) - X (Twitter): @yashabcyber
- Website: https://yashab-cyber.github.io/NexaDroid/
Explorer des projets similaires
Chargement…