Drawing № 01 — autonomous Android AI coding assistant · Unified Permission Manager & Comprehensive Onboarding (Storage, Accessibility, Overlay, Push Notifications, Shizuku ADB, 2FA Listener, Battery Optimization) · Secure Credential Vault & Opt-In Auto-Unlock (wake_device, unlock_device, set_display_saver) · Split-Brain Execution & Agentic Routing (execute_local_shell & execute_container_shell) · Container Environment Context telemetry · Dual-Runtime Architecture (Node.js & Python 3.11) · Universal OAuth Interceptor (Chrome Custom Tabs & Loopback) · Local IPC WebSocket Bridge (127.0.0.1:8765) · Advanced Gesture Controller (Multi-Touch & Drag) · Action Memory & workflow recording (RAG) · Shizuku API (ADB privileges without root) · Set-of-Mark (SoM) vision processing · Intent Crafter & deep links · system state & sensor API · advanced clipboard synchronization · Quick Settings Tile · Privacy Guard & FLAG_SECURE protection · 2FA notification interception · hardware interrupt killswitch · low latency dual-model routing
A real autonomous coding assistant on Android.
Comprehensive Onboarding and unified PermissionHelper orchestrating all Android system privileges: Storage, AccessibilityService, Floating Chat Overlay, POST_NOTIFICATIONS, Shizuku binder IPC, 2FA listener, and battery optimization bypass. Hardware-backed Secure Credential Vault with Android KeyStore MasterKey (AES-256 GCM) powering opt-in unattended device wake and unlock (wake_device, unlock_device) with RAM-zeroing secret destruction and OLED burn-in protection (set_display_saver). Dual-tier Split-Brain execution load balancer autonomously routing operations between local on-device tools and remote root Linux containers. Dual-Runtime architecture hosting official AI CLIs natively on Android via Node.js and Chaquopy Python 3.11.
you › run nmap scan across subnet and process large video frames with ffmpeg
zl-android › synced /sdcard/zerocode/workspace to ZeroLog cloud container #12 (/work). dispatched container_exec to remote cloud linux instance. completed in 4.2s without draining mobile battery.
you › does local python run on device?
zl-android › yes. execute_python runs locally via Chaquopy for fast device-specific scripts; container_exec offloads heavy tasks to cloud containers.
Sheet 01 — the architecture
Chaquopy, WorkManager Sync, and Cloud Container Bridge.
The Android client combines on-device automation with remote cloud execution. It bundles native subsystems orchestrated by an autonomous agentic loop.
Unified Permission Manager & Onboarding
Comprehensive step-by-step setup wizard and in-app permission hub powered by PermissionHelper. Monitors and manages all seven core Android subsystems: All Files Access (MANAGE_EXTERNAL_STORAGE), ZeroCode AccessibilityService, SYSTEM_ALERT_WINDOW (Floating Chat & OLED display saver), POST_NOTIFICATIONS, Shizuku binder IPC (uid=2000 ADB shell), 2FA/OTP NotificationListenerService, and battery optimization whitelist.
Secure Credential Vault & Opt-In Auto-Unlock
Hardware-backed cryptographic vault with Android KeyStore MasterKey (AES-256 GCM) and EncryptedSharedPreferences. Defaults to strictly disabled (opt-in only). Enables unattended wake_device (PowerManager wake lock) and unlock_device (dual-path Shizuku/root keyevent injection vs. Accessibility gesture) for automated overnight tasks. Immediate RAM zeroing wipes secrets from memory buffers. Features set_display_saver with 1% brightness and pure black (#000000) overlay for OLED burn-in protection.
Split-Brain Execution & Agentic Routing
Intelligent dual-tier execution load balancer. Autonomously routes tasks between execute_local_shell (Android device settings, apps, notifications, clipboard, display interactions) and execute_container_shell (remote ZeroLog Linux container with root privileges, ffmpeg transcoding, Docker orchestration, nmap scanning, heavy scraping). Includes live Container Environment Context awareness (uname, CPU cores, toolchain discovery) and strict user-override precedence.
Dual-Runtime Architecture (Node.js & Python 3.11)
Two isolated on-device runtimes executing official AI CLIs natively on Android. Python 3.11 via Chaquopy handles local device automation and AI wrappers; Node.js/V8 runs NPM packages like claude-code and Codex CLIs with full ToS compliance.
Local IPC WebSocket Server (127.0.0.1:8765)
Secure loopback IPC server binding strictly to 127.0.0.1. Standardizes event streaming between Node.js, Python, and the Jetpack Compose overlay with real-time stdout/stderr capture, tool execution multiplexing, and prompt injection.
Universal OAuth Interceptor
Interception bridge for CLI browser login flows. Monkey-patches Node open and Python webbrowser.open, launches authentication in official Chrome Custom Tabs, and captures tokens seamlessly via loopback HTTP redirects (localhost:3000/callback) or deep links (zerocode://oauth/callback).
Advanced Gesture Controller (Multi-Touch & Drag)
Universal Accessibility adapter for complex physical gestures. Supports drag_and_drop(startX, startY, endX, endY, duration_ms) with initial long-press hold via stroke continuation, pinch_zoom(centerX, centerY, scale_factor) dispatching concurrent multi-touch strokes for maps and photos, and exact screenWidth/screenHeight geometry in inspect_ui for relative coordinate calculation.
Set-of-Mark (SoM) Vision Processing
Immunizes the agent against apps lacking text labels. inspect_ui generates absolute Rect coordinates and annotates live screenshots with semi-transparent bounding boxes and numbered badges. The multimodal LLM visually identifies and clicks target icons (search magnifier, share arrows, navigation icons) via box IDs directly.
Intent Crafter & Deep Link Manager
Native tool fire_intent directly dispatches Android Intents to jump straight into system settings (WLAN, Bluetooth, application info) or open URLs and app deep links without slow UI menu navigation.
System State & Sensor API
Native tool get_device_state provides comprehensive JSON telemetry for battery percentage, charging state, power source, network type (WLAN/cellular/metered), and audio volume levels. Autonomous guardrails abort heavy tasks when battery is below 15% without a charger.
Advanced Clipboard Manager
Native tools get_clipboard_text and set_clipboard_text offer thread-safe system clipboard synchronization. Instantly passes large blocks of code and multi-line strings into targeted input fields without slow character-by-character typing.
Quick Settings Tile
Instant control center integration via Android TileService. Single-tap toggles the floating AI assistant overlay active or inactive from anywhere. Long-pressing the tile opens the settings screen directly to manage BYOK keys and Privacy Guard blacklists.
Privacy Guard (Sensitive Data Protection)
Automatic detection for protected windows (WindowManager.LayoutParams.FLAG_SECURE) blacking out screen capture for banking and authentication apps. Blocks inspect_ui and screen dumping when active. Includes configurable package blacklist (Bitwarden, PayPal, Revolut, TWINT, banking apps) in settings with red lock banner in floating overlay.
Action Memory & Workflow Recording (RAG)
Long-term procedural memory for recurring UI automation. Stores successful accessibility action sequences into a local SQLite database (save_workflow). Recalls macros (search_workflows) to execute multi-step tasks at maximum speed without repeated UI tree inspection.
Notification Interception & 2FA Extraction
Tool read_recent_notifications via Android NotificationListenerService. Autonomously intercepts incoming SMS and email verification notices, extracts 4-to-8 digit OTP/2FA codes via regex parsing, and types them into login fields using accessibility_action without leaving the active screen.
Hardware Interrupt (Emergency Killswitch)
Physical safety killswitch. Monitors simultaneous or rapid successive presses of Volume Up and Volume Down buttons (<300ms window) via AccessibilityService key filtering. Instantly stops Chaquopy scripts with execution traces, aborts active agentic coroutines, suspends all pending gestures, and triggers haptic vibration feedback.
Shizuku API Integration
Bridges the middle privilege tier between standard user shell and root. Executes ADB-level shell commands via Shizuku binder IPC (uid=2000), unlocking dumpsys telemetry, logcat capture, and direct am force-stop without root.
Low Latency & Dual-Model Routing
Under-1-second response times for UI interactions. Dynamic Fast-Path routes touch, navigation, and simple questions to ultra-fast Llama 3 models via Groq API; complex planning and code generation route to Claude 3.5 Sonnet. Asynchronous token-by-token Kotlin Flow streaming delivers immediate character rendering on the floating overlay.
Chaquopy Python 3.11
Embedded Python runtime packaged directly within the APK. Standard libraries, script execution, stdout and stderr capture, and isolated memory spaces without external dependencies.
Real-Time Workspace Sync
Background worker via Android WorkManager synchronizing /sdcard/zerocode/workspace with ZeroLog cloud containers (/work). Automated FileObserver triggers delta sync on file changes.
Cloud Container Exec Bridge
Tool container_exec executes heavy commands (ffmpeg, nmap, large builds, web scraping) directly inside remote cloud Linux instances via WebSocket terminal and task runner to save phone battery.
BYOK & Hardware Encryption
Bring Your Own Key support via 2-click clipboard setup. Stored locally with MasterKey AES-256 GCM in EncryptedSharedPreferences. Dynamically routed into all agentic LLM loops.
Root-Aware Progressive Enhancement
PrivilegeManager dynamically adapts tool capabilities. Unprivileged by default; auto-leverages root privileges for direct shell commands and background process control when available.
Floating Chat Overlay
Non-intrusive SYSTEM_ALERT_WINDOW chat bubble and overlay. Draggable floating trigger, bottom-third expandable interface, and automated UI text inspection for real-time app troubleshooting.
AccessibilityService Automation
OS-level system automation. Live view hierarchy inspection, node clicking, coordinate tapping, scrolling, physical gestures, and global hardware actions including Back, Home, and Recents.
Autonomous Agentic Loop
Multi-turn tool-use loop with FileOperator, CodeExecutor, DeviceController, HybridTools, and RemoteContainerBridge. Receives natural language goals and calls required tools sequentially.
ZeroLog Chat View
Native mobile interface matching the ZeroLog web app. Collapsible tool cards, dark palette, brand monogram adaptive icon, and strictly zero emojis across the interface.
Sheet 02 — device telemetry
Verified release build, signed and test-backed.
Built with Gradle 8.14.3 and Android SDK 35. Every release undergoes unit testing for tool calling, execution safety, and APK signature integrity.
Sheet 03 — installation
Three steps from download to autonomous run.
Simple setup with progressive enhancement. Download the package, grant storage access, and configure your preferred API key or ZeroLog cloud account.
1. Install APK
Download the signed release package (54.3 MB). Confirm installation from your browser or file manager when prompted by Android package installer.
2. Grant Storage
Open App Info and grant All files access under Special app access. This allows ZeroCode to manage /sdcard/zerocode/workspace and synchronize with cloud containers.
3. Enable Accessibility
Enable the ZeroCode Accessibility Service in Android Settings. This grants the autonomous loop permissions to inspect UI elements and navigate apps.
4. Start Coding
Launch ZeroCode. Run local Python scripts, offload heavy tasks to cloud containers with container_exec, and keep your workspace synchronized automatically in the background.
Autonomous coding on your phone.
No root required, no cloud latency for local execution. Download the release APK directly to your device.