ShizuStore

NexaFlow

Alaa91H

v3.92.4 · GitHub

Download APK
Automation Android 11+ 1 week ago MIT
329 ShizuStore
2.7k GitHub
41 Stars
2 MB Size

More about this app

Context-aware Android automation engine combining triggers, constraints and actions, with Shizuku execution for privileged device controls.

NexaFlow

Android automation that proves what it did.

Triggers, conditions, ordered actions and exit behaviour — every device change is read back and verified, so a task reports what actually happened instead of what was requested.

Latest release License: MIT Platform Kotlin Telegram

Download · Channel · Community · Documentation


Table of contents

Why NexaFlow

Principle What it means in practice
Verified execution State-changing actions are expressed as precise operations (WIFI_SET_STATE, DND_GET_STATE, …). After a change, NexaFlow reads the state back and compares it with the request. A transport timeout is reconciled by observation, never guessed.
Capability-adaptive One router chooses the least-privileged strategy available on the device: public Android API → settings permission → Shizuku → root → documented Settings hand-off. No blind fallbacks after a possible side effect.
Auditable by default Every run has an activity record, a diagnostics view for invalid configuration, and exportable evidence. Failures are reported as failures; success is never assumed.
Private on-device Automations, credentials, agent memory and history stay on the phone. No analytics or advertising SDK. API keys are encrypted at rest and never rendered back into UI state.
Extensible A plugin SDK, an in-app agent platform, a local REST/MCP gateway and a Wear OS companion share the same automation engine.

Screenshots

Task list with per-task switches
Tasks — enable, search and inspect
Trigger picker, Apps category
Triggers — grouped and searchable
Trigger picker, Device category
Device events — charger, headset, DND
Action picker, Display category
Actions — display controls
Action picker, Sound category
Sound — volume, ringer, DND
Action picker, Notifications category
Calls & SMS — reply, block, silence
Settings, Automation group expanded
Settings — agents, permissions, history
Quick settings tile configuration
Quick Settings — four task tiles

Ink Glass interface

The current design language uses layered ink surfaces, a translucent dock and Material You colour that follows the system wallpaper. Every layout is checked at font scale 200% and in right-to-left Arabic.

Launch screen
Launch
Automation builder
Builder
Picker with a selection
Picker
Settings
Settings
Theme selection
Themes
Font scale 200%
Font scale 200%
Dynamic colour scheme
Dynamic colour
Arabic dashboard
Arabic RTL
English dashboard
English dashboard
Picker with wrapped chips
Wrapped chips
Battery trigger with options below
Editor options
Volume trigger sheet
Trigger sheet

Routine card states

The dashboard card has one expansion rule: at most one card is open at a time. The reviewed set covers disabled, enabled, waiting, running and failed, in both languages and across font scales.

Show all routine card states
Enabled, collapsed
Enabled
Disabled, collapsed
Disabled
Waiting, expanded
Waiting
Running, collapsed
Running
Running, expanded
Running — detail
Failed, collapsed
Failed
Failed, expanded
Failed — detail
Waiting at font scale 130%
Waiting — 130%
Waiting, light theme
Waiting — light
Enabled, Arabic
Enabled — AR
Disabled, Arabic
Disabled — AR
Waiting, Arabic
Waiting — AR
Running, Arabic
Running — AR
Running expanded, Arabic
Running detail — AR
Failed, Arabic
Failed — AR
Failed expanded, Arabic
Failed detail — AR

Features

Triggers

  • Time and schedules — one-off and recurring windows, day-of-week selection and explicit start/end times.
  • App and screen events — app opened or closed, screen on/off, unlock, rotation.
  • Device state — charger, headset, battery level, power saver, dark mode, media playback, volume, sound mode.
  • Connectivity — Wi-Fi, Bluetooth, mobile data, hotspot, NFC, VPN, USB and HDMI.
  • Communication — incoming SMS and calls, notification posted or removed.
  • Location and sensors — geofences, activity recognition, light, proximity, pressure, humidity, temperature and hinge sensors where the hardware exists.
  • Plugins and expressions — Tasker/MacroDroid-compatible plugin events and optional ANY/ALL rules with temporal history.

