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 需要两个权限来达到其基本执行级别。再授予三个权限可解锁完整的防篡改堆栈。以下是每个权限的具体作用及启用方法。
Step-by-step setup
逐步设置
Follow these steps in order. Steps 1–3 are required; steps 4–6 are optional but significantly increase tamper resistance.
按顺序执行以下步骤。步骤 1–3 是必需的;步骤 4–6 是可选的,但会显著提高防篡改能力。
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。打开下载的文件。如果提示"从未知来源安装",请在设置中为您的浏览器或文件管理器启用它。
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 监控每次窗口变化,并在检测到被屏蔽的应用后毫秒内触发。
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 能够识别哪个应用在前台,与无障碍服务一起用于准确的应用检测。
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 注册为设备管理员,防止在活跃会话期间通过"设置 → 应用"卸载。没有这个,坚定的用户可以在会话中途卸载屏蔽器。
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 也会继续屏蔽应用的网络访问。
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 激活所有已启用的执行层。持久的前台通知显示会话状态并提供快速控制。
How it enforces
如何执行
FocusFlow runs three independent blocking mechanisms simultaneously. Each one closes the bypass the previous layer leaves open.
FocusFlow 同时运行三个独立的屏蔽机制。每一个都关闭了上一层留下的绕过漏洞。
Blocking modes
屏蔽模式
FocusFlow's scheduling engine handles conflicts, gaps, and overruns automatically. Each mode uses the same three enforcement layers underneath.
FocusFlow 的调度引擎自动处理冲突、间隙和超时。每种模式在底层使用相同的三层执行机制。
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.
每个任务携带自己的允许应用快照。不在白名单上的应用在任务期间被屏蔽。最适合需要特定工具集的深度工作。
Timed blacklist blocking without any task management. Specify which apps to block and for how long. Best for impromptu focus sessions.
无需任何任务管理的定时黑名单屏蔽。指定要屏蔽的应用及时长。最适合临时专注会话。
Permanent blacklist always active — no session required. Specified apps are always blocked. Best for apps you never want available.
永久黑名单始终活跃——无需会话。指定的应用始终被屏蔽。最适合您永远不想访问的应用。
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。最适合工作时间隔离。
The blocking experience
屏蔽体验
The sequence from "open blocked app" to "redirected away" takes under 300 ms across all three enforcement layers.
从"打开被屏蔽应用"到"被重定向离开"的过程在所有三个执行层上不超过 300 毫秒。
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 次重新检查,以关闭时序绕过窗口。
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% 黑色覆盖层。振动马达开始脉冲。系统通知声音播放一次。三者同时触发。
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% 不透明度显示您的个人壁纸作为背景。
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 发送的每周诱惑报告。