JunWan666/astrbot-for-android

在 Android 手机上本地部署和管理 AstrBot,支持 QQ 官方机器人与微信官方 ClawBot、PRoot Ubuntu、终端任务、WebUI、日志和备份恢复,无需 Root。

What is AstrBot for Android?

AstrBot for Android is an Android app that lets you run AstrBot (a chatbot framework) and NapCat (a QQ bot service) directly on your phone, without needing root access. It bundles a complete Linux environment (PRoot Ubuntu) inside a single APK, so you can install, manage, and use these services locally on your device.

The app provides a native Android interface (built with Kotlin and Jetpack Compose) to control everything: starting/stopping services, monitoring status, viewing logs, backing up data, and updating components. It also includes built-in web views for the AstrBot and NapCat admin panels, so you can log in to QQ, configure AI models, and manage plugins right from your phone.

Current version: 1.4.1 (APK size ~1 GiB)

Key Features

  • Dual service management – Start/stop AstrBot and NapCat independently or together, and see their running, connection, and error states.
  • Built-in admin panels – Open the original WebUIs inside the app with pre-filled credentials; also works in an external browser.
  • Local QQ connection – Automatically sets up a OneBot connection between NapCat and AstrBot on your phone (default ws://127.0.0.1:6199/ws), while keeping custom settings.
  • LAN access – Optionally expose both WebUIs to your local network, with copyable addresses and retained authentication.
  • Persona library – Includes 4 curated community presets, plus support for adding, deleting, searching, and switching your own personas.
  • Real-time logs – View service logs with auto-scroll, pause, copy, and export (with sensitive data masking).
  • Resource overview – See memory usage of the app and its managed processes, plus storage details.
  • Backup & restore – Local snapshots, portable backups, and rollback on updates; old automatic snapshots are cleaned up.
  • SSH extension – Pre-installed, on-demand SSH server with password/port/LAN settings.
  • Ubuntu terminal – Built-in interactive terminal with multiple sessions, smooth scrolling, and clipboard support.
  • Linux QQ desktop – Optional installation of the ARM64 QQ client with a lightweight desktop environment; supports embedded use and optional LAN access.
  • cpolar tunnel – Optional extension for exposing services via cpolar's official WebUI, with default tunnels for SSH, AstrBot, and NapCat.
  • DeepSeek Harness – Optional setup of a Node.js environment and official DeepSeek workbench, with staged installation progress.
  • Custom web shortcuts – Save HTTP/HTTPS links with auto-fetched icons, and remember zoom levels per page.
  • Permission management – Guides for Shizuku (offline install), background process limits, and battery optimization whitelist.
  • Android device access – Optional screen reading, clicking, and input via accessibility tools, plus shared directory file exchange.
  • Bilingual UI – Supports Simplified Chinese and English.
  • Update management – Check for app updates, download and verify inside the app, or use an external browser; AstrBot and NapCat have separate update paths.

How It Works

The native Android app handles the user interface, foreground services, and process management. AstrBot and NapCat run inside a PRoot Ubuntu environment on the phone. By default, QQ messages flow through NapCat → OneBot → AstrBot, which then calls the AI model you configure. Optional extensions (SSH, terminal, cpolar, etc.) are managed separately, and device access features are only enabled when you explicitly grant permissions.

Getting Started

  1. Download the APK from the Releases page and install it on an ARM64 Android phone (Android 8.0+).
  2. Open the app and complete the initial environment setup (the APK includes everything needed – no extra downloads).
  3. Tap "Start All" and wait for AstrBot and NapCat to become ready.
  4. Open the NapCat admin panel to log in to QQ, then configure your AI model, platform, and plugins in the AstrBot panel.
  5. Follow the in-app guidance for background permissions, and optionally use personas, backups, SSH, or cpolar.

Requirements:

  • Android 8.0 / API 26 or higher, ARM64 architecture, no root needed.
  • APK size ~1 GiB; additional space needed for runtime environment, QQ data, and backups.
  • Network connection for QQ login, model calls, and updates.

Optional: SnowLuma Manual Deployment

SnowLuma is an alternative QQ interoperability project that provides a OneBot v11 interface. The README includes a tutorial for manually deploying SnowLuma on your phone using the app's generic Ubuntu environment, desktop, and QQ client. This is a preview feature; the app does not bundle SnowLuma's program, and you must obtain it yourself. The default approach remains NapCat.

Building from Source

  • Requires JDK 17, Android SDK 35, NDK, and Python 3.11+.
  • Compile the app with ./gradlew.bat :core:compileKotlin :app:compileBootstrapReleaseKotlin.
  • For a full APK, you need to prepare runtime images, native resources, and signing keys (these are not in Git). Use build.bat (Windows) or python3 -B tools/build_release.py (other systems).

Updates

  • Check for updates via Settings → About → Check Update.
  • The app can download, verify, and install updates internally, or you can use an external browser.
  • AstrBot and NapCat have separate update mechanisms.
  • The update channel uses GitHub Releases and a signed updates branch; NapCat downloads its official shell package directly.

License

Original code is MIT-licensed (© 2026 JunWan666). Third-party components follow their own licenses (see NOTICE and THIRD_PARTY_NOTICES).

For full details, see the README and linked documentation.

Related

  • Project
  • Project
  • Project
  • Project