Block broken spots on your touchscreen to make your screen usable again.
屏蔽屏幕上的触控坏点,让屏幕恢复可用状态。
Got an old phone or tablet with a cracked or water-damaged screen that keeps registering random, phantom touches (ghost touches, erratic tapping)? You know the feeling: games misfire, videos skip around, and keyboards type gibberish on their own.
Replacing the screen often costs more than the device is worth. Throwing it away feels wasteful when 95% of the display works perfectly fine.
Touch Blocker solves this with a very straightforward trick: it parks tiny, invisible system overlay windows directly on top of the broken spots. Any touch landing on those spots gets swallowed on the spot, so phantom inputs never reach your apps. By effectively blocking out only the broken parts, the rest of the screen behaves completely normally.
Home · Record · Manage · Verify
- Targeting absolute physical positions (Natural Anchors)
If you save touch points as screen pixels, the moment you flip your device from portrait to landscape, those blocker patches drift away to the wrong part of the display. Touch Blocker stores coordinates as relative fractions of the unrotated, physical panel. Rotate the screen, fold or unfold a foldable device, or change system display size, and the blocker stays locked to the exact same piece of hardware. - Smart cluster merging
Got a crack that spans a line or a small cluster of dead pixels? Points that sit close together are automatically merged into a single rectangular window instead of spawning dozens of individual windows. - Zero idle overhead
Once positioned, the overlay windows are completely passive. When idle, CPU usage sits at 0.0% with zero rendered frames. - Foldable & cutout friendly
Supports separate profiles for inner and outer screens. If a rotation pushes a blocker under a camera hole or hinge, the app pauses that point and brings it back automatically once you rotate away.
Tap broken spot
│
▼
┌─────────────────────────┐ Stored as a rotation-invariant
│ Natural Anchor (u, v) │ fraction of the raw panel
└──────────┬──────────────┘
│ Resolved for current rotation / density / fold posture
▼
┌─────────────────────────┐ TYPE_APPLICATION_OVERLAY window,
│ Transparent Overlay Box │ swallows touches completely
└─────────────────────────┘
- Open the app and grant Display over other apps (system overlay permission).
- Tap Start Recording, press Volume Up to begin, tap the broken spots with your finger, then press Volume Down to save.
- Head into Test Blocking and tap around to verify: green markers mean taps were blocked; red markers mean taps passed through.
- Back on the home screen, flip the Overlay switch on.
You can tweak the circle sizes or delete points anytime under Manage Block Points.
- Android 5.0 (API 21) or newer (
targetSdk 33,compileSdk 34). - Overlay permission is mandatory. Without it, Android does not allow apps to place windows over other apps.
- Touches over visible status and navigation bars cannot be intercepted. Android places system bars at layer 151,000, while regular apps can only go up to layer 111,000 (
TYPE_APPLICATION_OVERLAY). If your broken spot is directly under the clock or navigation bar, the system bar will catch the tap first. However, the moment an app enters fullscreen mode (like games or video playback where the bars hide), Touch Blocker works as intended. - Background battery restrictions: If your device vendor uses aggressive task-killing (MIUI/HyperOS, ColorOS, etc.), make sure to add Touch Blocker to your battery optimization whitelist and enable auto-start.
- Privacy: Touch Blocker requests no network permissions. It never makes network calls. Diagnostic logs are stored strictly on device and can only be exported through the standard system share sheet.
Built with plain Java 8, with zero dependency-injection bloat:
display/ Display snapshots, cutouts, hinges, system bar insets
geometry/ Coordinate math, point validation, window clustering (pure JVM)
profile/ Per-display profiles, JSON codec, legacy data migration
ui/ Preview drawing, fullscreen immersive handling
OverlayService — Foreground service holding the blocker windows
All geometry math is completely decoupled from Android framework imports, allowing all 252 unit tests to run on a local JVM in just a couple seconds.
./gradlew.bat :app2:testDebugUnitTest # Run 252 unit tests
./gradlew.bat :app2:assembleDebug # Build debug APK
./gradlew.bat :app2:lintDebug # Run lint checksThe tools/ directory includes testing utilities used during development for matrix verification across multiple devices, aspect ratios, and simulated cutouts.
MIT © Payton
家里吃灰的旧手机、旧平板,屏幕摔碎裂了或者不小心进过水,局部触控经常开始出现莫名其妙的点击(幽灵触控、疯狂乱跳乱点)。
送去换一块屏幕,价格往往比二手整机还要贵;可直接当垃圾扔了又很可惜,毕竟除那一小块坏区以外,整块屏幕大部分区域都好端端的。
Touch Blocker 就是为了解决这个很现实的痛点写的小工具:在屏幕坏掉的区域盖上几个极小的、完全透明的系统悬浮窗。落在这些区域里的触控会被窗口直接吞掉,底层的游戏、网页或输入法再也不会收到乱跳的幽灵点击。相当于屏蔽了损坏部分的屏幕,屏幕其余完好的部分就能正常使用。
主界面 · 录制 · 管理 · 验证
- 定位物理屏幕的绝对位置
很多简单实现最容易遇到的问题是:屏幕一旋转,屏蔽区域就漂移到莫名其妙的地方去了。Touch Blocker 记录的是坏点在物理屏幕面板上的相对比例(自然坐标),而不是当前画面的像素。因此不管是横屏看电影、竖屏刷网页,还是折叠屏展开合上,悬浮窗都会准确钉在玻璃上的坏点位置。 - 相邻坏点自动合并
如果屏幕上碎了一整条裂纹或坏了一小片区域,挨得近的几个点会自动组合成一个大矩形窗口,避免系统同时挂着几十个悬浮窗拖慢性能。 - 空闲时几乎零开销
放好悬浮窗并淡出透明后,窗口平时处于完全被动状态。不触发点击时没有定时刷新,也没有后台动画死循环,CPU 占用保持在 0.0%。 - 支持折叠屏与异形屏
内外屏会自动切换不同配置。如果屏幕旋转后某个屏蔽点刚好落进前置摄像头挖孔或铰链死区,应用会自动暂停该点,转回来脱离死区后再自动恢复。
点击屏幕坏点
│
▼
┌─────────────────────────┐ 存为与旋转无关的
│ 自然锚点坐标 (u, v) │ 物理面板相对比例
└────────────┬────────────┘
│ 按当前屏幕方向 / 分辨率 / 折叠状态实时换算
▼
┌─────────────────────────┐ TYPE_APPLICATION_OVERLAY 悬浮窗,
│ 透明遮罩窗口 │ 直接吞掉落入此区域的全部触控
└─────────────────────────┘
- 打开应用,授予显示在其他应用上层(悬浮窗)权限。
- 点击开始录制,按音量上键开始,用手指戳屏幕上乱跳的坏点,录完按音量下键保存。
- 建议进测试屏蔽页面点几下验证:绿色标记代表点击已被成功拦截,红色标记代表穿透。
- 回到主界面,把悬浮层开关打开即可。
后续可以在管理屏蔽点里按需微调每个点的大小或删除多余点位。
- 系统要求:Android 5.0(API 21)及以上,编译目标 API 33/34。
- 悬浮窗权限是必须的:没有这个权限,Android 系统不允许应用向外部屏幕放置窗口。
- 无法直接拦截可见状态栏与导航栏区域:这是 Android 系统的底层安全设计。系统的顶层状态栏位于 151,000 层,而普通应用能申请到的最高悬浮窗(
TYPE_APPLICATION_OVERLAY)只有 111,000 层。如果坏点刚好位于最顶上的时间/电量条或底部的按键栏处,只要状态栏处于显示状态,点击就会先被系统吃掉。不过在全屏应用(如看全屏视频、玩全屏游戏,状态栏自动收起)时,屏蔽仍然可以正常生效。 - 后台省电清理:部分厂商系统(如 MIUI/HyperOS、ColorOS、OriginOS 等)对后台服务限制较严。如果遇到锁屏一段时间后失效的情况,请在系统设置中为 Touch Blocker 允许后台运行并加入电池优化白名单。
- 隐私承诺:应用没有申请网络权限,不会也不能发送任何网络请求。调试日志仅保存在本地设备中,需要排查问题时可通过系统分享面板手动导出。
采用纯 Java 8 开发,不依赖任何重型依赖注入框架:
display/ 屏幕快照、挖孔、折叠铰链与系统栏 Insets
geometry/ 坐标换算、点位校验、窗口聚类算法(纯 JVM 逻辑)
profile/ 多屏幕配置档案、JSON 编解码与历史版本迁移
ui/ 主界面预览绘制、全屏沉浸式适配
OverlayService —— 持有并管理悬浮拦截窗口的前台服务
核心几何与坐标变换计算完全脱离了 Android 依赖,252 个单元测试全部可以在本地 JVM 环境几秒内跑完。
./gradlew.bat :app2:testDebugUnitTest # 运行 252 个单元测试
./gradlew.bat :app2:assembleDebug # 编译 Debug APK
./gradlew.bat :app2:lintDebug # 运行静态代码检查tools/ 目录下收录了开发过程中用于自动化测试设备旋转、多挖孔形态模拟和点击拦截率的验证脚本。
MIT © Payton







