Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redmi Note 7 (lavender) Droidspaces + APatch 内核

为 Redmi Note 7(代号 lavender)的 Xiaomi Android Q / Linux 4.4.192 原厂内核补充 Droidspaces 容器所需能力,并保留原厂 Wi-Fi、exFAT 等外置模块的可用性。

本仓库只包含可复现的源码补丁与构建工具,不提供或上传:

  • 原厂或修改后的 boot.img
  • APatch SuperKey、密码、私钥或设备数据
  • Xiaomi 固件、Wi-Fi/exFAT 二进制模块

已实现的内核改动

  • 启用 namespaces、cgroups、seccomp、overlayfs、veth/bridge/netfilter 等容器能力。
  • 运行时启用 System V IPC,同时让导出的 /proc/config.gz 保持原厂 FCM 兼容值,避免 Android 启动后的“设备内部出现问题”弹窗。
  • 为 Android noprefix cgroup 挂载补充控制器前缀别名,兼容 Droidspaces/LXC 的探测方式。
  • 仅对原厂 wlanexfat 模块放宽不可复现的 modversion CRC;其他外置模块仍执行正常版本检查。
  • 保留原厂 boot 中的 DTB bundle,避免第三方设备树导致硬件回归。
  • 修正此 4.4 内核中旧版 qtaguid 统计路径的稳定性问题。

已验证环境

  • 设备:Xiaomi Redmi Note 7 (lavender)
  • 基础源码:MiCode lavender-q-oss
  • 内核:Linux 4.4.192
  • Android:Xiaomi Android Q 固件
  • Droidspaces:v6.4.5
  • Root:APatch(由用户在官方 APatch 应用中自行设置 SuperKey)

不同 ROM、不同 boot header 或其他机型不在支持范围内。

构建

需要 Linux x86_64、Git、Python 3、GNU make 及常规内核构建依赖。

./scripts/bootstrap_sources.sh
cp /path/to/your/stock/boot.img ./boot.img
./scripts/build.sh

脚本会从你提供的原厂 boot.img 自动提取 stock config,并生成:

artifacts/boot-droidspaces-lavender-unsigned.img

也可用环境变量指定外部目录:

BOOT_IMAGE=/path/to/boot.img \
KERNEL_SOURCE=/path/to/Xiaomi_Kernel_OpenSource \
TOOLCHAIN64=/path/to/aarch64-linux-android-4.9 \
TOOLCHAIN32=/path/to/arm-linux-androideabi-4.9 \
./scripts/build.sh

APatch

构建脚本不会读取、接收或保存 SuperKey。

  1. APatch 官方仓库安装官方应用。
  2. 在 APatch 中选择“修补 boot 镜像”,选择 boot-droidspaces-lavender-unsigned.img
  3. 只在 APatch 应用界面中设置你自己的 SuperKey。
  4. 将 APatch 输出的镜像复制到电脑,先临时启动验证:
fastboot boot apatch-patched.img

确认 Android、Wi-Fi、存储与 Droidspaces 正常后再写入:

fastboot flash boot apatch-patched.img
fastboot reboot

不要修改或刷写 vbmeta。操作前请备份原厂 boot;设备必须已解锁 bootloader。

安全说明

  • .gitignore 明确排除 boot 镜像、APatch 输出、密钥与构建目录。
  • 仓库中没有默认 SuperKey,也没有通过命令行传入 SuperKey 的接口。
  • 模块兼容例外被限制为 wlanexfat 两个模块名,并非全局关闭 modversion 检查。

上游与固定版本

SOURCE_REVISIONS.md。Droidspaces 与 APatch 均属于各自上游项目;本仓库不包含它们的二进制或完整源码副本。

许可证

内核补丁和本仓库工具以 GPL-2.0-only 发布,详见 LICENSE。上游项目继续适用各自许可证。

About

Reproducible Redmi Note 7 lavender kernel build for Droidspaces with APatch-safe workflow

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages