refactor(build): 现代化 Android 与 CI 构建工具链 - #8
Merged
Merged
Conversation
Soulize
force-pushed
the
refactor/modern-build-toolchain
branch
from
October 1, 2026 15:38
ae92bc6 to
4de3308
Compare
Soulize
force-pushed
the
refactor/modern-build-toolchain
branch
from
October 1, 2026 16:00
4019e7c to
b3c0892
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
将当前依赖 Java 8 / dx / API 23 / 硬编码系统路径的构建链迁移到现代 Android 工具链,同时保持运行时行为不变。
主要改动
enableKotlin = false,避免 AGP 9 built-in Kotlin 自动打入 kotlin-stdlibcompileOnly,暂不迁移 Hook API/root/xposed_lib、/usr/lib/android-sdk/...等机器路径依赖ExpiredTargetSdkVersion:本项目为 sideload/KSU/LSPosed 模块,不发布 Play StoreBlockedPrivateApi:setSkipScreenshot为模块有意使用的系统私有 API同源码构建对比
基线:当前 main
336467clegacy CI run #70最终现代构建:PR CI run #82
早期 modern 实验包曾出现约 722 KB 的 Hook APK。原因已定位为 AGP 9 默认启用 built-in Kotlin,即使模块没有 Kotlin 源码也会自动添加 Kotlin 标准库。对 Java-only Hook 模块设置
enableKotlin = false后,APK 降至 87,360 B,不再包含 Kotlin runtime。成品断言
最终 run #82 直接检查生成后的 APK/KSU 产物:
com.agent.mobileuse8000.8.0-alpha262836xposedmodule/xposedminversion/xposedscope均存在f1c2a4a54d836b140ea86f5bafde2348fa0950a87a5d6eb5c8da400ca2b66b1141512dcf0e9d7b90296f53b1913070b446dd2356706b1e375ce469d18a48440c行为边界
本 PR 不修改 overlay、Hook、截图、输入、会话、协议等业务逻辑;不改变 targetSdk;不启用代码混淆/压缩。因此现代化构建不会引入由 targetSdk 或 R8 导致的运行时行为变化。
运行时性能方面,这次迁移本身不应带来可感知的加速,也没有发现会导致性能退化的产物变化:核心 Go daemon 字节级一致,Hook APK 和两个工具 DEX 反而更小。主要收益是构建可复现性、维护性和现代 CI 兼容性。