From 735138a7f0812cc86f618138197902a32b153b64 Mon Sep 17 00:00:00 2001 From: ClozyA <133191303+ClozyA@users.noreply.github.com> Date: Mon, 30 Nov 2026 19:32:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A1=A5=E5=85=85=20KernelSU=20=E5=90=8C?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9E=84=E5=BB=BA=E7=9A=84=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E4=B8=8E=E5=8D=87=E7=BA=A7=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 10 ++++++---- README.md | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.en.md b/README.en.md index 0095adb..cdb072c 100644 --- a/README.en.md +++ b/README.en.md @@ -9,6 +9,7 @@ Builds `kernelsu.ko` for ModAVD's Android 14 API 34 Google APIs x86_64 r14 image - `x86_64-seccomp-skip.patch` preserves the kernel's decision to skip a system call when the call number is read again. - `x86_64-do_syscall_64-fallback.patch` selects the compatibility entry when r14 lacks `x64_sys_call`. It applies after the first patch. - `disable-module-unload.patch` disables live unloading. In-flight system calls may return to module code. Shut down the guest normally to remove the module. +- `observer-release-mount-reference.patch` releases the `/data/system` mount reference after registering the package watch so Android can unmount `/data` during shutdown. Use Docker, Python 3, and Git on Linux x86_64. Prepare a full KernelSU clone containing the configured `ksu_commit` and pass the target ID, checkout path, and working directory to `build-target.sh`. Outputs are in `/out` under that directory. The log includes the module SHA-256 and vermagic. @@ -16,12 +17,12 @@ PR builds validate changes. While `lkm_sha256` and `lkm_size` are not pinned in ## Release tag and file name -This target's module is published in this repository's Release `v3.3.1-a14-6.1` as `a14-api34-6.1_kernelsu-v3.3.1_kernelsu.ko`. ModAVDManager's download URL hard-codes this tag and file name. +This target first shipped as `a14-api34-6.1_kernelsu-v3.3.1_kernelsu.ko` under the `v3.3.1-a14-6.1` tag. ModAVDManager pins the tag and file name in its download URL and checks the size and SHA-256. -- Tag: `-a-`, that is `ksu_version` followed by `kmi` with `android` shortened to `a` (`android14-6.1` → `a14-6.1`). +- Use `-a-` for the first release. Shorten `android` to `a` in `kmi` (`android14-6.1` → `a14-6.1`). For a new build of the same version and target, append `-r2`, then `-r3` and so on. Keep published tags and assets available because older Manager builds still download and verify those files. - File name: `_kernelsu-_kernelsu.ko`, the same name as the file in the `verified-` artifact. -Follow these rules when changing the KernelSU version or adding a target, and update ModAVDManager's download URL to match. +Use `v3.3.1-a14-6.1-r2` for the Android 14 r14 build with the shutdown fix. Its pinned size is 259360 bytes and its SHA-256 is `c7d4b83f60cb7b0b873ab3b56624de45777620af9a1c66fe64fdbb18be7090f4`. ## How maintainers publish a new version @@ -29,7 +30,8 @@ Follow these rules when changing the KernelSU version or adding a target, and up 2. Validate the candidate on a disposable r14 test instance. Import it with `modavd components import-ksu --lkm-sha256 `, then check that it loads, its vermagic is the full kernel release, unloading returns EBUSY, and the guest boots and shuts down normally. 3. Once it passes, copy the size and SHA-256 from the step summary into `lkm_size` and `lkm_sha256` in `targets.json` and open a PR. That PR build checks both the size and the digest and fails on a mismatch. When possible, confirm the digest with an independent build. 4. After merging, run this workflow manually on `main` (Actions → Build KernelSU LKM → Run workflow) to get the `verified-ksu-lkm-` artifact, kept for 14 days. -5. Create the tag and Release named by the rules above, attach the `.ko`, `SHA256SUMS.txt`, and `.env` from the `verified-` artifact, and pin the same size and SHA-256 in ModAVDManager's KernelSU manifest. +5. Create the tag and Release on the commit used for the verified build. Attach the `.ko`, `SHA256SUMS.txt`, and `.env`. After publishing, download the public `.ko` and check its size and SHA-256 before updating `OfficialLKMDownloadURL`, `OfficialLKMSize`, and `OfficialLKMSHA256` together in ModAVDManager. +6. In the Manager release notes, tell users to shut down existing KernelSU instances normally, download the updated component, and use **Enable KernelSU** again (or run `modavd ksu install`) for each affected instance. The new module hash differs from the old ramdisk's recorded hash, so the instance boots with the stock ramdisk until it is rebuilt. Re-enabling preserves module data and does not require `uninstall --purge`. ## License and sources diff --git a/README.md b/README.md index 66bdb4c..3646e1d 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ - `x86_64-seccomp-skip.patch` 保留内核已决定跳过的系统调用。后续重新读取系统调用号时仍保留这个结果。 - `x86_64-do_syscall_64-fallback.patch` 在 r14 缺少 `x64_sys_call` 时选用现有兼容入口,按顺序在前一份补丁之后应用。 - `disable-module-unload.patch` 禁止在线卸载。运行中的系统调用返回时仍可能经过模块代码,通过正常关闭客体移除模块。 +- `observer-release-mount-reference.patch` 在注册包监听后释放 `/data/system` 的挂载引用,让 Android 关机时能卸载 `/data`。 在 Linux x86_64 上使用 Docker、Python 3 和 Git。准备一份完整克隆,能解析配置中 `ksu_commit` 的 KernelSU Git 仓库,将目标 ID、该仓库路径和工作目录传给 `build-target.sh`。输出在工作目录的 `<目标 ID>/out`,日志包含模块的 SHA-256 和 vermagic。 @@ -16,12 +17,12 @@ PR 构建用于验证。`targets.json` 里还没钉模块的 `lkm_sha256` 和 `l ## 发布标签和文件名 -这个目标的模块发布在本仓库的 Release `v3.3.1-a14-6.1`,附件名是 `a14-api34-6.1_kernelsu-v3.3.1_kernelsu.ko`。ModAVDManager 的下载地址写死了这个标签和文件名。 +这个目标首次发布的标签是 `v3.3.1-a14-6.1`,附件名是 `a14-api34-6.1_kernelsu-v3.3.1_kernelsu.ko`。ModAVDManager 按固定的标签和文件名下载,再核对文件大小和 SHA-256。 -- 标签:`-a-<内核主次版本>`,也就是 `ksu_version` 接上 `kmi` 把 `android` 缩写成 `a` 以后的部分(`android14-6.1` → `a14-6.1`)。 +- 首次发布用 `-a-<内核主次版本>`,将 `kmi` 里的 `android` 缩写成 `a`(`android14-6.1` → `a14-6.1`)。同一版本和目标重新构建时,追加 `-r2`,后续依次用 `-r3` 等。保留已发布的标签和附件,旧版管理器仍会按原地址下载并核对旧钉值。 - 文件名:`<目标 ID>_kernelsu-_kernelsu.ko`,和 `verified-` 制品里的文件同名。 -换 KernelSU 版本或者加目标时按这个规则起名,并同步改 ModAVDManager 的下载地址。 +包含关机修复的 Android 14 r14 构建使用 `v3.3.1-a14-6.1-r2`,现有目标钉值是 259360 字节,SHA-256 为 `c7d4b83f60cb7b0b873ab3b56624de45777620af9a1c66fe64fdbb18be7090f4`。 ## 维护者怎么出一个新版本 @@ -29,7 +30,8 @@ PR 构建用于验证。`targets.json` 里还没钉模块的 `lkm_sha256` 和 `l 2. 在一次性的 r14 测试实例上验证这份候选模块:用 `modavd components import-ksu <解压出的 .ko 或文件夹> --lkm-sha256 ` 导入,然后确认能加载,vermagic 是完整的内核版本串,卸载返回 EBUSY,客体能正常开机和关机。 3. 验证通过后,把 step summary 里的大小和 SHA-256 填进 `targets.json` 的 `lkm_size`、`lkm_sha256`,开 PR。这次 PR 构建会同时比对大小和哈希,不一致就失败。有条件时另做一次独立构建,确认哈希一致。 4. 合并后,在 `main` 上手动触发这个工作流(Actions → Build KernelSU LKM → Run workflow),得到 `verified-ksu-lkm-<目标 ID>` 制品,保留 14 天。 -5. 按上面的规则建标签和 Release,把 `verified-` 制品里的 `.ko`、`SHA256SUMS.txt` 和 `.env` 挂成附件,再把同一组大小和 SHA-256 填进 ModAVDManager 的 KernelSU 清单。 +5. 在 verified 制品对应的构建提交上按上面的规则建标签和 Release,上传 `.ko`、`SHA256SUMS.txt` 和 `.env`。发布后从公开下载地址重新下载 `.ko`,核对大小和 SHA-256,再同步更新 ModAVDManager 的 `OfficialLKMDownloadURL`、`OfficialLKMSize` 和 `OfficialLKMSHA256`。 +6. 在管理器发版说明提醒已启用 KernelSU 的用户先正常关闭实例,再下载新版组件,然后对每个原先启用过的实例重新执行「启用 KernelSU」(或 `modavd ksu install`)。新版模块的哈希与旧 ramdisk 的校验记录不同,重建前开机会回退到原版 ramdisk。已有模块数据通过重新启用保留,升级无需执行 `uninstall --purge`。 ## 许可证和来源 From 1e903ecf933772b7d428edb1ce973aa563b890c5 Mon Sep 17 00:00:00 2001 From: ClozyA <133191303+ClozyA@users.noreply.github.com> Date: Mon, 30 Nov 2026 19:36:54 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=86=99=E6=98=8E=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=99=A8=E9=87=8D=E5=BB=BA=20KernelSU=20ramdisk=20=E7=9A=84?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index cdb072c..18d3448 100644 --- a/README.en.md +++ b/README.en.md @@ -31,7 +31,7 @@ Use `v3.3.1-a14-6.1-r2` for the Android 14 r14 build with the shutdown fix. Its 3. Once it passes, copy the size and SHA-256 from the step summary into `lkm_size` and `lkm_sha256` in `targets.json` and open a PR. That PR build checks both the size and the digest and fails on a mismatch. When possible, confirm the digest with an independent build. 4. After merging, run this workflow manually on `main` (Actions → Build KernelSU LKM → Run workflow) to get the `verified-ksu-lkm-` artifact, kept for 14 days. 5. Create the tag and Release on the commit used for the verified build. Attach the `.ko`, `SHA256SUMS.txt`, and `.env`. After publishing, download the public `.ko` and check its size and SHA-256 before updating `OfficialLKMDownloadURL`, `OfficialLKMSize`, and `OfficialLKMSHA256` together in ModAVDManager. -6. In the Manager release notes, tell users to shut down existing KernelSU instances normally, download the updated component, and use **Enable KernelSU** again (or run `modavd ksu install`) for each affected instance. The new module hash differs from the old ramdisk's recorded hash, so the instance boots with the stock ramdisk until it is rebuilt. Re-enabling preserves module data and does not require `uninstall --purge`. +6. In the Manager release notes, tell users to shut down existing KernelSU instances normally and download the updated component. Run `modavd ksu install` directly for each affected instance. In the Manager, select **Remove KernelSU**, leave the data cleanup option unchecked, then select **Enable KernelSU**. This rebuilds the ramdisk and preserves existing module data. The new module hash differs from the old ramdisk's recorded hash, so the instance boots with the stock ramdisk until it is rebuilt. ## License and sources diff --git a/README.md b/README.md index 3646e1d..c436827 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ PR 构建用于验证。`targets.json` 里还没钉模块的 `lkm_sha256` 和 `l 3. 验证通过后,把 step summary 里的大小和 SHA-256 填进 `targets.json` 的 `lkm_size`、`lkm_sha256`,开 PR。这次 PR 构建会同时比对大小和哈希,不一致就失败。有条件时另做一次独立构建,确认哈希一致。 4. 合并后,在 `main` 上手动触发这个工作流(Actions → Build KernelSU LKM → Run workflow),得到 `verified-ksu-lkm-<目标 ID>` 制品,保留 14 天。 5. 在 verified 制品对应的构建提交上按上面的规则建标签和 Release,上传 `.ko`、`SHA256SUMS.txt` 和 `.env`。发布后从公开下载地址重新下载 `.ko`,核对大小和 SHA-256,再同步更新 ModAVDManager 的 `OfficialLKMDownloadURL`、`OfficialLKMSize` 和 `OfficialLKMSHA256`。 -6. 在管理器发版说明提醒已启用 KernelSU 的用户先正常关闭实例,再下载新版组件,然后对每个原先启用过的实例重新执行「启用 KernelSU」(或 `modavd ksu install`)。新版模块的哈希与旧 ramdisk 的校验记录不同,重建前开机会回退到原版 ramdisk。已有模块数据通过重新启用保留,升级无需执行 `uninstall --purge`。 +6. 在管理器发版说明提醒已启用 KernelSU 的用户先正常关闭实例,再下载新版组件。命令行可以对每个实例直接运行 `modavd ksu install`。在管理器里先点「移除 KernelSU」并保持清理选项未勾选,再点「启用 KernelSU」。这样会重建 ramdisk 并保留已有模块数据。新版模块的哈希与旧 ramdisk 的校验记录不同,重建前开机会回退到原版 ramdisk。 ## 许可证和来源 From 99b4a16375ab0f53a1b2f29906518d7c2577366b Mon Sep 17 00:00:00 2001 From: ClozyA <133191303+ClozyA@users.noreply.github.com> Date: Mon, 30 Nov 2026 20:10:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=B4=E6=98=8E=20KernelSU=20=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=AF=B9=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E5=BD=B1=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 4 +++- README.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index 964a0b9..387f820 100644 --- a/README.en.md +++ b/README.en.md @@ -47,7 +47,9 @@ Upgrade to a ModAVD release that pins the new KernelSU module. Shut down any ins - From the CLI, run `modavd ksu install` for each affected instance to rebuild its ramdisk. - In the Manager, select **Remove KernelSU**, leave data cleanup unchecked, then select **Enable KernelSU**. -Rebuilding preserves existing module data. Once the cached module changes, its checksum no longer matches the record for the old ramdisk, so the instance uses the stock ramdisk until it is rebuilt. +Re-enabling KernelSU reinstalls the bundled `meta-overlayfs`. The bundled installer copies the existing `modules.img`, preserving the module contents stored in that image. Back up any custom settings or scripts in the `meta-overlayfs` directory first, because reinstalling replaces that directory. + +Once the cached module changes, its checksum no longer matches the record for the old ramdisk, so the instance uses the stock ramdisk until it is rebuilt. ## License and sources diff --git a/README.md b/README.md index 9a62b17..296a695 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ ModAVDManager 下载模块用的标签、文件名、大小和 SHA-256 写在管 - 命令行对每个实例运行 `modavd ksu install`,重建该实例的 ramdisk。 - 在管理器里先点「移除 KernelSU」,保持清理数据选项未勾选,再点「启用 KernelSU」。 -重建会保留已有模块数据。缓存更新后,旧 ramdisk 的校验记录与新版模块哈希不同,实例在重建前会回退到原版 ramdisk 启动。 +重新启用会重装随包的 `meta-overlayfs`。默认安装会复制已有的 `modules.img`,其中的模块内容会保留。改过 `meta-overlayfs` 目录内配置或脚本的用户,请先备份这些文件,重装会替换旧目录。 + +缓存更新后,旧 ramdisk 的校验记录与新版模块哈希不同,实例在重建前会回退到原版 ramdisk 启动。 ## 许可证和来源