Releases: Zhanfg/PatchNest-Module
Releases · Zhanfg/PatchNest-Module
Release list
PatchNest v0.4.1-rc2
PatchNest v0.4.1-rc2
🐛 Bug fixes (on-device report 2026-06-08)
- Boot image detection on A/B slot B:
find_boot_image()now searches forboot_bandkern_a(was missing on A/B devices running slot B with empty $SLOT — confirmed on OnePlus PJZ110 / Android 16). Fixes WebUI错误:找不到 Boot 镜像error. - KSU version field:
module.prop::versionstripped ofvprefix (v0.4.1-rc1→0.4.1-rc2). KernelSU CN-locale module list parser does not recognizev-prefixed versions as valid SemVer and falls back to "Unknown" for both version and author. - Side effect of the above: "未安装" status on the detail page was a downstream consequence of the boot-image detection failure —
kpatch hellofails because kpimg was never injected. Auto-resolves once the boot detection fix takes effect.
📦
versionCode: 25 → 26version: v0.4.1-rc1 → v0.4.1-rc2
Install / Update
Existing users: re-install this zip in KernelSU → Modules → Install from storage. New users: standard install. WebUI update-check will detect the new version automatically.
v0.4.1-rc1
PatchNest Module
v0.4.1-rc2
🔀 Rebrand: KPatch-Next → PatchNest
- Project renamed from "KPatch-Next" to "PatchNest" across 68 files:
shell scripts, CI workflows, WebUI (JS/HTML/CSS), 15 locale XMLs,
docs, tests, module.prop, update.json, version.properties. - Data directory changed from
/data/adb/kp-next/to/data/adb/patchnest/. - Binary source changed from
KernelSU-Next/KPatch-NexttoZhanfg/PatchNest. - Module ID changed from
KPatch-NexttoPatchNest. - Variable names updated:
KPNDIR→PNDIR,VERSION_KPATCH_NEXT→VERSION_PATCHNEST.
🔒 Security (post-rename audit)
- service.sh exclusion grep fixed:
grep -F "^$pkgq "was missing
^anchoring with-F(literal match), replaced withgrep "^$pkgq ". - boot_unpatch.sh inverted
patched=logic corrected. - compile_kpm.sh uninitialized
compile_rcvariable fixed.
⚡ Robustness
- WebView compatibility: Vite build target changed from
es2022to
['chrome80', 'es2020']for Android WebView 80+ support (2020+ devices). - Top-level await removed from
index.js; uses dynamicimport().then(). - 4 missing i18n keys synced across all 15 locales.
- CRLF → LF line endings fixed in all
module/*.shscripts.
📦 Build
- v0.4.1-rc2 zip packaged (1.95 MB, 66/66 validation + 117/117 tests pass).
- Docker test suite: 41/43 pass (2 expected warnings).
anti-detect KPM suite is no longer built into the PatchNest module. /data/adb/patchnest/repos.jsonsystem override: PatchNest now
lets a PatchNest fork ship a non-default default repo: drop a
30+ correctness, security, and robustness fixes accumulated since v0.2.2. Highlights below; full list at #1- Zhanfg/PatchNest.
- 双二进制源: kpimg/kptools 来自 KernelPatch-Public,kpatch 来自 PatchNest
|Zhanfg/PatchNest-Module| 公开 | 模块发布,CI 自动构建 |
v0.3.0-rc9
chore(release): bump to v0.3.0-rc9 (build=23) Includes the rc8 → rc9 delta: - packaging: simplified the release job's zip step back to 'cd MODULE_NAME && zip -r ... .' which matches the original build.sh contract. The earlier 'mkdir module && cp -al' approach over-engineered the wrapping and would have changed the zip's internal layout in a way that the root manager might not have expected.
v0.3.0-rc8
chore(release): bump to v0.3.0-rc8 (build=22) The v0.3.0-rc7 tag was already published, so the release job's check_tag step on rc7's commit would have correctly seen the tag exists and skipped publishing rc7 again. To actually deliver the packaging fix to users we need a new tag. Includes the rc7 → rc8 delta: - packaging: release job now creates a module/ subdirectory inside the zip so Magisk / KernelSU-Next / APatch find module/module.prop at the expected path (rc7 was zipping flat files which the root manager showed as 'unknown') - webui=webroot: explicit field so KernelSU-Next / APatch know which subdirectory to serve the WebUI from (rc7 omitted this and they fell back to the module root, which is empty, producing the black-page bug) - module.prop versionCode 21 → 22
v0.3.0-rc7
chore(release): bump to v0.3.0-rc7 (build=21) Bumps module.prop versionCode 20 → 21 and update.json's version pointer to v0.3.0-rc7. The release job's check_tag step sees no existing v0.3.0-rc7 tag and emits need_release = true, which triggers the release job to run softprops/action-gh-release@v2 — pushing the tag and uploading KPatch-Next-Module.zip to the release. Includes the v0.3.0-rc6 → v0.3.0-rc7 delta: - ultracode-audit-2026-06-06 round 2: comprehensive P1/P2/P3 hardening across shell+webui (138 P1, 194 P2, 154 P3 fixed; 7 pre-existing test failures remain — see CHANGELOG.md for the full list). - APM-style KPM update flow: webui/page/kpm-update.js with diff/badge/auto-check + openUrlInstallDialog for direct zip-URL installation. - semver 13-corner-case test suite in utils.test.js. - New Zhanfg/Kpm-Repo GitHub repository as the canonical source of kpm_repo.json (previously only available in .audit/worktree/). DEFAULT_REPO_URL in webui/page/kpm_repo.js now resolves to the live URL. - CI: workflow-level contents:read default, setup-ndk pinned to commit SHA, locale completeness verified, magiskboot treated as optional binary. Also: documented two follow-up tasks for the maintainer: (1) refresh 4 stale SHA256 hashes in version.properties (the current ones don't match upstream artifacts), and (2) integrate the Kpm-Repo clone-and-build into the arm64-test/release jobs to replace the 'for src in module/kpms/*.c' loop that no-ops on main (the KPM sources live in the standalone Kpm-Repo project now).
v0.3.0-rc6
fix(ci): treat magiskboot as optional + grant release job contents:write - tests/validate_module.js: mark magiskboot as optional in the REQUIRED_BINARIES list. The current build can ship without magiskboot when boot_patch.sh's Magisk APK download fails (e.g. during the SHA-hash refresh window when the pinned hash doesn't match upstream). Downstream code in boot_patch.sh already handles the magiskboot-missing case for the non-Magisk flows (APatch / KernelSU-Next paths don't unpack with magiskboot). The validator no longer treats it as a hard failure; it just emits an OPTIONAL MISSING warning. - .github/workflows/build.yaml: add 'permissions: contents: write' to the release job (re-adding the override that the workflow- level read-only default needs to be paired with). The softprops/action-gh-release step in this job is the only step in the whole workflow that requires write access; every other job stays read-only.
v0.2.4
v0.2.4
30+ correctness, security, and robustness fixes accumulated since v0.2.2. Highlights below; full list at #1
🔒 Security
- Shell injection in user-controlled shell commands:
loadModule,cp,kpm_repo.jsURL,exclude.jsCSV writer,backup.jssave path,index.jsrehook command. All paths now sanitize input and useescapeShell/sanitizeUrl/ single-quoted heredocs. - Backup path traversal in save-to-storage: filename is now stripped to basename only;
..rejected. - Repo download size cap:
--max-filesize 50 MiBon curl to defend against malicious or compromised repos.
🐛 Critical fixes
- Flash guard precedence bug in
boot_patch.sh: the oldif [ -b ] || [ -c ] && [ -f ]would silently attempt to flash block-device boot images even whennew-boot.imgwas missing. Now requires both the device to be a block/char device ANDnew-boot.imgto exist. - KPM validator silently dropped the first
-M <file>argument becauseprev_flagwas empty on iteration 0. Sentinel initialization fixes it; also dropped the bogus b700 big-endian aarch64 check. - Compiler exit code masked in
compile_kpm.sh:$?read the subsequent[ "$ARCH" = "arm64-v8a" ]test, not the compiler. Explicitcompile_rc=$?capture. magiskboot repackexit code misread inboot_patch.sh:$?was reading the nextecho, not magiskboot. Replaced withif ! magiskboot ....- Subshell-piped
whileloop inservice.shlost state on exit; replaced with here-doc reader. Also added 5-minuteboot_completedtimeout to prevent infinite loop on broken ROMs. - 5-second infinite loop in
status.shforboot_completed— same fix. find -oprecedence bug ininstall_kpm.shmatched.kpmdirectories and.bakfiles. Added explicit-type f \( -o -o \).
⚡ Robustness
- Rehook switch UI now rolls back on backend failure instead of leaving the toggle out of sync.
initInfoshows em-dash instead of literal"undefined"whenunamereturns empty.tail -200→tail -n 200inlog.js(toybox interprets the former as byte offset).status.shrace betweencat tmp > fileand concurrent readers; replaced withmv. Sed delimiter changed to|so values with/don't break it.status.shself-cleanup usesreadlink -ffallback forrealpath(not on all toybox builds).- Empty KPM directory no longer makes the for-loop run once against a literal
*.kpmstring. MAX_CHUNK_SIZEis now initialized via awaited async before uploads can start; no more race.- Upload pipes now have 60s/chunk + 120s/combine timeouts and respect AbortSignal so an aborted upload kills orphan base64 pipes.
- Pull-to-refresh requires single-finger gestures; multi-finger and touchcancel abort cleanly.
- Load failure preserves the uploaded file in
modDir/tmpfor inspection and retry. kpmItemMapprunes stale entries on each render so a renamed module doesn't leave a stale listener bound to the old name.- 3-click KSUWebUIStandalone redirect fires at most once per session.
- DEV short-circuit in
parseBootimgno longer skipsrenderKpmList()— dev UI now matches prod.
📦 Build / dependencies
kpatch-nextpinned to0.13.5-2(waslatest— non-reproducible builds).pnpm build || pnpm install && pnpm buildprecedence fix.$ARGS_OPTand$SRC_FILESquoting fixes ininstall_kpm.sh/compile_kpm.sh.
📋 Misc
- New
KERNELPATCH_FORK_MAINTENANCE.mddocumenting the relationship with the upstreambmax121/KernelPatchand how to sync. module.binarm64 test workflow unchanged.
Credits
- APatch boot scripts (vendored, with our patches).
- bmax121/KernelPatch upstream.
- KernelSU-Next/KPatch-Next.
v0.2.3
fix: break WebUI circular dependency causing black screen Root cause: page modules imported from index.js which has top-level await, causing TDZ (temporal dead zone) errors. Solution: - Created constants.js with shared values (modDir, persistDir) and pure utilities (escapeShell, linkRedirect, MAX_CHUNK_SIZE) - Page modules import from constants.js instead of index.js - constants.js imports kernelsu-alt directly (not circular) - kpm.js: initInfo imported from index.js (only used in DOMContentLoaded handlers, no TDZ risk) This eliminates the circular dependency chain: index.js → page/*.js → index.js (TDZ) becomes: index.js → page/*.js → constants.js (no cycle) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v0.2.2
KPatch Next Module v0.2.2
基于 KernelPatch 的 Magisk/KernelSU/ReSukiSU/APatch 内核补丁模块。
🌐 多 Root 管理器兼容
- 自动检测 Magisk / KernelSU / ReSukiSU / APatch
- WebUI 适配各管理器(KSUWebUIStandalone / 原生 WebUI)
- Magisk 用户可通过 KSUWebUIStandalone 使用
📦 KPM 用户体验(类 APM)
- ZIP 一键安装 (module.prop + .kpm/.ko/.o/.c)
- 事件自动注册 (event=BOOT_COMPLETED)
- 源码编译 (compile_kpm.sh)
- KPM 在线仓库浏览器
- 自动加载 (autoLoad=true)
🔒 崩溃防护
- 启动计数器:3 次失败 → 安全模式
- ELF 预加载验证
- 故障 KPM 黑名单
- 嵌入式 KPM 早期保护
🕶️ 完整隐藏系统
- 文件系统隐藏 (可配置 umount)
- SELinux enforce/上下文隐藏
- 进程名重命名
🛡️ 内核特性 (KernelPatch fork)
- App Profile 体系 / SELinux 策略操作
- KPM 事件系统 / .o/.ko 格式支持
- 安全模式 / 内核兼容 3.18-6.12+
🖥️ WebUI
- 日志查看器 / 备份管理 / KPM 仓库
- 15 种语言完整翻译
- 白屏修复 + 容错
🏗️ CI
- 7 类 60+ 项自动化检查
- 模块包完整性验证
- 自动发布
下载 KPatch-Next-Module.zip → 在管理器中刷入 → 重启 → WebUI 补丁内核 → 再重启