Conditions and flow control

Tasks can combine triggers with conditions, cooldowns and constraints. Flow control supports branches, wait/visit limits and workflow context, so a run can stop early, retry safely or hand data to a later step. Every decision is written to the run journal.

Actions

  • Display and sound — brightness (including adaptive), rotation, screen timeout, stay-awake, dark mode, stream volumes, ringer mode, Do Not Disturb, vibration and haptics.
  • Connectivity — Wi-Fi, Bluetooth, mobile data, hotspot, NFC, airplane mode and network mode.
  • Calls and messages — send SMS, reply to the sender, block or silence calls, reply to a caller, block notifications and post reminders.
  • Apps and media — launch or kill apps, open Play Store updates, media control and navigation.
  • Data — text, encoding, hashing, random values, decimal arithmetic, dates, JSON and arrays. Outputs feed later actions in the same run.
  • HTTP and webhooks — HTTPS requests with method, body, headers, timeout, retries and output path; authenticated local webhooks and revocable task links.
  • ROM settings — write supported system settings, Quick Settings tiles, status bar, lock screen, theme and Always-On display controls through the capability tier the device actually exposes.

Execution you can audit

  • One capability router — the least-privileged working strategy is chosen per operation; backend-specific actions require their exact provider, and Shizuku work needs its UserService connection.
  • Read-back verification — requested state and observed state are compared before a run is marked successful; uncertain outcomes are reconciled by observation.
  • History and diagnostics — per-run activity, configuration problem reports, blocked-call and SMS records, and exportable diagnostics.
  • Reliability controls — cooldowns, constraints, workflow context, visit limits and explicit failure reporting instead of silent success.

AI and agents

  • Bring your own provider — Gemini, OpenAI, Anthropic Claude, OpenRouter, Groq, Mistral, DeepSeek, xAI, OpenCode Zen, Ollama, LM Studio and any OpenAI-compatible endpoint.
  • Encrypted keys, real model discovery — the key is stored in the device vault, the provider is probed, and the account's own model list is loaded so you choose from what you actually have access to. Reasoning level is configurable per provider where the API supports it.
  • In-app chat with tools — the assistant can read status, inspect tasks and run approved automation tools; every tool call is bounded and visible.
  • Reusable agents — define instructions, allowed tools, approval policy, turn/tool/time/output/cost budgets and optional private notes. Agent memory is encrypted, expiring and scoped to one agent.
  • Local agent gateway — a loopback REST API and MCP endpoint with one-time pairing, scoped grants and an audit ledger. LAN exposure is opt-in and never enabled implicitly.

Plugins and the ecosystem

  • Plugin SDK — extend triggers, conditions and actions with compatible third-party plugins, with health and compatibility reporting.
  • Wear OS companion — the watch app mirrors task state and can trigger defined tasks.
  • Backup and sharing — full backup and single-task sharing. Imported tasks stay disabled for review and external execution tokens are stripped.
  • Widgets, Quick Settings and themes — home-screen widgets, four configurable QS tiles, Material You dynamic colour and a per-app language selector.

Interface

Eleven languages ship in the app: English, Arabic, German, Spanish, French, Hindi, Japanese, Portuguese, Russian, Turkish and Simplified Chinese. Translation completeness, placeholder parity and leftover English copy are checked on every change.

Project structure

NexaFlow is a multi-module Gradle build with strict module boundaries: the engine never imports feature code, and features depend on contracts rather than each other.

