Intelligent ghost-tap filtering for failing Android touchscreens
Quick Start β’ Features β’ How It Works β’ Downloads β’ Docs β’ FAQ
- Why InputBlocker?
- Quick Start
- Features
- How It Works
- Components
- Downloads
- Configuration
- Comparison
- Documentation
- FAQ
- Testing & Reporting
- Building from Source
- Contributing
- License
The problem: Failing digitizers cause ghost taps β phantom touches from electrical noise. These random touches can:
- Interrupt your typing with random taps
- Click things you never intended to touch
- Drain battery by keeping the screen active
- Make your device nearly unusable
Existing solutions block entire chunks of the screen unconditionally, turning usable displays into wastelands.
InputBlocker filters touches at the OS input level based on physical properties (pressure, duration). Your screen stays usable. Ghosts get blocked. No blind screen blocks.
| Dependency | Details |
|---|---|
| Root access | Magisk (β₯20400), KernelSU, or APatch |
| Xposed framework | LSPosed or Vector installed in your root manager |
| Android | 6.0+ (API 23) |
| ADB | For PC tool β USB Debugging enabled (optional) |
# 1. Download the latest module from Releases
# 2. Flash in your root manager (Magisk / KernelSU / APatch)
# 3. Reboot
# 4. Enable InputBlocker in LSPosed Manager for "System Framework"
# 5. Reboot again
# 6. Open the InputBlocker companion app to verifyFirst time? See Getting Started Guide for a full walkthrough.
| Situation | Action |
|---|---|
| Overlay blocks everything | Press Volume Down Γ 3 β Volume Up Γ 3 |
| Boot loop | Boot Safe Mode β disable module in LSPosed |
| Crash detected | adb shell rm /data/adb/modules/inputblocker/config/crash_detected |
| Hard disable | echo "1" > /data/adb/modules/inputblocker/config/kill_switch |
| Feature | Description |
|---|---|
| System-level filtering | Hooks InputDispatcher.dispatchMotionLocked in system_server β touches blocked before apps see them |
| Surgical blocking | Filter by touch contact area (ghost taps have tiny contact patches, reported as low "pressure" by Android) + duration (stuck pixels long-press) |
| Shape support | Rectangle, Circle, and Ellipse regions β not just squares |
| Exclude zones | Create "holes" in blocked regions for buttons you need |
| Per-app profiles | Different blocking configs for different applications |
| Kill switch | Emergency file-based disable β no UI needed |
| Feature | Description |
|---|---|
| Visual editor | Draw regions directly on a screen preview |
| Live overlay | See active blocking regions rendered on screen |
| 4 themes | System, Light, Dark, AMOLED (battery-saving pure black) |
| Auto-detection | Captures ghost tap samples, suggests optimized regions |
| Preset system | Export/import .ibpreset files for sharing configs |
| Block log viewer | Review every filtered touch with full metadata |
| Community gallery | Browse and download presets from other users |
| Update checker | In-app notification when new releases are available |
| Quick Settings tile | Toggle blocking from the notification shade |
| Emergency gesture | Configurable button combo to disable blocking instantly |
| Feature | Description |
|---|---|
| Visual region editor | Drag, resize shapes on a screen preview |
| DBSCAN auto-tuning | Clusters ghost tap data to suggest optimal regions |
| ADB bridge | Push configs and pull logs wirelessly |
| Cross-platform | Windows (EXE), Linux (DEB), macOS (DMG) |
| Feature | Description |
|---|---|
| Crash-safe design | Hot-path try/catch + boot-time detection prevents lockouts |
| Safe mode | Auto-disables blocking after abnormal shutdown |
| Async logging | Dedicated logger thread prevents I/O from blocking touch dispatch |
| Resolution-independent | Normalized coordinates (0.0β1.0) β one config works across screen sizes |
| Low overhead | Sub-millisecond filtering with two-tier caching |
Ghost taps from failing digitizers have three telltale characteristics:
| Signal | Ghost Tap | Real Finger |
|---|---|---|
| Contact Area | Tiny electrical spike β very low "pressure" (< 0.10) | Full finger pad β normal "pressure" (0.15 β 1.00) |
| Duration | Instant spike OR stuck hold | Brief, natural tap |
| Location | Clusters in dead zones | Anywhere on screen |
Note on "Pressure": Capacitive touchscreens don't measure physical force. Android's
MotionEvent.getPressure()reports touch contact area β how many capacitive nodes the finger covers. A larger contact patch = higher value. Electrical noise from a failing digitizer produces a minimal contact signature, so the value is very low. This still makes it an effective filter signal.
BLOCK if (ContactArea < MinPressure) OR (Duration > MaxDuration)
Touch Event
β
βΌ
βββββββββββββββββ
β In exclude βββYESββ> PASS THROUGH
β zone? β
βββββββββ¬ββββββββ
β NO
βΌ
βββββββββββββββββ
β In blocked βββNOββ> PASS THROUGH
β zone? β
βββββββββ¬ββββββββ
β YES
βΌ
βββββββββββββββββ
β Contact area β
β < threshold? βββYESββ> BLOCK (ghost)
β OR β
β Duration > β
β max? β
βββββββββ¬ββββββββ
β NO (real touch)
βΌ
PASS THROUGH
ββββββββββββββββββββββββββββββββββββββββββββββββ
β PC Designer β
β Visual config editor + DBSCAN β
ββββββββ¬ββββββββββββββββββββββββββββββββ¬ββββββββ
β ADB push config β ADB pull logs
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Companion App (Overlay + UI) β
β On-device management, visual editor β
ββββββββ¬ββββββββββββββββββββββββββββββββ¬ββββββββ
β Write config β Read crash flag
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Module Config (on-device storage) β
β /data/adb/modules/inputblocker/config/ β
ββββββββ¬ββββββββββββββββββββββββββββββββ¬ββββββββ
β Read β Write flag
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Xposed Hook (InputDispatcher hook) β
β Intercepts all touch events in system_server β
β β Blocks ghosts β Apps never see them β
ββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Description | Tech Stack |
|---|---|---|
| Xposed Hook | System-level touch filter engine | Legacy Xposed API, Kotlin |
| Companion App | On-device management UI + overlay | Jetpack, Material 3, Kotlin |
| PC Designer | Desktop visual region editor | Compose Desktop, Kotlin |
| Shared Core | Normalized coordinate math, Region model | Kotlin Multiplatform |
| Module Scripts | Root installation, service, health-check | Shell (POSIX) |
| Platform | Format | Get It |
|---|---|---|
| Android module | .zip |
Releases page |
| PC Designer (Windows) | .exe |
Releases page |
| PC Designer (Linux) | .deb |
Releases page |
| PC Designer (macOS) | .dmg |
Releases page |
The companion APK is bundled inside the module ZIP and installs automatically on first boot.
Config file (/data/adb/modules/inputblocker/config/profiles/default.conf):
enabled=1
lsposed_mode=1
# Format: isExclude,type,x1,y1,x2,y2,minPressure,maxDuration
# isExclude: 0=block, 1=exclude; type: 0=rect, 1=circle, 2=ellipse
# x1,y1,x2,y2: normalized 0.0-1.0; minPressure: 0.0-1.0; maxDuration: ms
0,0,0.65,0.0,1.0,1.0,0.15,300
1,2,0.88,0.92,0.06,0.08,0.0,0Per-app profiles: Place at config/profiles/<package_name>.conf β engine auto-switches when the app is in the foreground.
Special flags: See Configuration Reference.
| Feature | InputBlocker | TouchBlocker | Screen Block | Manual ADB hack |
|---|---|---|---|---|
| Filtering level | Input dispatcher | Overlay-only | Overlay | Overlay |
| Pressure filtering | β | β | β | β |
| Duration filtering | β | β | β | β |
| Shape support | Rect, Circle, Ellipse | Rect only | Rect only | Rect only |
| Exclude zones | β | β | β | β |
| Per-app profiles | β | β | β | β |
| PC visual designer | β | β | β | β |
| Auto-detection | β (DBSCAN) | β | β | β |
| Crash safety | β | β | β | β |
| Emergency gesture | β | β | β | β |
| Resolution-independent | β (normalized) | β | β | β |
| Open source | β (MIT) | β | β | β |
| Document | What's Covered |
|---|---|
| π Getting Started | Full walkthrough with screenshots for new users |
| π Technical Docs | Architecture, engine internals, configuration reference |
| π§ Troubleshooting | Common issues, solutions, and recovery |
| β FAQ | Frequently asked questions |
| π¬ Advanced | DBSCAN tuning, custom scripts, power user tips |
| ποΈ Build Guide | Building from source, CI/CD, outputs |
| π€ Contributing | How to contribute code and report issues |
| π Security | Vulnerability reporting and disclosure policy |
| π Changelog | Release history |
Q: Does this work with any Android device?
A: Any device running Android 6.0+ with root access and LSPosed/Vector installed.
Q: Will this affect my battery?
A: Minimal. The filtering overhead is sub-millisecond with aggressive caching. Async logging prevents I/O on the dispatch thread.
Q: Can I use this without LSPosed/Vector?
A: Yes β use "Overlay Mode" in the companion app. Less precise than the Xposed hook, but works without a framework module.
Q: I found ghost taps β how do I configure it?
A: Run Auto-Detection in the companion app to capture samples, then review and save the suggested regions. Or use the PC Designer for manual control.
Q: Will an Android update break this?
A: The hook targets InputDispatcher.dispatchMotionLocked, a stable internal API. Major Android versions rarely change this, but test after OS updates.
Q: Can I share configs?
A: Yes β export as .ibpreset files. Normalized coordinates make them cross-device compatible.
InputBlocker is in active testing and needs real-world data.
What to test:
- Filter tuning (minPressure / maxDuration values)
- Region layering (exclude zones inside blocking zones)
- Emergency reset gesture
- Per-app profile switching
- Performance (input lag, battery drain)
How to report: Open a GitHub Issue with device model, Android version, logs (Share Log button), and your config file.
git clone https://github.com/Laviesss/InputBlocker.git
cd InputBlocker
./gradlew buildAll -PVERSION_NAME="0.1.0" -PVERSION_CODE=1Requirements: JDK 17, Android SDK (API 34). See BUILD.md for details.
Contributions welcome! See CONTRIBUTING.md.
- π Bugs β Open an issue
- π‘ Ideas β Feature request
- π§ Fixes β PRs gladly accepted
MIT License β see LICENSE.
β If InputBlocker saved your device, give it a star! β