A complete, reproducible recipe for running a GPU-accelerated Linux desktop container on a Xiaomi Pad 7 Ultra (
jinghu, XRING O1 SoC) without breaking vendor kABI.Zero-CRC-drift GKI 6.18.21 kernel · Droidspaces v7.2.0 · Ubuntu 26.04 ARM64 · Mali-G925 Vulkan 1.3.278 via Zink · native
niri-anlanddesktop · Wine + DXVK 2.7.1 across arm64 / x86 / x86_64.
本仓库是小米平板 7 Ultra(jinghu,XRING O1 SoC,Mali-G925-Immortalis MC16 r0p1)
上完整跑通 Droidspaces Linux 桌面容器的可复现方案。核心难点是:厂商内核缺
CONFIG_PID_NS / CONFIG_IPC_NS / CONFIG_SYSVIPC,而补开这些项会改变 task_struct
布局,导致 286 个厂商预编译模块因 CRC 不符集体拒载 → bootloop。
本方案的关键结论:用 Droidspaces 官方的 GKI 6.12+ kABI 补丁,把那 24 字节搬进
task_struct 已有的空洞里,配合 KBUILD_GENDWARFKSYMS_STABLE=1,可以做到
2,786 个导出符号 CRC 零漂移,同时拿到全部 namespace 支持。现有 KernelSU LKM
init_boot 完全不用动。
在此之上:Ubuntu 26.04 容器、O3 Mali 栈(Vulkan 1.3.278 + Zink OpenGL 4.6)、
原生 niri-anland 桌面(xwayland-satellite + xwayland)、以及 Wine + DXVK 2.7.1
的三种 Windows 架构(ARM64 原生 / 32 位 x86 / 64 位 x86_64)全部实测跑通硬件 D3D11。
| 项 | 值 |
|---|---|
| Device | Xiaomi Pad 7 Ultra — jinghu / <PRODUCT-MODEL> |
| SoC | XRING O1 (ro.board.platform=O1_asic) |
| GPU | Mali-G925-Immortalis MC16 r0p1, vendor Vulkan 1.3.278, kbase r49p1 (CSF) |
| OS | Android 17 (SDK 37), A/B, erofs, 4K pages |
| Kernel | GKI 6.18.21 — 6.18.21-android17-5-g284297031c53-abogki553682993-4k |
| Address space | VA_BITS=39 (512 GB user range) — do not change to 48, it bootloops |
| DRM nodes | only /dev/dri/card0 (226:0); there is no renderD* |
| Root | KernelSU (ksud 3.3.1), modules under /data/adb/modules/ |
| RAM | 15.9 GB + 8 GB swapfile + 16 GB zram (lzo-rle) |
| Panel | 3200×2136 @ 120 Hz, density 360 |
Preserved as-is: the existing KernelSU LKM in init_boot is untouched and keeps working.
This project only replaces the kernel inside the boot partition.
| Component | Result | Evidence |
|---|---|---|
GKI 6.18.21 noksu-ds kernel |
✅ PASS | 2,786/2,786 stock vmlinux CRCs exact match (0 drift, MISMATCHED = 0) · 0 C-symbol CRC changes · task_struct=4736, module=1664, VA_BITS=39 · droidspaces check 10/10 [MUST HAVE] + 13/13 [OPTIONAL] (incl. USER_NS) · 286 stock modules load cleanly · existing KernelSU LKM works out of the box |
| Droidspaces v7.2.0 | ✅ PASS | droidspacesd running under SELinux Enforcing |
| Ubuntu 26.04 ARM64 container | ✅ PASS | 32 GB sparse ext4 image, systemd as PID 1, system-is-running=degraded→running |
| O3 Mali GPU stack | ✅ PASS | xring-o3-mali-stack-2026.11.12-v1 + rebuilt Ubuntu 26.04 libgbm.so.1 shim + root-cgroup auto-restarting vkbridge-server KSU module → Vulkan 1.3.278 (Mali-G925-Immortalis, r49p1) + Zink OpenGL 4.6 Core / GLES 3.2 |
| Native ARM64 desktop | ✅ PASS | niri-anland 26.4.0 + xwayland-satellite 0.8.3 + xwayland 24.1.10 .debs built on Ubuntu 26.04; desktop-session.service active with ANLAND_DRM_DEVICE=/dev/dri/card0 |
| Wine — ARM64 native | ✅ PASS | wine-mali / Hangover 11.16 |
| Wine — 32-bit x86 | ✅ PASS | wine-mali + HODLL=wowbox64.dll + DXVK 2.7.1 x32 → D3D11 hardware PASS on Mali-G925-Immortalis |
| Wine — 64-bit x86_64 | ✅ PASS | wine64-box / Box64 v0.4.5 + portable Wine 11.23 + wineserver-box + DXVK 2.7.1 x64 → D3D11 hardware PASS on Mali-G925-Immortalis (VRAM 15327 MB, D3D_FEATURE_LEVEL_11_0) |
| Anland live on-screen | ✅ PASS | Mali-patched anland-consumer-compat-5.19.apk (stride=0 → width fix) connected at 3200×2136 @ 120 Hz, pacing queue_fps=117 (queue_fail=0), zero-copy 3200×2136 DMA-BUF imported into Mali-G925-Immortalis, zwp_linux_dmabuf_v1 v3, live foot + waybar + niri-anland hot-reload scale 2.0 on anland-0 |
Legend: ✅ verified end-to-end on real Xiaomi Pad 7 Ultra hardware.
flowchart TD
subgraph ANDROID["Android 17 / XRING O1 host"]
direction TB
BOOT["boot_b<br/>GKI 6.18.21 noksu-ds<br/>VA_BITS=39 · 4K pages<br/>2786/2786 CRC exact"]
INITBOOT["init_boot<br/>KernelSU LKM (untouched)"]
DSAPP["Droidspaces v7.2.0 APK"]
ANLAPP["Anland v5.24 consumer APK"]
KSU["KSU module<br/>u2604_mali_host"]
SUP["supervisor.sh<br/>root cgroup · auto-restart"]
VKB["vkbridge-server<br/>MaliBridge host"]
MALI[("/dev/mali0<br/>kbase r49p1 CSF")]
CARD0[("/dev/dri/card0<br/>226:0")]
DMA[("/dev/dma_heap")]
end
subgraph CONTAINER["Ubuntu 26.04 ARM64 container (sparse ext4, systemd)"]
direction TB
DAEMON["droidspacesd<br/>SELinux Enforcing"]
ICD["90-droidbridge.json<br/>ABSOLUTE path ICD"]
STACK["O3 Mali stack<br/>mesa kopper + zink"]
GBM["libgbm.so.1 shim<br/>38 symbols forwarded"]
NIRI["niri-anland 26.4.0<br/>desktop-session.service"]
XWS["xwayland-satellite 0.8.3<br/>xwayland 24.1.10"]
WINE["Wine + DXVK 2.7.1<br/>arm64 · x86 · x86_64"]
end
BOOT --> DAEMON
INITBOOT --> KSU
KSU --> SUP
SUP --> VKB
VKB --> MALI
DSAPP --> DAEMON
DAEMON -->|"/run/display.sock"| NIRI
ANLAPP -.->|"display.sock"| NIRI
MALI --> VKB
VKB -->|"mali.sock"| STACK
DMA --> STACK
CARD0 --> NIRI
CARD0 --> XWS
ICD --> STACK
STACK --> GBM
GBM --> NIRI
STACK --> WINE
NIRI --> XWS
NIRI -->|"Anland surface"| ANLAPP
style ANDROID fill:#1a2332,stroke:#4a90d9,color:#e8f0f8
style CONTAINER fill:#2d2416,stroke:#d9a441,color:#f8f0e8
boot_bcarries the self-builtnoksu-dskernel. Its exported-symbol CRCs are byte-identical to the stock kernel, so all 286 vendor modules invendor_dlkm/system_dlkmload without complaint.init_bootkeeps the stock KernelSU LKM.ksuinitbinds symbols by kallsyms address (SHN_ABS), which bypassescheck_version()entirely — so CRCs are irrelevant to it.- The KSU module
u2604_mali_hoststartssupervisor.shatlate_start. The supervisor moves itself and its child into the root cgroup and never exits, which defeats bothPR_SET_PDEATHSIGand Android's per-session cgroup reaping. vkbridge-serverexposes Mali's Vulkan through a unix socket (mali.sock) on a bind mount that the container sees as/opt/mb-sock/mali.sock.- Inside the container,
libvulkan_droidbridge.sois selected by an absolute-path ICD; Zink runs on thekopperMesa build, andlibgbm.so.1is the rebuilt shim. niri-anlandcomposites on/dev/dri/card0and hands frames to the Anland broker at/run/display.sock, which the Anland consumer APK presents on an Android surface.- Wine reaches D3D11 three different ways, all landing on the same Mali device.
.
├── README.md # this file
├── LICENSE # GPL-3.0
├── .gitignore
├── kernel/
│ ├── README.md # build switches, verifier, repack, flash/rollback
│ ├── patches/
│ │ ├── 001.GKI-6.12-or-above-fix_sysvipc_kabi.patch
│ │ ├── 001.GKI-6.12-or-above-fix_sysvipc_kabi.patch
│ ├── verify-kernel-artifact.py # offline CRC + BTF + config gate
│ └── repack-boot.sh # magiskboot repack with rm -f kernel_dtb + SHA256 round-trip
├── host/
│ ├── README.md
│ ├── install-droidspaces.sh # Droidspaces v7.2.0 + Anland v5.24 + daemon verify
│ ├── create-ubuntu2604.sh # 32 GB sparse ext4 Ubuntu 26.04 ARM64
│ └── ksu-module/u2604_mali_host/
│ ├── module.prop
│ ├── service.sh
│ ├── supervisor.sh
│ └── install-host-mali.sh
├── container/
│ ├── README.md
│ ├── setup-mali-stack.sh # O3 stack + libgbm shim + ICD + card0 + verify
│ ├── u2604-container-localization.sh # nosnap pin + PackageKit polkit + zh_CN/Asia-Shanghai
│ ├── u2604-apps-arm64.sh # the 10 ARM64 non-Snap applications
│ ├── libgbm-shim/shim.c # 38-symbol forwarding shim
│ ├── mutter-anland/ # 4 clean source patches + rebuild scripts (no binaries)
│ │ ├── README.md # patch order, the mandatory --prefix=/usr note
│ │ ├── prepare-source.sh # Ubuntu src + quilt + Anland + 4 u2604 patches
│ │ ├── mutter-anland-rebuild.sh # meson/ninja + atomic deploy + acceptance
│ │ ├── u2604-anland-scroll-invert.patch
│ │ ├── u2604-touchpad-seat-wrappers.patch
│ │ ├── u2604-touchpad-bridge-client.patch
│ │ └── u2604-anland-ondemand-present.patch
│ ├── xwayland/ # smart wrapper + one-shot glamor verification
│ │ ├── README.md
│ │ ├── Xwayland # exec -a Xwayland + NODEVICE_SELECT=1
│ │ └── xwayland-glamor-verify.sh
│ ├── niri-anland/
│ │ ├── build-niri-ubuntu2604.sh # O3 patches + sd-notify 0.5 fix -> 3 .debs
│ │ ├── config.kdl
│ │ ├── ubuntu2604-desktop-session
│ │ └── desktop-session.service
│ └── wine/
│ ├── setup-wine-dxvk.sh # Hangover + DXVK + Box64 v0.4.5 + Wine 11.23
│ ├── bin/wine-mali
│ ├── bin/wine64-box
│ ├── bin/wineserver-box
│ └── dxvk_probe.c
├── docs/
│ ├── README.md # index + upstream commit map
│ ├── 01-可行性报告.md … 08-桌面窗口方案定稿.md
│ ├── kernel-6.18-kabi-report.md
│ ├── userspace-architecture-report.md
│ ├── container-recovery.md # rebuild ubuntu2604 from scratch (64 GB sparse)
│ ├── assets-manifest.md
│ └── reports/ # sanitized engineering / acceptance reports
└── repro/
├── README.md
├── dmabuf-test/ # sender + importer + shaders + scripts (no binaries)
└── panvk/ # kbase-ioctl-fix.py + ICD + caps (no .so)
Binaries are not in git. Everything you need to flash or install is attached to the release:
| Asset | What it is |
|---|---|
ak3-xring-o1-6.18-noksu-droidspaces-va39-gki553682993.zip |
AnyKernel3 flashable kernel package (noksu-ds, VA=39) |
niri-anland_26.4.0+anland5-1_arm64.deb |
native ARM64 niri-anland compositor |
xwayland-satellite_0.8.3+anland5-1_arm64.deb |
Xwayland rootless satellite |
xwayland_24.1.10-1_arm64.deb |
matching Xwayland server |
Kernel Image SHA256 (also embedded in ci-out summary):
721e206940f962c3cb9c04dacd06100943801462251be8da62618ee315f8bb39
The three .debs are built by container/niri-anland/build-niri-ubuntu2604.sh;
the kernel is built by applying the kABI patch and the CI changes described in kernel/dijun-ci-config.md
to shu0011/dijun-kernel-ci @ 298abc34 and running its CI.
Every step below maps to a script in this repo. Nothing is left as "and then magic happens".
# host tooling
sudo apt install -y android-tools-adb android-tools-fastboot python3 bpftool \
magiskboot build-essential
# device: KernelSU working, boot_b already backed up
adb shell su -c 'dd if=/dev/block/by-name/boot_b of=/sdcard/boot_b.stock.img'
adb pull /sdcard/boot_b.stock.img1. Build and flash the kernel → kernel/README.md
# a) apply the CI patch on top of upstream
git clone https://github.com/shu0011/dijun-kernel-ci && cd dijun-kernel-ci
git checkout 298abc34
git apply /path/to/repo/kernel/patches/001.GKI-6.12-or-above-fix_sysvipc_kabi.patch
# 然后按 kernel/dijun-ci-config.md 调整你的 CI fork
# b) run the noksu-ds workflow, collect ci-out/noksu-ds/out/
# c) gate it — this must print FINAL GATE: PASS
python3 /path/to/repo/kernel/verify-kernel-artifact.py \
ci-out/noksu-ds/out --variant noksu-ds --stock-dir stock
# d) repack boot.img (strips the bogus kernel_dtb, verifies round-trip)
/path/to/repo/kernel/repack-boot.sh \
--stock boot_b.stock.img \
--kernel ci-out/noksu-ds/out/Image \
--out new-boot.img \
--expect-sha256 721e206940f962c3cb9c04dacd06100943801462251be8da62618ee315f8bb39
# e) flash
adb reboot bootloader
fastboot flash boot_b new-boot.img
fastboot rebootThe kernel patch and its three make-or-break switches
(KBUILD_GENDWARFKSYMS_STABLE=1, MODVERSIONS=y, MODULE_SCMVERSION=y) are explained in
kernel/README.md.
2. Install Droidspaces + Anland → host/README.md
# extract binaries + boot module from the Droidspaces APK
STAGE=/data/local/tmp/ds-install
adb shell su -c "mkdir -p $STAGE"
adb push droidspaces-aarch64 busybox-aarch64 boot-module Anland-v5.24.apk "$STAGE/"
adb push host/install-droidspaces.sh /data/local/tmp/
adb shell su -c 'sh /data/local/tmp/install-droidspaces.sh \
--stage /data/local/tmp/ds-install \
--anland-apk /data/local/tmp/ds-install/Anland-v5.24.apk'
# reboot so the boot module starts droidspacesd in the right SELinux context
adb reboot
adb shell su -c '/data/local/Droidspaces/bin/droidspaces check' # expect 10/10 + 13/133. Create the Ubuntu 26.04 container → host/README.md
STAGE=/data/local/tmp/ds-u2604-stage
adb shell su -c "mkdir -p $STAGE"
adb push ubuntu-26.04-resolute-arm64-rootfs.tar.xz "$STAGE/rootfs.tar.xz"
adb push post_extract_fixes.sh "$STAGE/"
adb push host/create-ubuntu2604.sh /data/local/tmp/
adb shell su -c 'sh /data/local/tmp/create-ubuntu2604.sh \
--stage /data/local/tmp/ds-u2604-stage --name ubuntu2604 --size-gb 32'4. Start the MaliBridge host supervisor → host/README.md
STAGE=/data/local/tmp/ds-mali-stage
adb shell su -c "mkdir -p $STAGE"
adb push vkbridge-server "$STAGE/" # from xring-o3-mali-host-2026.11.08-2.tar.zst
adb push host/ksu-module/u2604_mali_host /data/local/tmp/u2604_mali_host
adb shell su -c 'sh /data/local/tmp/u2604_mali_host/install-host-mali.sh --stage /data/local/tmp/ds-mali-stage'5. Install the Mali GPU stack → container/README.md
adb push container/libgbm-shim/shim.c /data/local/tmp/
DS=/data/local/Droidspaces/bin/droidspaces
adb shell su -c "$DS -n ubuntu2604 run -- bash /opt/mb-sock/setup-mali-stack.sh --stage /opt/mb-sock"
# expect: Vulkan 1.3.278 Mali-G925-Immortalis r49p1 · Zink OpenGL 4.6 Core6. Build the desktop → container/README.md
adb push container/niri-anland /data/local/tmp/niri-anland
adb shell su -c "$DS -n ubuntu2604 run -- su - ubuntu -c \
'bash /opt/mb-sock/build-niri-ubuntu2604.sh --src /opt/mb-sock/anland-patched.tar.gz'"
# install the session wrapper + unit, then start it
adb shell su -c "$DS -n ubuntu2604 run -- bash -lc '
install -m 755 /opt/mb-sock/ubuntu2604-desktop-session /usr/local/bin/
install -m 644 /opt/mb-sock/desktop-session.service /etc/systemd/system/
install -m 644 /opt/mb-sock/config.kdl /home/ubuntu/.config/niri/config.kdl
systemctl daemon-reload && systemctl enable --now desktop-session.service
systemctl status desktop-session.service --no-pager -l'"7. Install Wine + DXVK → container/README.md
adb shell su -c "$DS -n ubuntu2604 run -- bash /opt/mb-sock/setup-wine-dxvk.sh --stage /opt/mb-sock"
# manual re-verify at any time
adb shell su -c "$DS -n ubuntu2604 run -- su - ubuntu -c \
'HODLL=wowbox64.dll wine-mali Z:\\tmp\\dxvk_probe_x86.exe'"
adb shell su -c "$DS -n ubuntu2604 run -- su - ubuntu -c \
'wine64-box Z:\\tmp\\dxvk_probe_x64.exe'"8. (Optional) Re-run the GPU buffer experiments → repro/README.md
bash repro/dmabuf-test/run.sh # dma-buf -> VkImage import, pixel-verified
python3 repro/panvk/kbase-ioctl-fix.py <so> --check # PanVK ioctl-number sanity checkBefore flashing anything, make sure you have a readable boot_b backup:
adb shell su -c 'dd if=/dev/block/by-name/boot_b of=/sdcard/boot_b.stock.img'
adb pull /sdcard/boot_b.stock.img
sha256sum boot_b.stock.img # record itRollback, any time, any reason:
adb reboot bootloader
fastboot flash boot_b boot_b.stock.img
fastboot rebootSafety properties of this project:
| Property | Why it matters |
|---|---|
boot_a is never touched |
last-resort fallback slot |
init_boot is never touched |
the KernelSU LKM survives any kernel rollback |
Kernel only replaces boot's kernel payload |
the ramdisk is not re-signed or modified |
repack-boot.sh round-trip verifies SHA256 |
a corrupt repack can never reach the device silently |
verify-kernel-artifact.py gates on 2786 CRCs + BTF + config |
refuses to pass a build that would bootloop |
No partition is resized, no fastboot -w, no flashall |
no data loss path exists in these scripts |
On GKI 6.18 the boot image's kernel payload is a single uncompressed arm64 Image
(kernel text plus appended FDTs — 43,731,456 B on jinghu). magiskboot unpack does not keep
it whole; it heuristically splits it via a DTB scan:
kernel = 22,482,816 B
kernel_dtb = 21,248,640 B # KERNEL_SZ = their sum
Both halves are load-bearing. The split point is an artifact of magiskboot's scan, not a real boundary — which creates two independent bootloop paths:
| Mistake | What happens |
|---|---|
rm kernel_dtb, then repack the original kernel |
KERNEL_SZ collapses to 22,482,816 → Image is truncated → bootloop |
Write the new Image into kernel but leave kernel_dtb |
KERNEL_SZ becomes 43,731,456 + 21,248,640 → payload duplicated → corrupt |
The only correct combination is both: remove kernel_dtb and install the complete
Image as kernel. magiskboot then re-splits the new Image itself and KERNEL_SZ comes out
right again.
Because the split is lossless, the invariant that must hold after repacking is:
sha256(cat kernel kernel_dtb) == sha256(Image)
kernel/repack-boot.sh enforces exactly that before it will emit an
image — comparing only kernel would be wrong (it is a heuristic fragment), and comparing
only sizes would miss content corruption. Verified end to end: feeding it a stock boot.img
and the built Image reproduces the known-good reference image byte for byte
(b816785a…), while the truncated path yields b5b58f0b… and is rejected.
The official Droidspaces patch wraps the moved members in
union { char __kabi_ignored_0; struct sysv_sem sysvsem; }. That __kabi_ignored prefix is
honoured only in stable mode — scripts/gendwarfksyms/dwarf.c starts
is_kabi_ignored() with if (!stable) return false;.
Without export KBUILD_GENDWARFKSYMS_STABLE=1:
- the patch still applies cleanly,
- the layout is still correct at runtime,
- but
task_struct's type string changes, so every exported symbol whose signature mentionsstruct task_struct *gets a new CRC (WildKernels measured 6,388 drifting symbols on 6.18), and every vendor module refuses to load.
verify-kernel-artifact.py therefore asserts the literal string
KBUILD_GENDWARFKSYMS_STABLE=1 appears in build.log.
vkbridge-server sets PR_SET_PDEATHSIG, so the kernel SIGKILLs it the instant its parent
dies. Under adb shell su -c '...' the parent is the adbd session, and Android reaps the
whole per-session cgroup when adb disconnects. The bridge vanishes mid-frame and container
Vulkan clients get ECONNRESET or hang.
Fix, two parts, both required:
- A supervisor that never exits, so PDEATHSIG never fires, and that re-execs the server if it dies for any other reason.
- Move both supervisor and server into the root cgroup by writing their PIDs to
/sys/fs/cgroup/cgroup.procs, so per-session reaping cannot reach them.
Plus oom_score_adj=0 so LMKD does not pick the GPU bridge during memory pressure.
See host/ksu-module/u2604_mali_host/supervisor.sh.
The ICD JSON shipped in the Mali stack bundle uses:
{ "ICD": { "library_path": "../../../vkbridge/libvulkan_droidbridge.so" } }The Vulkan loader resolves a relative library_path against the process CWD, not against
the JSON's own directory. It works from one directory and returns
VK_ERROR_INCOMPATIBLE_DRIVER from everywhere else — with no hint about why.
Fix: always install an absolute-path ICD into the system ICD dir:
// /usr/share/vulkan/icd.d/90-droidbridge.json
{ "ICD": { "library_path": "/opt/mali-stack/current/vkbridge/libvulkan_droidbridge.so",
"api_version": "1.4.341" } }xwayland-satellite calls the 0.4 API:
sd_notify::notify(true, &[b"READY=1"]) // 0.4: first arg is unset_environmentsd-notify 0.5 dropped that bool. Ubuntu 26.04 ships 0.5, so the build dies with E0061
(wrong number of arguments). The fix is a single idempotent sed (0.5 always unsets, so
dropping the flag is behaviourally equivalent):
sed -i -E 's|sd_notify::notify\([[:space:]]*(true|false)[[:space:]]*,[[:space:]]*&|sd_notify::notify(\&|g' "$SAT_LIB"Handled in container/niri-anland/build-niri-ubuntu2604.sh.
On first wineboot --init Wine tries to download and run the Mono/Gecko installers. In a
headless container this hangs forever — wineboot never returns and the prefix is left
half-initialised. Disabling those two components is required for a scripted setup, and D3D
applications never need them.
ARM64EC is not a general x86_64 CPU. Hand Hangover's emulation layer a 64-bit x86
instruction stream and it executes HLT #1, terminating the process. This is why 64-bit
Windows binaries cannot go through Hangover at all.
XRING O1 runs VA_BITS=39 (512 GB user range). Ubuntu 26.04's packaged box64 is 0.3.8,
which assumes a 48-bit address space — the moment a guest maps above 512 GB you get
SIGSEGV in the dynarec or SIGILL from a bad trampoline. Box64 v0.4.5 is VA-aware and
is built from source by setup-wine-dxvk.sh.
And wineserver itself is x86_64 in the portable Wine build, so it needs the same
treatment. Without WINESERVER=/opt/wine-x64/bin/wineserver-box, every wine call blocks
forever waiting for a server that never starts (or dies with Exec format error).
The bundled shim dlopen()s /opt/mesa-kopper-retire-42194036783/candidate/usr/lib/libgbm.so.1.0.0,
which does not exist on Ubuntu 26.04. gbm_create_device() returns NULL and every
EGL/GLES client (zink, niri, Xwayland) dies with "failed to create gbm device".
Fix: rebuild an equivalent forwarding shim against the distro's own libgbm.
container/libgbm-shim/shim.c exports the same 38
symbols (verified 38/38 against the shipped binary, no gaps, no extras) and takes the real
library path as a compile-time constant.
Droidspaces' --gpu mirror table scans /dev/dri for the renderD prefix only, so
card0 is never mirrored into the container. XRING O1 has no render node at all. The
container must create it itself:
mknod /dev/dri/card0 c 226 0 && chmod 0666 /dev/dri/card0Wired into xring-card0.service with DefaultDependencies=no / Before=graphical.target.
Stock Anland-v5.24.apk connects its SurfaceView via ANW_API_CPU without setting a producer
CPU usage flag, so xring_gralloc allocates a valid linear RGBA_8888 buffer
(3200×2136×4 = 27,340,800 B, afbc header page num 0) with usage=0x900 — but returns
anb->stride == 0. Stock Anland rejects it with:
E Anland : buffer format/stride mismatch: requested=1 actual=1 stride=0
E Anland : only collected 0/4
Fix: use anland-consumer-compat-5.19.apk (from collegeming/xring-o3-droidspaces-package
release anland-consumer-compat-5.19, which falls back stride=0 → width and preserves
SecondaryActivity), and set ANLAND_PRESENT_BACKEND=legacy + ANLAND_SKIP_IMPLICIT_SYNC_WAIT=1
in container/niri-anland/ubuntu2604-desktop-session.
Note that niri-anland names the virtual output anland-0 (not Anland-1).
This project stands entirely on other people's work.
| Project | Role | Link |
|---|---|---|
Droidspaces-OSS (ravindu644) |
the container runtime, its GKI kABI patches, post_extract_fixes.sh, and the whole Android-side model |
ravindu644/Droidspaces-OSS |
dijun-kernel-ci (shu0011) |
the GKI 6.18 CI that builds a CRC-faithful kernel; this repo's patch is diffed against 298abc34 |
shu0011/dijun-kernel-ci |
xring-o3-droidspaces-package (collegeming) |
the O3 Mali stack bundle, MaliBridge host server, and the Anland consumer compat build | collegeming/xring-o3-droidspaces-package |
anland (SuperTurtleDev) |
the display broker and the niri producer whose build recipe produces the desktop .debs |
SuperTurtleDev/anland |
| MaliBridge | the Vulkan bridge (libvulkan_droidbridge.so) that carries Mali into a glibc container |
see the O3 package above |
hangover (AndreRH) |
ARM64 Wine with the wowbox64 / libwow64fex / libarm64ecfex WoW64 thunks |
AndreRH/hangover |
box64 (ptitSeb) |
the x86 / x86_64 dynarec; v0.4.5 is the first VA-39-safe release | ptitSeb/box64 |
dxvk (doitsujin) |
D3D8/9/10/11 → Vulkan translation, three architectures | doitsujin/dxvk |
Additional upstreams used but not vendored: niri, Smithay, xwayland-satellite, KernelSU, Mesa, AnyKernel3, mali-panvk.
This repository contains only original scripts, patches and documentation, plus sanitized copies of documents authored for this project. No third-party binaries are redistributed here; the release assets are built from the upstream sources listed above and remain under their respective licenses (Droidspaces-OSS and MaliBridge are GPL-3.0; Hangover, Box64 and DXVK carry their own).
Issues and PRs welcome, especially:
- CRC/BTF results from other
jinghufirmware builds, - on-device confirmation of the final Anland root-authorization step,
- equivalent recipes for sibling XRING O1 devices (
dijun,violin).
When reporting, please include uname -r, droidspaces version, and the output of
python3 kernel/verify-kernel-artifact.py.
本项目为非官方研究项目,与小米(Xiaomi)、玄戒(XRING)、Google 及任何上游项目官方无关。
仓库内容涉及自编内核、刷写 boot 分区、KernelSU 模块、SELinux permissive 域等高危操作, 可能导致设备变砖、数据丢失、失去保修、无法接收 OTA。所有操作风险自负, 作者不对任何直接或间接损失承担责任。请务必先完整备份、确认能救砖再动手。
本项目不包含任何厂商专有二进制(Mali 驱动、固件等),也不用于规避 DRM、反作弊或任何付费机制; Wine / DXVK / Box64 / FEX 仅用于运行你自己拥有合法授权的软件。
部分流程需要从第三方仓库下载 APK 或内核,其许可与安全性由各自发布者负责,请自行甄别。
若权利人认为本仓库内容侵犯其权益,请通过仓库 Issues 联系,我们会及时删除。
完整条款见
DISCLAIMER.md。
- 本仓库自有代码与文档:GPL-3.0(见
LICENSE)。 - 仓库内含第三方补丁,各自遵循其上游许可,不适用本仓库的 GPL-3.0:
内核补丁
GPL-2.0-only、mutter 补丁GPL-2.0-or-later、 Mesa 补丁MIT、xwayland-satellite 相关MPL-2.0。 - 逐文件对照表见
LICENSES.md。
本项目建立在以下公开工作的基础上。文中仅参考其思路、文档与接口,未复制任何未声明许可仓库的代码:
| 项目 | 许可 | 在本项目中的作用 |
|---|---|---|
| ravindu644/Droidspaces-OSS | GPL-3.0 | 容器运行时本体(APK 与 CLI),本仓库为其适配内容 |
| collegeming/xring-o3-droidspaces-package | 未声明 | 同族 XRING O3 机型复现包,参考 Mali 栈布局与资产校验方式 |
| SuperTurtleDev/anland | GPL-3.0 | Anland 显示协议(Wayland on Android) |
| shu0011/dijun-kernel-ci | 未声明 | 内核 CI 构建流程参考,见 kernel/dijun-ci-config.md |
| tiann/KernelSU | GPL-3.0 | LKM 形态的 root 方案 |
| LyraVoid/FinaSU | GPL-3.0 | KernelSU 分支参考 |
| osm0sis/AnyKernel3 | 见上游 | 内核 zip 打包模板(AK3) |
| mesa3d/mesa | MIT | 上游 Mesa,PanVK 补丁的基础 |
| Alhkxsj/mesa | MIT(同上游) | PanVK 的 pan_kmod kbase 后端分支,本项目补丁基于它 |
| JimVulkan/mali-panvk | MIT | PanVK for Mali 的另一条移植线,交叉验证结论 |
| torvalds/linux | GPL-2.0-only | 内核补丁的最终上游 |
| YaLTeR/niri | 见上游 | niri 合成器,niri-anland 桌面的基础 |
| Supreeeme/xwayland-satellite | MPL-2.0 | 在 niri 下提供 X11 支持 |
| Smithay/Smithay | MIT | anland 所依赖的 Wayland 合成器框架 |
| FEX-Emu/FEX | MIT | x86 / x86_64 用户态翻译 |
| ptitSeb/box64 | MIT | x86_64 二进制翻译(Wine 路线) |
| AndreRH/hangover | LGPL-2.1 | ARM64 上的 WoW64 / Wine 支持 |
| doitsujin/dxvk | Zlib | D3D9/10/11 → Vulkan 翻译层 |
致谢顺序与重要性无关。若你是上述项目的作者并希望调整署名方式,欢迎提 Issue。
本仓库的代码、脚本与文档在编写过程中使用了以下 AI 工具辅助:
- Gemini 4 Neon / Hydrogen
- GLM-5.4
- DeepSeek V4.1-Flash / DeepSeek V4.0-Pro
- MiniMax M4
所有 AI 辅助产出的改动均经人工审阅并在真机上实测验证后才提交;AI 不参与最终判断, 仓库内容的正确性与安全性仍由维护者负责。