本项目由大语言模型(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.
| 分类 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.
- 已 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 forHonorMarketTamerand check thearmedlines to confirm hooks are in place.
- 在 LSPosed 中启用本模块并勾选作用域「荣耀应用市场」。 Enable the module in LSPosed and select the "Honor App Market" scope.
- 强制停止「应用市场」后重新打开。 Force-stop the market app and reopen it.
- 设置入口: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 ownKeyguardUpdateMonitorsuccess callback, so the "Android System" (framework) scope is not needed, nor the LSPosed system-scope workaround.
模块日常运行(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.
本项目刻意不依赖 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.
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
- 本项目仅供学习与研究 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.