NexaFlow/
├── app/                    Application shell, Hilt graph, receivers, services
├── core/
│   ├── automation-engine/  Trigger evaluation, scheduling and task lifecycle
│   ├── execution/          Capability router, verified operations, hardened transport
│   ├── automation-control/ Commands, approvals and audit sink
│   ├── ai-runtime/         Provider adapters, model registry, conversation engine
│   ├── agent-api/          Local REST + MCP gateway and pairing
│   ├── agent-runtime/      Reusable agent definitions, budgets and runs
│   ├── agent-relay/        Paired-device relay contracts
│   ├── agent-security/     Grants, revocation and access policy
│   ├── capability-manager/ Capability discovery and availability
│   ├── rom-integration/    Neutral ROM capability tiers and settings bridge
│   ├── database/           Room schema, DAOs and migrations
│   ├── datastore/          Preferences, provider connections and runtime state
│   ├── plugin-sdk/         Public plugin protocol
│   ├── wear-protocol/      Phone ↔ watch message contracts
│   ├── ui-components/      Design system and shared composables
│   ├── common/ security/ logging/ compatibility/
├── domain/                 Pure models and use cases
├── data/                   Repositories, backup and import/export
├── feature/
│   ├── dashboard/          Routine cards and the home surface
│   ├── automations/        Task list and run history
│   ├── automation-builder/ Trigger, condition and action editors
│   ├── ai/                 Chat surface
│   ├── settings/           Providers, agents, permissions, plugins and updates
│   ├── history/ icons/ themes/ widgets/
├── wear/                   Wear OS companion
├── baseline-profile/       Baseline profiles for startup
├── macrobenchmark/         Startup and jank benchmarks
├── sample-plugins/         Reference plugin implementation
├── test-fixtures/          Shared test doubles and locale fixture
├── docs/                   Product and engineering reference
├── scripts/                Verification gates and release tooling
└── tools/                  Desktop agent bridge

Install

  1. Download NexaFlow-<version>.apk from the latest release.
  2. For a watch, also download NexaFlow-Wear-<version>.apk and sideload it to the Wear OS device.
  3. Install over an existing copy with the same signing identity; a different signer requires an uninstall.
  4. Grant permissions from the feature that needs them — NexaFlow never asks for everything at startup.

Release pages contain the two signed APKs. Provenance attestations are produced by the release workflow, and build logs are attached to the workflow run.

Build from source

./gradlew testDebugUnitTest assembleDebug
./gradlew detekt lintDebug
python3 scripts/auto_fix.py --check
python3 scripts/check_strings_parity.py
python3 scripts/audit_catalog_and_releases.py catalog

Install Android SDK platform 37 and point ANDROID_HOME (or local.properties) at it. The Gradle wrapper drives a Java 21 toolchain for the Robolectric suites, and dependency checksums are enforced. Release signing reads the NEXAFLOW_KEYSTORE_* and NEXAFLOW_KEY_* environment variables or ignored local keystore properties — never commit a private key.

Requirements and permissions

  • Android 8.0 (API 26) or newer; compiled and targeted at API 37.
  • Root and Shizuku are optional capability providers. Backend-specific actions require their exact provider, and Shizuku execution needs its UserService connection.
  • Some actions require a system role (default SMS app, call screening, accessibility) or a runtime permission; the UI states which one before you enable the action.
  • Exact alarms, background restrictions and OEM power management can delay or drop triggers. A foreground service improves reliability but does not guarantee uninterrupted execution.
  • Sensor triggers need the matching hardware; pressure, humidity, ambient temperature and hinge sensors are uncommon on phones.

Privacy and security

  • Automations, credentials and history stay on the device; the app has no analytics or advertising SDK.
  • AI keys are stored through the platform secure vault. The key is never written to preferences, logs, screenshots or Compose state after saving.
  • Agent providers and HTTPS requests are only contacted for the actions you configure. Private-network destinations require explicit opt-in, and webhooks authenticate every call.
  • The local agent gateway binds to loopback by default. LAN exposure is opt-in, requires Android 17 local-network permission and still enforces authentication and revocation.
  • Security-sensitive reports should go to the developer by email rather than a public issue. Redact tokens and payloads from logs.

Community and support

WhereLinkUse it for
Telegram channel @NexaFlowApp Release announcements, build notes and status updates
Community group @NexaFlowCommunity Questions, task sharing and discussion with other users
Releases topic Community → releases Mirrored release notes and APK attachments
GitHub Alaa91H/NexaFlow Source, issues, pull requests and the full history
Developer @Alaa91h · [email protected] Direct questions, security reports and collaboration
Support ko-fi.com/alaa91h Optional financial support; no feature is gated behind it

