Skip to content

memohai/Autofish

Repository files navigation

Autofish

English | 中文

Autofish is an Android device control service with a deterministic CLI client (af).

Quickstart

1) Install app from GitHub Releases (APK)

Download and install the latest APK from Releases

Open the app, then:

  1. Enable accessibility permission for Autofish.
  2. Enable Shizuku support
  3. In Home page, turn on Service.
  4. Note the service connection info shown in app:
    • Device IP
    • Port
    • Token

2) Install af CLI from npm

npm i -g @memohjs/af

Set environment variables:

export AF_URL="http://<DEVICE_IP>:<PORT>"
export AF_TOKEN="<TOKEN>"
export AF_DB="./af.db"

Run first commands:

af health
af observe top
af observe screen --max-rows 80 --field id --field text --field desc --field resId --field flags
af observe refs --max-rows 80
af act tap --by ref --value @n1
af act tap --by text --value "Settings"
af act tap --xy 540,1200

Build from source requirements (optional)

If you want to build APK or CLI from source, prepare:

  • JDK 17
  • Android SDK API 36
  • Rust toolchain (cargo)
  • just

Local source build example:

just build
just install

More docs: