HonorMarketTamer(荣耀市场净化)

⚠️ 本模块由 AI 生成 / This module is AI-generated

本项目由大语言模型(AI)在人类指导下生成并迭代维护,包括全部 Hook 代码、设置界面、 构建流水线与文档。代码未经人工长期审计,请自行评估风险后使用;欢迎人工审查与 PR。

This project was generated and iterated by a large language model (AI) under human direction, including all hook code, the settings UI, the build pipeline and these docs. The code has not been long-term audited by humans — evaluate the risk yourself; human review and PRs are welcome.

面向荣耀应用市场 com.hihonor.appmarket 的功能精简 LSPosed 模块。 设计原则:“搜索应用”与“应用更新”永远可用;其余功能全部提供独立开关,可随时屏蔽/恢复。

An LSPosed module that trims the Honor App Market (com.hihonor.appmarket). Design principle: "search" and "app updates" always keep working; every other feature is an independent switch you can toggle on or off at any time.

功能一览 / Features

分类 Category 功能 Feature
推荐流 Feed 搜索页推荐流在请求源头拦截(输入框即时可用)/ Search-page feed blocked at the request source (input box usable instantly)
推荐流 Feed 详情页推荐区块、更新页“新应用”推荐 / Detail-page recommendations & "new apps" on Updates page
广告 Ads 开屏广告、运营活动弹窗、悬浮窗、桌面卡片推广、个性化广告弹窗 / Splash ads, promo dialogs, floating windows, widget tips, personalized ads
骚扰 Nuisance 营销推送通知、自启与广播唤醒 / Marketing push notifications, auto-start & broadcast wake-ups
页面 Pages 底部「游戏/应用/抢鲜」页签 / Bottom tabs: Games / Apps / Early-Access
「我的」页 Mine page 签到、安全检测、清理加速、常用服务、滑动横幅卡片 / Check-in, security scan, cleaner, services, swipe banner cards
搜索 Search 搜索框滚动热词横幅 / Rolling hot-word banner in the search box
搜索 Search 搜索结果首位广告展位大卡、底部「装机必备」横滑 / First-position ad booth card & "Must-install" strip in search results
广告 Ads 工具页标题栏运营活动入口(应用更新/安装管理等,如"耀耀农场"树形图标)/ Tool-page header activity entries (Updates, Install Manager, …)

共 28 个功能开关(另有 1 个总开关),默认配置即推荐配置。设置页每个选项均附英文说明。 28 feature switches plus a master switch; defaults are the recommended set. Every option in the settings UI carries an English subtitle.

环境要求 / Requirements

  • 已 root 的荣耀/MagicOS 设备:Magisk 或 KernelSU + Zygisk + LSPosed。 A rooted Honor/MagicOS device: Magisk or KernelSU + Zygisk + LSPosed.
  • 荣耀应用市场 16.1.6.302 / 16.1.7.303 / 16.1.8.301 / 16.1.8.305(实测适配版本;其它版本类名可能漂移)。 Honor App Market 16.1.6.302 / 16.1.7.303 / 16.1.8.301 / 16.1.8.305 (the versions this module was tested against; other versions may drift).

该市场的包经过资源与代码混淆,其他版本的类名可能变化导致功能静默失效; 可在 LSPosed 日志过滤 HonorMarketTamer 查看 armed 行确认 Hook 是否命中。 The market APK is obfuscated; class names may change across versions and hooks can silently miss. Filter LSPosed logs for HonorMarketTamer and check the armed lines to confirm hooks are in place.

使用方法 / Usage

  1. 在 LSPosed 中启用本模块并勾选作用域「荣耀应用市场」。 Enable the module in LSPosed and select the "Honor App Market" scope.
  2. 强制停止「应用市场」后重新打开。 Force-stop the market app and reopen it.
  3. 设置入口:LSPosed 模块详情页,或桌面「荣耀市场净化」图标。 Open settings from the LSPosed module page, or the launcher icon.

作用域说明 / Scope note

  • 主功能(市场净化)只需要勾选「荣耀应用市场」(com.hihonor.appmarket)。 The core (market cleanup) only needs the "Honor App Market" scope (com.hihonor.appmarket).
  • 「运动健康传感器闸门」(默认关闭)需要额外勾选「荣耀运动健康」 (com.hihonor.health)作用域,并在设置页打开该开关。该闸门只在健康 app 进程内 拦自己的传感器注册,无需勾选 iaware、ha ware(awareness)或「系统组件」 ——桌面步数卡片的中枢硬件在熄屏期继续累计,熄屏停采不丢数。 The health-sensor gate (off by default) additionally needs the "Honor Health" scope (com.hihonor.health) plus the switch turned on in settings. It only intercepts the health app's own sensor registrations inside that process, so the iaware / ha ware (awareness) / "system components" scopes are not required — the step-count hub keeps accumulating in hardware while the screen is off.
  • 「指纹解锁震动」(默认开启)需要额外勾选「系统用户界面」(com.android.systemui) 作用域。钩子挂在 SystemUI 自己的 KeyguardUpdateMonitor 成功回调上,无需勾选 「系统框架」,也不需要 LSPosed 的系统作用域修复开关。 The fingerprint-unlock vibration (on by default) needs the "System UI" scope (com.android.systemui). The hook sits on SystemUI's own KeyguardUpdateMonitor success callback, so the "Android System" (framework) scope is not needed, nor the LSPosed system-scope workaround.

权限说明 / Permissions note

模块日常运行(Hook 过程)不执行任何 root 操作。仅在设置页保存开关时会尝试请求 root 同步一份全局配置副本(绕过 LSPosed 数据目录重定向的读取限制);拒绝该请求不影响功能, 配置会自动落到其余副本路径。

