Setup Guide
设置指南

Up and running in
under 5 minutes

不到5分钟
启动并运行

FocusFlow needs two permissions to reach its baseline enforcement level. Three more unlock the full tamper-resistant stack. Here is exactly what each does and how to enable it.

FocusFlow 需要两个权限来达到其基本执行级别。再授予三个权限可解锁完整的防篡改堆栈。以下是每个权限的具体作用及启用方法。

How to set up FocusFlow

如何设置 FocusFlow

Follow these steps in order. Steps 1–3 are required; steps 4–6 are optional but significantly increase tamper resistance.

按顺序执行以下步骤。步骤 1–3 是必需的;步骤 4–6 是可选的,但会显著提高防篡改能力。

1

Install FocusFlow APK

安装 FocusFlow APK

Download the APK from the GitHub Releases page. Open the downloaded file. If prompted about "Install from unknown sources," enable it in Settings for your browser or file manager.

GitHub Releases 页面下载 APK。打开下载的文件。如果提示"从未知来源安装",请在设置中为您的浏览器或文件管理器启用它。

Note: FocusFlow is not yet on the Play Store — install via APK from GitHub Releases. The source code is fully open and auditable.
注意:FocusFlow 尚未上架 Play 商店——请通过 GitHub Releases 的 APK 安装。源代码完全开放且可审计。
2

Grant Accessibility Service access

授予无障碍服务访问权限

Go to Settings → Accessibility → Installed Services → FocusFlow and toggle it on. Confirm the system prompt. This is the primary enforcement layer — FocusFlow monitors every window change and fires within milliseconds of detecting a blocked app.

前往设置 → 无障碍功能 → 已安装的服务 → FocusFlow并开启它。确认系统提示。这是主要执行层——FocusFlow 监控每次窗口变化,并在检测到被屏蔽的应用后毫秒内触发。

On some OEMs (Samsung, Xiaomi, Oppo): Accessibility may be under Settings → Special Functions or Additional Settings. FocusFlow guides you to the correct path in the onboarding screen.
在某些 OEM 上(三星、小米、OPPO):无障碍功能可能位于设置 → 特殊功能或其他设置下。FocusFlow 会在引导界面指引您找到正确路径。
3

Grant Usage Stats access

授予使用情况统计访问权限

Go to Settings → Apps → Special App Access → Usage Access → FocusFlow and enable it. This lets FocusFlow identify which app is in the foreground, required for accurate app detection alongside the Accessibility Service.

前往设置 → 应用 → 特殊应用访问 → 使用情况访问 → FocusFlow并启用它。这让 FocusFlow 能够识别哪个应用在前台,与无障碍服务一起用于准确的应用检测。

4

Enable Device Administrator (recommended)

启用设备管理员(推荐)

FocusFlow will prompt you to grant Device Administrator status. This registers FocusFlow as a device admin, which prevents uninstallation via Settings → Apps during an active session. Without this, a determined user can uninstall the blocker mid-session.

FocusFlow 会提示您授予设备管理员状态。这将 FocusFlow 注册为设备管理员,防止在活跃会话期间通过"设置 → 应用"卸载。没有这个,坚定的用户可以在会话中途卸载屏蔽器。

Optional but important: Without Device Admin, FocusFlow can be uninstalled normally. With it, removal during a session requires ending the session with the correct PIN first.
可选但重要:没有设备管理员,FocusFlow 可以正常卸载。有了它,在会话期间移除需要先用正确的 PIN 码结束会话。
5

Enable VPN (for network-level blocking)

启用 VPN(用于网络级屏蔽)

When you first use a blocking mode, FocusFlow requests VPN permission. Grant it to enable the local null-routing VPN layer. This adds network-level enforcement — even if the Accessibility Service is killed, the VPN continues blocking the app's internet access.

首次使用屏蔽模式时,FocusFlow 请求 VPN 权限。授权以启用本地空路由 VPN 层。这增加了网络级执行——即使无障碍服务被终止,VPN 也会继续屏蔽应用的网络访问。

Privacy note: No traffic ever leaves your device. The VPN is entirely local — it routes blocked app traffic to a null endpoint on the device itself.
隐私说明:没有任何流量离开您的设备。VPN 完全是本地的——它将被屏蔽应用的流量路由到设备本身的空端点。
6

Choose your blocking mode and start

选择屏蔽模式并开始

Select a mode, add the apps you want blocked (or set a whitelist of allowed apps), set a duration or schedule, and tap Start. FocusFlow activates all enabled enforcement layers. A persistent foreground notification shows session status and provides quick controls.

选择一种模式,添加您要屏蔽的应用(或设置允许应用的白名单),设置持续时间或日程,然后点击开始。FocusFlow 激活所有已启用的执行层。持久的前台通知显示会话状态并提供快速控制。

Three enforcement layers, stacked

三层执行机制,叠加运行

FocusFlow runs three independent blocking mechanisms simultaneously. Each one closes the bypass the previous layer leaves open.

FocusFlow 同时运行三个独立的屏蔽机制。每一个都关闭了上一层留下的绕过漏洞。