Every published GitHub release is announced automatically in the channel and in the community releases topic by @NexaFlowBuildBot, with the release changelog and both APKs.

When reporting a problem, include the Android version, device build, the permission state and a minimal task that reproduces it.

Contributing

Read CONTRIBUTING.md, the architecture notes and the required checks. Pull requests are expected to pass the same gates as main; the release procedure is documented in docs/RELEASING.md.

License

NexaFlow is released under the MIT License.

Documentation

Start at the documentation index:

Close

How Shizuku is used

Can run custom shell commands and automate apps, settings, connectivity, sound, input, files and power via `Shizuku UserService`

This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.

How this app uses Shizuku

NexaFlow uses Shizuku to run privileged device controls from automation tasks and actions.

  • Run custom commands: a command typed in an advanced automation action is validated and run with the elevated shell through Shizuku and the output is returned to the task.
  • Manage installed apps: force stop a selected app, clear its data, install packages, uninstall packages, and enable and disable apps with the activity and package shell commands through Shizuku.
  • Change system settings: write reviewed system, secure and global settings keys, and apply screen timeout and brightness, rotation, font scale, display density and related display options with the settings and window manager shell commands through Shizuku.
  • Control connectivity: turn WiFi hotspot Internet tethering on and off, toggle WiFi, Bluetooth, NFC and mobile data, switch preferred network type per SIM, toggle airplane mode and location and Data Saver with system shell commands and system services through Shizuku.
  • Control sound and interruptions: change Do Not Disturb and restore normal ringer mode after notification policy access is granted with the notification shell commands through Shizuku.
  • Control display and input: take screenshots, expand notifications and quick settings, inject input events and lock the screen with input, status bar and system shell commands through Shizuku.
  • Copy automation files: copy files limited to the app controlled storage area with the file copy command through Shizuku.
  • Read device state: read back settings values, network type masks, package disabled state, location state and Data Saver state for verification with settings and phone commands through Shizuku.
  • Restart device power: reboot, shut down and refresh System UI with power shell commands through Shizuku.
  • Grant app permissions: grant runtime permissions and special accesses for the app itself with package, app operations and device idle commands through Shizuku.

Android APIs or commands used

  • sh -c
  • am force-stop
  • am broadcast
  • pm clear
  • pm enable
  • pm disable-user
  • pm list packages -d
  • pm install
  • pm uninstall
  • pm grant
  • settings put
  • settings get
  • settings list
  • getprop ro.telephony.default_network
  • svc wifi enable
  • svc wifi disable
  • svc bluetooth enable
  • svc bluetooth disable
  • svc nfc enable
  • svc nfc disable
  • svc data enable
  • svc data disable
  • cmd phone get-allowed-network-types-for-users
  • cmd phone set-allowed-network-types-for-users
  • cmd notification allow_dnd
  • cmd notification set_dnd
  • cmd notification cancel_all
  • cmd location set-location-enabled
  • cmd location is-location-enabled
  • cmd connectivity airplane-mode
  • cmd netpolicy set restrict-background
  • cmd netpolicy get restrict-background
  • cmd statusbar expand-notifications
  • cmd statusbar expand-settings
  • input keyevent
  • input text
  • input tap
  • input swipe
  • screencap -p
  • cp
  • wm density
  • reboot
  • reboot -p
  • pkill -f com.android.systemui
  • appops set
  • dumpsys deviceidle whitelist
  • TetheringManager.startTethering
  • TetheringManager.stopTethering
  • TetheringManager.TetheringRequest.Builder

Notable details

Custom shell actions validate the command for unsafe characters before execution through Shizuku. Typed automation uses fixed operations with allowlisted packages, settings keys, file paths and network masks. Many display, sound and connectivity controls first try standard Android APIs and use Shizuku only when the direct write is unavailable. WiFi Internet tethering through Shizuku needs Android 16 or newer.

Close

Changelog

What's new for version v3.92.4

Highlights

NexaFlow v3.92.4 hardens the assistant and the Canonical automation platform. Chat history now survives process restarts without racing a restore or a clear, provider discovery tolerates malformed metadata, and every typed builder field, enum token and catalog entry has one reviewed, localized contract. The release is backed by 3,458 unit tests, a successful detekt/lintDebug/testDebugUnitTest gate and 97.8% coverage of changed executable lines.