The module performs no root operations while hooking. Root is only requested when you save switches in the settings UI, to sync a global copy of the config file (working around LSPosed's data-directory redirection). Denying that request does not break anything — the config falls back to other copies automatically.

从源码构建 / Build from source

本项目刻意不依赖 Gradle / Android SDK:

python tools/build_module.py

流程:javac --release 8(手写 stub)→ dalvik dx → 手写二进制 AndroidManifest (axml_writer.py)+ 最小 resources.arsc(arsc_builder.py)→ zip 打包 → apksig 签名。 产物输出至 dist/。构建深坑记录见 PITFALLS.md。

This project deliberately avoids Gradle and the Android SDK: compile with plain javac --release 8 against hand-written stubs, dex it, emit a binary manifest (axml_writer.py) and a minimal resources.arsc (arsc_builder.py) by hand, zip, then sign with apksig. Output lands in dist/. See PITFALLS.md for the hard-won lessons.

项目结构 / Project layout

app/src/main/java/com/tamer/honormarket/
├── MainHook.java              # Xposed 入口 / entrypoint
├── TamerConfig.java           # 开关键与三级配置加载 / keys + config loading
├── hooks/                     # 各功能 Blocker / feature blockers
│   ├── RecommendFeedBlocker   # 搜索&详情推荐流 / search & detail feeds
│   ├── MineSectionBlocker     # 「我的」页卡片 / mine-page cards
│   ├── RollWordBlocker        # 滚动热词 / rolling banner
│   ├── TabStripper            # 底部页签 / bottom tabs
│   ├── PushWakeBlocker        # 推送与自启 / push & wake-up
│   └── SplashAdBlocker        # 开屏广告 / splash ads
└── ui/SettingsActivity.java   # 纯代码设置页 / code-only settings UI
tools/
├── build_module.py            # 一键构建流水线 / one-shot build pipeline
├── axml_writer.py             # 二进制 AXML 编码器 / binary AXML encoder
├── arsc_builder.py            # 最小 resources.arsc 构建器 / minimal arsc builder
├── _validate_arsc.py          # arsc chunk 链校验器 / arsc chain validator
└── icon/ic_launcher.png       # 中性图标 / neutral icon

免责声明 / Disclaimer

  • 本项目仅供学习与研究 Android Hook 技术使用,请勿用于商业用途。 For learning and research on Android hook techniques only; do not use commercially.
  • 与荣耀公司/HONOR 无任何关联;“应用市场”相关商标与原应用版权归原厂所有; 模块图标为中性图形,不含任何品牌素材。 Not affiliated with Honor Device Co., Ltd. All trademarks and rights to the original app belong to their owner; the module icon is a neutral graphic.
  • 使用本模块产生的任何后果由使用者自行承担。 Use at your own risk.

Releases

1.4.9

Stable

10/1/2026, 12:22:12 AM

Release v1.4.9(versionCode 40)

⚠ AI-generated module / 本模块由 AI 生成,代码未经人工长期审计,请自行评估风险。

更新内容 / What's new

  • 新增「指纹解锁成功震动」:挂在 SystemUI 的 KeyguardUpdateMonitor 成功回调上,
    20 ms 短震,设置页可关;需为本模块勾选「System UI / 系统用户界面」作用域,
    不需要系统框架作用域。
    New: haptic feedback on successful fingerprint unlock, hooked inside SystemUI
    (20 ms one-shot, toggle in settings). Needs the System UI scope only, not the
    Android System (framework) scope.
  • 修复推荐作用域从未显示:xposedscope 元数据此前用逗号拼接,而 LSPosed 按 ;
    切分,整串被当成一个不存在的包名,模块详情页一条「推荐应用」都没有。
    Fixed the recommended-scope list never appearing: the xposedscope meta-data was
    comma-joined while LSPosed splits on ;, so the whole string parsed as one
    non-existent package name.
  • 市场 16.1.8.305 适配沿用 v1.4.6/1.4.7,本次未改动任何拦截钩子逻辑。
    Market 16.1.8.305 adaptation carried over from v1.4.6/1.4.7; no hook changes here.
  • 与 v1.3.3+ 同签名密钥,可直接覆盖安装,无需卸载。
    Same signing key as v1.3.3+ — install over the old one directly.

Assets

1

1.4.7

Stable

9/17/2026, 3:03:36 PM

Release v1.4.7(versionCode 38)

⚠ AI-generated module / 本模块由 AI 生成,代码未经人工长期审计,请自行评估风险。

更新内容 / What's new

  • 修复「运动健康传感器闸门」在部分设备上反复刷错误日志的问题:亮/灭屏接收器
    注册桩签名写错导致每次注册都抛异常、每 5 秒重试刷屏;现已修正,接收器一次
    注册成功,闸门按预期在熄屏停采、亮屏恢复。
    Fixed the health-sensor gate repeatedly logging errors on some devices: a wrong
    compile-time stub signature made the screen on/off receiver registration throw on
    every attempt and retry-spam the log every 5s. The receiver now registers in one
    shot and the gate stops/resumes sensor sampling as intended.
  • 配置读取链路加固:对 LSPosed 即将弃用/移除的 XSharedPreferences 通道做兜底,
    框架升级移除该通道后自动降级到 conf 文件链路、不再影响开关生效。
    Hardened the config read path against the LSPosed XSharedPreferences channel that
    is being deprecated/removed: after a framework upgrade drops it, the module falls
    back to the conf-file channel automatically instead of breaking.
  • 与 v1.3.3+ 同签名密钥,可直接覆盖安装,无需卸载。
    Same signing key as v1.3.3+ — install over the old one directly.

Assets

1

1.4.6

Stable

9/16/2026, 12:13:18 PM

Release v1.4.6(versionCode 37)

⚠ AI-generated module / 本模块由 AI 生成,代码未经人工长期审计,请自行评估风险。

更新内容 / What's new

  • 适配市场最新 16.1.8.305:开屏广告、运营弹窗、推荐流、消息中心等多处锚点
    重新对齐,旧版本市场继续可用。
    Adapted to the latest market 16.1.8.305: splash ads, promo dialogs, recommended
    feeds and the message center are re-anchored; older market versions keep working.
  • 拨开关即后台同步:市场不再抢占前台,新配置无需拉起或重启市场即可生效。
    Toggling a switch now syncs in the background — the market no longer comes to the
    foreground, and new settings apply without launching or restarting it.
  • 新增「运动健康传感器闸门」与「消息中心屏蔽」,均默认关闭。
    New health-sensor gate and message-center blocking, both off by default.
  • 与 v1.3.3+ 同签名密钥,可直接覆盖安装,无需卸载。
    Same signing key as v1.3.3+ — install over the old one directly.

Assets

1