AI-First System Layer for Android
Querty-OS is an Android-based AI-first system layer (not a ROM) where a local administrator AI serves as the primary interface. It enables voice/text/camera control, automation, multi-OS workflows (Android, Linux, Windows apps), safe updates, and rollback — strictly on user command.
- Quick Start Guide - Get started in 5 minutes
- Termux Setup Guide - Development setup for Android Termux users
- Sandbox Setup - Test in virtual environments (Docker, QEMU, Android Emulator)
- Device Deployment - Install on Poco X4 Pro 5G
- Quick Reference - All commands in one place
- Architecture - System design and verification
- Contributing - Development guidelines
Querty-OS transforms your Android device into an intelligent, autonomous system capable of:
- Running a local LLM for on-device AI processing
- Supporting both deterministic (step-bound) and creative AI modes
- Handling multi-modal input (voice, text, camera)
- Performing agent-based automation tasks
- Controlling Android, Linux (chroot), and Windows apps (Wine)
- Managing network connectivity (internet on/off)
- Executing boot-switch scripts for system customization
- Maintaining last-known-good snapshots with rollback capability
Querty-OS/
├── core/ # Core system components
│ ├── ai-daemon/ # System AI daemon (starts on boot)
│ ├── llm-service/ # Local LLM service (deterministic & creative modes)
│ ├── input-handlers/ # Voice, text, and camera input processing
│ ├── agent-automation/ # Agent-based task automation
│ ├── os-control/ # Android, Linux, and Wine control modules
│ ├── network-manager/ # Network connectivity management
│ └── snapshot-system/ # Snapshot creation and rollback
├── config/ # System configuration files
├── scripts/ # System scripts
│ ├── boot/ # Boot initialization scripts
│ └── utils/ # Utility scripts
├── docs/ # Documentation
└── libs/ # Shared libraries
If you're developing on Android using Termux, follow our dedicated guide:
TERMUX_SETUP.md - Complete Termux setup with copy-paste commands
Quick Termux setup:
# Install dependencies
pkg update && pkg upgrade -y
pkg install -y python git make
# Clone and setup
git clone https://github.com/Sharmapank-j/Querty-OS.git
cd Querty-OS
# Install dev dependencies (REQUIRED before running tests!)
make install-dev
# Run tests
make testFor desktop/laptop development:
# Clone repository
git clone https://github.com/Sharmapank-j/Querty-OS.git
cd Querty-OS
# Install development dependencies (REQUIRED!)
make install-dev
# Or manually: pip3 install -r requirements-dev.txt && pip3 install -e .
# Run comprehensive sandbox tests
bash virtualization/sandbox/test-sandbox.sh
# Expected: ✓ All tests passed! (18/18)Sandbox Options:
- Docker - Fastest, recommended for development
- QEMU/KVM - Full system virtualization
- Android Emulator - Android-specific testing
See SANDBOX_SETUP.md for complete virtualization guide.
Complete step-by-step guide: docs/POCO_X4_PRO_DEPLOYMENT.md
Quick overview:
- Unlock bootloader (
⚠️ erases all data) - Install TWRP recovery
- Create comprehensive backups
- Setup tri-boot (Android/Linux/Windows)
- Install Querty-OS
- Test and create snapshots
# Docker quick start
docker-compose up querty-os
# System dashboard
python3 scripts/dashboard.py
# Run all tests
make test
# View logs
tail -f /var/log/querty-ai-daemon.logSee SETUP_QUICK_REFERENCE.md for all commands.
The system AI daemon starts on boot and serves as the central intelligence layer:
- Initializes at system boot
- Manages all AI operations
- Coordinates between different system components
- Maintains system state and context
On-device large language model with dual modes:
- Deterministic Mode: Step-bound execution with predictable, reproducible outputs
- Creative Mode: Enhanced creativity and flexibility for complex tasks
- Voice Input: Speech recognition and processing
- Text Input: Command-line and text-based interactions
- Camera Input: Visual scene understanding and image processing
Autonomous agent system capable of:
- Task planning and execution
- Multi-step workflow automation
- Context-aware decision making
- Learning from user preferences
- Android Control: Native Android app and system control
- Linux Control: Chroot environment for Linux applications
- Windows Apps: Wine integration for Windows application support
- Toggle internet connectivity on/off
- Per-app network control
- VPN and proxy support
- Offline mode optimization
- Custom boot initialization
- System configuration on startup
- Service orchestration
- Health checks and diagnostics
Safety-first update system:
- Automatic snapshot creation before changes
- Last-known-good configuration tracking
- One-click rollback capability
- Incremental snapshot support
python3 -m pip install -r requirements.txt
python3 -m pip install --no-build-isolation -e .Run the host-side verifier to confirm files, tools, and device state before flashing steps:
bash devices/poco-x4-pro-5g/scripts/fresh_mirom_setup.shThen continue with the full deployment playbook in docs/POCO_X4_PRO_DEPLOYMENT.md.
Use the interactive dashboard and daemon entrypoint:
python3 scripts/dashboard.py
querty-daemonQuerty-OS is designed with privacy as a core principle:
- All AI processing happens locally on-device
- No cloud dependencies for core functionality
- User data never leaves the device without explicit consent
- Transparent operation with full user control
See LICENSE for details.
AI > Android > Linux > Windows
Querty-OS enforces a strict resource allocation priority:
- AI (Highest): 40% default allocation - LLM models, cache, embeddings
- Android: 35% allocation - Native apps and system services
- Linux: 15% allocation - Chroot environment and packages
- Windows (Lowest): 10% allocation - Wine prefix and applications
See docs/ERROR_HANDLING.md for comprehensive priority system documentation.
make help # Show all commands
make test # Run all tests
make test-cov # Run tests with coverage
make lint # Run all linters
make format # Format code
make ci # Run all CI checks- 23+ unit tests for core modules
- Integration tests for system components
-
80% code coverage target
- Run with:
make test
- Black code formatting (100 char line)
- isort import sorting
- flake8 linting
- mypy type checking
- bandit security scanning
- Pre-commit hooks available:
make pre-commit
See CONTRIBUTING.md for development guidelines.
- Initial architecture design
- Priority system implementation (AI > Android > Linux > Windows)
- Custom exception hierarchy
- Testing infrastructure (pytest, 23+ tests)
- CI/CD pipeline (GitHub Actions)
- CI/CD workflows (Python, Makefile, Docker, CodeQL)
- Development tools (Makefile, dashboard, validation)
- Comprehensive documentation (5 guides)
- Code quality tools (black, isort, flake8, mypy, bandit)
- Core AI daemon implementation
- LLM service integration
- Input handler modules
- Agent automation framework
- OS control modules
- Network management
- Snapshot system
- Boot script system
- Performance optimization
- Device deployment
For questions, issues, or contributions, please visit our GitHub repository.