Added

  • Conversation history now survives process restarts. AiConversationStore restores the newest conversation and continues it under its stored id. Only user and assistant text is persisted; tool calls, provider wire context and the system prompt are excluded, so a restored chat cannot replay a stale device mutation. A conversation keeps at most 96 messages, 32,768 characters per message and 98,304 characters in total; at most 8 conversations are retained. Empty conversations are removed, clearing the chat deletes the stored conversation, and an unreadable payload decodes to an empty store instead of failing the chat screen.
  • One reviewed contract now covers every typed builder field. The extractor classifies all 169 fields: 154 use a translated label and 15 are internal storage or security markers that the generic editor never renders. Generated labels replace the hand-written 30-entry map, and five legacy field ids keep their previous labels and units. check_option_fields_contract.py fails on a stale document, resolver, missing locale resource or undecided user-facing field.
  • All 46 remaining field labels and 93 enum tokens are localized. The labels and tokens were added to all 11 locale files, leaving no fallback to a humanized enum. check_option_fields_contract.py and SchemaFieldVocabularyTest pin every declared token; protocol tokens such as HTTP methods are explicitly allow-listed.
  • Provider metadata now drives capability routing. Discovery records context and output limits, vision and reasoning only when an endpoint publishes them: OpenAI-compatible metadata, OpenAI Responses limits and Gemini paged limits. Missing evidence stays unknown; model names are not used as heuristics.
  • Every canonical field has derived presentation metadata. One resolver covers all 17 NodeFieldType values with a localized description, a hint in range/choices/required order, unit labels, the shared invalid-value message, secret and expression warnings, and summary and accessibility templates.
  • Advanced mode is one persisted global opt-in. The builder hides advanced trigger and action lists while the setting is off; enabling it only reveals existing options and never grants a capability. AdvancedModePreferences persists the choice, and the gate checks the default, both builder gates and all 11 locales.
  • Catalog visibility is a single policy. CatalogVisibilityPolicy classifies every trigger and action as VISIBLE, ADVANCED or HIDDEN, and the builder, compatibility gate and picker consume that decision. Legacy and configuration-only entries stay available to saved tasks but never enter the generic picker.
  • Access tier is derived from the provider that will actually run. Public APIs map to NORMAL, system privileges to SPECIAL_ACCESS, accessibility to ACCESSIBILITY, shell identities to SHIZUKU and root to ROOT. No schema or catalog stores a tier literal.
  • Canonical schemas now declare localized text keys and typed outputs. Twenty-three declarations across twelve schema ids resolve through generated branches in all 11 resource sets, and the field renderer prefers the declared key over the id-based map.
  • New documentation and gates cover documentation links, dependency exceptions, option documents and translations, the field contract, field metadata, catalog visibility, advanced mode, node schema text, access tier and changed-line coverage. The reference set includes docs/OPTIONS_MATRIX.md, docs/OPTIONS_REFERENCE.md, docs/OPTION_FIELDS.md, docs/FIELD_METADATA.md, docs/PRIVACY.md, docs/TRIAGE.md, docs/BACKLOG.md, docs/DEPENDENCY_EXCEPTIONS.md and the i18n glossary.