Layer 1 — UI level
第1层 — UI 级别
Accessibility Service (AppBlockerAccessibilityService)
Fires within milliseconds of any blocked app window appearing. Up to 5 rapid re-checks at 300 ms intervals. Intercepts Play Store installs, uninstall dialogs, and Accessibility Settings navigation during sessions. Powers 15+ OEM SystemUI interceptions.
在任何被屏蔽应用窗口出现后毫秒内触发。每隔 300 毫秒进行最多 5 次快速重新检查。拦截会话期间的 Play 商店安装、卸载对话框和无障碍设置导航。支持 15 个以上 OEM SystemUI 拦截。
Layer 2 — Network level
第2层 — 网络级别
Local Null-Routing VPN (NetworkBlockerVpnService)
Routes blocked app traffic into a local VPN that discards all packets. No external server involved. PER_APP mode cuts only the blocked app's internet. GLOBAL mode cuts all device internet except emergency calls. Independent of the Accessibility Service.
将被屏蔽应用的流量路由到丢弃所有数据包的本地 VPN。不涉及外部服务器。PER_APP 模式仅切断被屏蔽应用的网络。GLOBAL 模式切断所有设备网络,紧急通话除外。独立于无障碍服务运行。
Layer 3 — System level
第3层 — 系统级别
Device Administrator + System Guard + Native PIN
Device Admin prevents Settings-based uninstallation. System Guard intercepts navigation to Accessibility Settings, Clear Data, and Uninstall screens. SHA-256 hashed session PIN stored natively ensures even a compromised JavaScript layer cannot end a session.
设备管理员防止基于设置的卸载。系统守卫拦截对无障碍设置、清除数据和卸载界面的导航。本地存储的 SHA-256 哈希会话 PIN 确保即使 JavaScript 层被攻破也无法结束会话。

Four modes — pick what fits your workflow

四种模式——选择适合您工作流程的

FocusFlow's scheduling engine handles conflicts, gaps, and overruns automatically. Each mode uses the same three enforcement layers underneath.

FocusFlow 的调度引擎自动处理冲突、间隙和超时。每种模式在底层使用相同的三层执行机制。

🎯 Task-Based任务模式

Each task carries its own allowed-app snapshot. Apps not on the whitelist are blocked during the task. Best for deep work where you need one specific set of tools.

每个任务携带自己的允许应用快照。不在白名单上的应用在任务期间被屏蔽。最适合需要特定工具集的深度工作。

Standalone独立模式

Timed blacklist blocking without any task management. Specify which apps to block and for how long. Best for impromptu focus sessions.

无需任何任务管理的定时黑名单屏蔽。指定要屏蔽的应用及时长。最适合临时专注会话。

🔒 Always-On常驻模式

Permanent blacklist always active — no session required. Specified apps are always blocked. Best for apps you never want available.

永久黑名单始终活跃——无需会话。指定的应用始终被屏蔽。最适合您永远不想访问的应用。

📅 Scheduled Greyout计划灰显

Calendar-based per-app blocking without any session. Block Instagram Mon–Fri 09:00–18:00 automatically. Best for work-hour separation.

无需任何会话的基于日历的逐应用屏蔽。自动屏蔽 Instagram 周一至周五 09:00–18:00。最适合工作时间隔离。

What happens when you open a blocked app

打开被屏蔽应用时会发生什么

The sequence from "open blocked app" to "redirected away" takes under 300 ms across all three enforcement layers.

从"打开被屏蔽应用"到"被重定向离开"的过程在所有三个执行层上不超过 300 毫秒。

Accessibility Service detects the window

无障碍服务检测到窗口

AppBlockerAccessibilityService fires onAccessibilityEvent as soon as the blocked app's window appears. It performs up to 5 re-checks at 300 ms intervals to close the timing bypass window.

AppBlockerAccessibilityService 在被屏蔽应用窗口出现后立即触发 onAccessibilityEvent。它每隔 300 毫秒进行最多 5 次重新检查,以关闭时序绕过窗口。

Aversive feedback fires (if enabled)

厌恶反馈触发(如已启用)

Screen brightness drops to 2% hardware minimum plus 70% black overlay. Vibration motor starts pulsing. System notification sound plays once. All three fire simultaneously.

屏幕亮度降至 2% 硬件最低值加 70% 黑色覆盖层。振动马达开始脉冲。系统通知声音播放一次。三者同时触发。

Block overlay launches

屏蔽覆盖层启动

BlockOverlayActivity appears over the blocked app with a configurable message — default or custom quote from your pool, optionally with your personal wallpaper at 30% opacity behind it.

BlockOverlayActivity 出现在被屏蔽应用上方,显示可配置的消息——来自您池中的默认或自定义引言,可选择以 30% 不透明度显示您的个人壁纸作为背景。

Temptation Log records the attempt

诱惑日志记录此次尝试

TemptationLogManager stores the app name, package name, and timestamp. This entry counts toward your Weekly Temptation Report delivered every Sunday at 08:00.

TemptationLogManager 存储应用名称、包名和时间戳。此条目计入每周日 08:00 发送的每周诱惑报告。

Ready to set it up?

准备好设置了吗?

Download the APK and be fully protected in under 5 minutes.

下载 APK,在不到 5 分钟内获得完整保护。

Explore it on AppGallery ⬇ GitHub APK⬇ GitHub APK Read the FAQ →阅读常见问题 →