Skip to content

iFleey/Futon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Futon

English | 中文

Futon

Futon

Run on Futon. Sleep on your Futon

An Android AI Agent (toy project) combining a native C++ daemon with AI capabilities.

Release License Android Architecture

Introduction

Futon is an AI Agent for Android that works entirely on-device, supporting both cloud providers and local models.

Futon uses a dual-layer architecture: a low-level daemon handles screen capture, inference engine, and input injection; the client app provides the user interface and AI service integration.

Screenshots

Home Settings AI Provider
Home Settings AI Provider
Local Model SoM Perception Integration
Local Model SoM Perception Integration

Getting Started

Important

Please note:

Futon is a proof of concept and currently lacks the stability, security audits, and long-term support required for production use. DO NOT use the generated binaries in any production environment or mission-critical systems.

Futon currently and will only support rooted devices.

1. Install the App

Download the latest APK from Releases and install it.

2. Grant ROOT Permission

On first launch, the app will request ROOT permission to deploy the daemon.

3. Deploy the Daemon

The app will automatically deploy a ROOT module to /data/adb/modules/futon_daemon, which includes:

  • SELinux policy patches
  • Daemon binary

4. Configure Security Keys

The app will automatically configure security keys. As a ROOT-level application, Futon implements extensive security mechanisms. See Security Model for details.

5. Configure AI Provider or Local Model

Go to the settings page to configure your AI provider's API key, or install a local model based on your device capabilities.

Build Guide

Requirements

Tool Version
JDK 21
Android SDK API 36
NDK r29
CMake 3.22+
Gradle 9.2+

Building the App

# Debug build
./gradlew assembleDebug

# Release build (requires keystore.properties)
./gradlew assembleRelease

# Run unit tests
./gradlew test

Tip

In Release mode, the daemon performs signature verification on the client app. You can bypass this by adding --skip-sig-check when starting the daemon (Debug builds automatically include this flag).

Building the Daemon

cd daemon
mkdir build && cd build

cmake -B build \
    -DCMAKE_BUILD_TYPE=Release \
    -DANDROID_ABI=arm64-v8a \
    -DANDROID_PLATFORM=android-30

make -j$(sysctl -n hw.ncpu)

Note

The daemon binary is automatically embedded in the APK through the deployment contract system.

To ensure compatibility between the client app and daemon versions, both are validated against deployment_rules.json.

For details on the mechanism and workflow, see docs/deployment-contract.md.

Quick Debugging

Daemon debugging can be done without relying on a ROOT manager. The following steps use adb shell:

Tip

Grant shell ROOT permission in your ROOT manager for debugging.

cd daemon/build

# Kill the running daemon
adb shell su -c "pkill -9 futon_daemon"

# Push to cache directory
adb push futon_daemon /data/local/tmp/

# Replace with the new daemon
adb shell su -c "cp /data/local/tmp/futon_daemon /data/adb/futon/futon_daemon"

# Grant daemon permissions
adb shell su -c "chmod 755 /data/adb/futon/futon_daemon"

Signing Configuration

Create a keystore.properties file:

storeFile=path/to/your.keystore
storePassword=your_store_password
keyAlias=your_key_alias
keyPassword=your_key_password

Contributing

Please refer to CODE_OF_CONDUCT.md and CONTRIBUTING.md for:

  • Code of conduct
  • Code style guidelines
  • Submission process
  • Attribution rules
  • Copyright ownership

Acknowledgments

Special thanks to:

  • @Caniv

    Participated in Futon's icon design and created the current icon.

  • 胡斯凯

    Participated in Futon's early icon design.

  • PPOCRv5-Android

    Futon is based on the PPOCRv5 model with extensive custom quantization and packaging. See PPOCRv5-Android published by Fleey for the model and specific applications.

  • PaddleOCR

    PP-OCRv5 model

  • LiteRT

    On-device ML runtime

  • Abseil

    C++ common libraries

License

Source code is licensed under GNU General Public License v3.0.

Futon - Android Automation Daemon, Futon Daemon Client, ...
Copyright (C) 2025 Fleey

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Important

Trademark and Logo Policy

The Futon name and logo are protected assets and are NOT covered by the GPLv3 license.

  • Forked projects MUST remove official branding assets, regardless of commercial use
  • Delete the branding/official/ directory
  • Change the app name and package name
  • Update the identifiers in daemon/core/branding.h

See COPYRIGHT and branding/README.md for details.

About

An Android AI Agent (toy project) combining a native C++ daemon with AI capabilities.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published