Fixed

  • The assistant no longer loses or resurrects history during a race. AiChatViewModel ignores stream events that arrive after cancel or clear, refuses to overwrite a message sent before the asynchronous restore finishes, and deletes the stored conversation when the chat is cleared before that restore completes.
  • A preferred provider no longer wins on an unavailable channel. The resolver derives pinned and preferred ranking flags from the capability it actually selects, so a provider that declares a preferred backend which cannot run does not outrank one that can serve the preference.
  • Malformed provider metadata no longer drops a discovery page. OpenAI-compatible and Gemini discovery cast each field before reading it; a provider that publishes an object where an array or number is expected stays listed without that evidence.
  • A corrupt stored chat degrades instead of throwing. AiConversationStore reads version, ids, timestamps, roles and text through typed primitives, so one malformed message is dropped instead of discarding its conversation, and a malformed version is treated as an empty store.
  • The maintenance worker no longer risks a startup ANR. Its first periodic pass waits 15 minutes instead of running while the process is still cold-starting; the immediate bounded migration batch still runs at startup.
  • Coverage no longer analyses the same classes twice. The report reads only the AGP 9 built_in_kotlinc and javac outputs, so a stale duplicate tree cannot abort JaCoCo with Can't add different class with same name.
  • Release APKs now regenerate their Hilt wiring from scratch. KSP 2.3.13 could mark a release KSP task up-to-date while its generated _HiltModules sources were absent, and parallel release processing could lose the task classpath, so R8 packaged a phone APK that crashed when Settings or Automation Builder opened. Release KSP tasks no longer reuse the configuration or build cache, and CI builds the release variant serially after the debug variant; the existing APK gate still verifies every @HiltViewModel.
  • Diff coverage honours hunk line counts. An added Kotlin line that starts with ++ or -- is read as content rather than as a file header.

Changed

  • Provider evaluation now examines every declared capability, ordered by pinned backend, preferred backend, least privilege and backend id, instead of an arbitrary first(). ProviderDescriptor.privilegeCost() uses the least privileged declared channel, and the ROM bonus is expressed once instead of five times.
  • Discovery tiers now consume schema.complexity: a wholly BASIC schema is browsable, an EXPERT schema is advanced, and an intermediate ADVANCED schema keeps the product decision. Picker placement is unchanged for the current catalog.
  • The required source and unit gate now passes on the audited tree, and the new documentation and coverage gates run in CI alongside the existing canonical platform checks.

Verification

  • ./gradlew detekt lintDebug testDebugUnitTest --continue --console=plain passed with 3,458 tests in 517 classes, 0 failures, 0 errors and 3 skipped; a confirming re-run on the same tree exited 0.
  • ./gradlew coverageGate passed all ten ratcheted modules; changed-line coverage is 97.8% (940/961) with exit 0.
  • Documentation gates pass: check_docs_links.py, check_canonical_docs_closure.py, check_readme_stale_counts.py and git diff --check.
  • A serial, no-cache ./gradlew assembleRelease -PallowDebugSigning=true --no-configuration-cache --no-build-cache --no-parallel completed in 30m56s and produced both phone and Wear APKs. scripts/check_apk_hilt_viewmodels.py passed with all 28 phone @HiltViewModel classes wired.
  • Device evidence is limited. The debug APK was installed and launched on an Android 17 / API 37 reference phone; MainActivity was the resumed activity with no fatal exception or ANR in the captured log. No physical-device matrix, live Shizuku, root or ADB provider, or instrumentation suite ran for this release.

Quality evidence

The tag workflow gates publication on the following automated checks. Consult the exact tag run and validation record for results; these checks do not establish physical-device coverage:

  • Android Lint (zero-tolerance: UnusedResources, MissingTranslation, ExtraTranslation, UnusedIds, CheckResult, HardcodedText, TypographyDashes) and Detekt static analysis.
  • Catalog parity gates: every TriggerType and ActionType enum value must exist exactly once in the builder picker (restricted entries are pinned explicitly).
  • Full unit-test suite, including Room migration, scheduler, lifecycle, and recovery regression coverage.
  • Release build with R8 full shrinking, APK signature verification (v2/v3 schemes and certificate-fingerprint match against the production keystore), 16 KB page-size alignment check, zipalign verification, and Gradle dependency verification.
  • Tag hygiene: the tag must match the newest CHANGELOG.md entry, so the notes below are the actual, reviewed change record for this release.

Install

  • Download NexaFlow-<version>.apk for Android phone or NexaFlow-Wear-<version>.apk for Wear OS from the assets below.
  • Android updates require a compatible version code and the same signing certificate. Back up important tasks before upgrading.
  • Pre-release tags (alpha / beta / rc) are marked as pre-releases automatically.

Documentation

Close

Permissions

2 permissions requested

  • android.permission.WAKE_LOCK
  • com.nexaflow.app.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
Close