MarketingNotificationBlocker

简体中文 | English

A lightweight, high-performance Android notification filtering module built on the Xposed / LSPosed framework. By hooking deep into the system layer, it accurately intercepts and blocks annoying marketing ads and spam push notifications, restoring a clean and tidy notification shade experience.

✨ Core Features

  • System-Level Hooking (Notification Hook): Intervenes in the notification generation workflow at the system level, directly blocking spam pushes to prevent useless notifications from waking up the screen or making sounds.
  • Flexible Regex Matching (Regex Configuration): Supports highly customizable regular expression rules to precisely match specific keywords (such as ads and marketing promos) while avoiding accidental blocks of important messages.
  • Channel Management: Deeply takes over the Android system's Notification Channels, allowing you to log and directly freeze specific push channels of rogue applications, with per-channel overrides you can flip individually.
  • Content-Level Interception (Experimental): Optionally matches a notification's title/text directly, catching marketing spam pushed through a shared or "default" channel that channel-level rules can't isolate. Off by default; foreground-service notifications are never touched.
  • Two-Layer Whitelist: A regex allow-list (e.g. verification codes, IM apps) always wins over block rules, plus an App whitelist that exempts an entire app (both channel- and content-level) from interception.
  • Interception Statistics: Tracks cumulative content-level block counts and a per-app hit ranking so you can see what's actually being filtered.
  • Multi-language UI: Interface available in Simplified Chinese and English, switchable from the About screen.
  • Lightweight & Efficient: Features a highly optimized code structure with minimal runtime overhead, complete with built-in environment validation and safety mechanisms.
  • Automatic Safe Mode: Monitors System UI for repeated crashes; if it restarts more than twice within 30 seconds, the module automatically stops intercepting (without uninstalling itself) until you confirm your rules and clear the flag from the app.

📱 Screenshots

Home / Rules Hit Category Interception Stats
Home screen Hit Category screen Stats screen

🛠️ Requirements

To run this module properly, your device must meet the following requirements:

  • Unlocked Bootloader with Root access.
  • Successfully installed and activated LSPosed framework.
  • Supported Android Versions: Android 15, Android 16 (Other Android versions are untested but may work; verified on HyperOS 3.0 and crDroid 11.2).

📦 Installation & Setup

  1. Go to the Releases page and download the latest .apk package.
  2. Install the APK file normally on your device.
  3. Open the LSPosed Manager, locate MarketingNotificationBlocker in the "Modules" list, and enable it.
  4. Select the scope: only "Android System Framework" is required. This module hooks the system framework process (system_server) exclusively — all channel blocking happens there — so you do not need to select any individual apps (selecting them has no effect).
  5. Reboot your device to apply the module injection (restarting only System UI is not enough to reload hooks inside the system framework).
  6. Open the app interface to start configuring your custom regular expressions and filtering rules.

The very first "Reboot your device" is a one-time step to load the hook into system_server. After that, edits to rules, toggles, and whitelists made in the app take effect on the next notification/channel event — no further reboots needed.

⚠️ Disclaimer

This module is intended solely for educational and research purposes regarding low-level Android Hooking techniques. Please configure your interception rules carefully to avoid missing critical notifications (e.g., instant messages, verification codes). The developer assumes no responsibility for any data or information loss caused by the use of this module.

🤝 Contributing & Feedback

If you have optimized regex rules to share or encounter any bugs during daily use, feel free to submit an Issue or Pull Request! Let's make this project better together.

📄 License

This project is licensed under the MIT License.

Releases

1.2.1

Stable

7/18/2026, 7:47:41 AM

🚀 新增功能

  • 初步支持免 Root 模式
  • 为 Tab 栏新增切换效果
  • 拦截统计页新增点击对应软件查看拦截详细

🔧 优化与调整

  • 设置 UI 优化
  • 权限调整
  • 优化软件性能,减少卡顿

🐛 Bug 修复

  • 修复某些陈年 Bug

💡 反馈:使用中如果出现问题欢迎提交 Issues。为了能快速定位问题,提交时请尽量包含以下信息:

  • 设备与系统:如手机型号、系统版本
  • 复现步骤:简述导致问题出现的操作过程
  • 相关日志:崩溃日志或错误截图

Assets

1

1.2.0

Stable

7/13/2026, 11:04:47 AM

🚀 版本更新日志

🌟 新增功能

  • 安全模式优化:进入安全模式后,新增可手动关闭的开关,操作更灵活。
  • 全局放行白名单:支持正则表达式配置,实现更精准的全局规则过滤。
  • App 放行白名单:支持针对特定应用设置免拦截白名单。
  • 内容级拦截:深度内容拦截功能上线!(已在小米 15 Ultra 澎湃 3.0 测试通过)。
  • 拦截统计页:新增独立统计页面,拦截次数可视化展示,效果一目了然。

🎨 UI & 交互

  • 界面全新重构:重构整体 UI 架构,新增底部 Tab 导航栏,切换更便捷。
  • 国际化适配:新增英文界面适配,满足更多用户需求。

🔧 bug 修复

  • 应用信息修复:彻底修复了部分场景下应用名与应用图标获取失败或错误的问题。

Assets

1

1.1.1

Stable

5/25/2026, 11:29:03 AM

在调试页面(连续点击五次软件名或图标)中:
增加“禁用输出LSP模块日志”
增加“日志输出等级选择”

Assets

1

1.1.0

Stable

5/24/2026, 12:28:04 PM

🐛 Bug Fixes
修复一加 / ColorOS 设备无法正常工作的问题
修复 system_server 因目录权限不足(EACCES)无法写入 detected_channels.json 和 hook.log 的问题

✨ New Features
新增调试模式(关于页面 → 连续点击应用图标或应用名 5 次进入)
新增输出日志开关
新增Root 权限检测

📝 Notes
hook.log 默认不再写入,可自行进入调试模式手动开启

Assets

1