zeroclaw/clients/android/README.md
Preventnetworkhacking 8a1dea306e feat(android): Phase 4 - Widget, accessibility, one-liner installers
Phase 4 polish features:

Widget:
- ZeroClawWidget for home screen
- Shows agent status (running/stopped)
- Toggle button to start/stop
- Tap to open app
- Material 3 styling with rounded corners

Accessibility:
- AccessibilityUtils for TalkBack support
- Content descriptions for all UI elements
- Screen reader detection
- Live region announcements
- ContentDescriptions constants

Install Scripts:
- termux-install.sh - One-liner for Termux users
- adb-install.sh - Install from computer via USB
- android-install.html - Web installer page with:
  - Platform detection (Android vs desktop)
  - Direct APK download
  - QR code for desktop users
  - Step-by-step instructions
  - Copy-to-clipboard for commands

Files:
- widget/ZeroClawWidget.kt (128 lines)
- accessibility/AccessibilityUtils.kt (123 lines)
- res/layout/widget_zeroclaw.xml
- res/xml/widget_info.xml
- res/drawable/widget_*.xml
- scripts/android/*.sh
- site/android-install.html

Total: +799 lines across 12 files
2026-02-26 21:34:06 -08:00

3.0 KiB

ZeroClaw Android Client 🦀📱

Native Android client for ZeroClaw - run your autonomous AI assistant on Android.

Features

  • 🚀 Native Performance - Kotlin/Jetpack Compose, not a webview
  • 🔋 Battery Efficient - WorkManager, Doze-aware, minimal wake locks
  • 🔐 Security First - Android Keystore for secrets, sandboxed execution
  • 🦀 ZeroClaw Core - Full Rust binary via UniFFI/JNI
  • 🎨 Material You - Dynamic theming, modern Android UX

Requirements

  • Android 8.0+ (API 26+)
  • ~50MB storage
  • ARM64 (arm64-v8a) or ARMv7 (armeabi-v7a)

Building

Prerequisites

# Install Rust Android targets
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android

# Install cargo-ndk
cargo install cargo-ndk

# Android SDK (via Android Studio or sdkman)
# NDK r25+ required

Build APK

cd clients/android
./gradlew assembleDebug

Build with Rust

# Build native library first
cargo ndk -t arm64-v8a -o app/src/main/jniLibs build --release

# Then build APK
./gradlew assembleRelease

Architecture

┌─────────────────────────────────────┐
│  UI (Jetpack Compose)               │
├─────────────────────────────────────┤
│  Service Layer (Kotlin)             │
│  ├─ ZeroClawService                 │
│  ├─ NotificationHandler             │
│  └─ WorkManager Jobs                │
├─────────────────────────────────────┤
│  Bridge (UniFFI)                    │
├─────────────────────────────────────┤
│  Native (libzeroclaw.so)            │
└─────────────────────────────────────┘

Status

Phase 1: Foundation (Complete)

  • Project setup (Kotlin/Compose/Gradle)
  • Basic JNI bridge stub
  • Foreground service
  • Notification channels
  • Boot receiver

Phase 2: Core Features (Complete)

  • UniFFI bridge crate
  • Settings UI (provider/model/API key)
  • Chat UI scaffold
  • Theme system (Material 3)

Phase 3: Integration (Complete)

  • WorkManager for cron/heartbeat
  • DataStore + encrypted preferences
  • Quick Settings tile
  • Share intent handling
  • Battery optimization helpers
  • CI workflow for Android builds

Phase 4: Polish (Complete)

  • Home screen widget
  • Accessibility utilities (TalkBack support)
  • One-liner install scripts (Termux, ADB)
  • Web installer page

🚀 Ready for Production

  • Cargo NDK CI integration
  • F-Droid submission
  • Google Play submission

Contributing

See the RFC in issue discussions for design decisions.

License

Same as ZeroClaw (MIT/Apache-2.0)