Wow thanks for the project, just a fyi post
I had been doing something very similar, built several versions of mesa testing hardware GPU acceleration in proot-distro Linux from termux without root. I had virgl test server running with virpipe on my v24 mesa deb I built, and tried getting zink to work forever, Gemini had me pulling .so libraries and hals just whatever was being called on next from actual android vendor drivers one at a time, get error now another .so is missing, pull it to proot, try again in an endless loop of dependency chasing hell saying it would work. So I finally asked on reddit if it was possible to achieve direct zink no virgl without chroot and root, and was told no, it's not, needs root, until someone linked this repo. Ok, so I installed, tried, something is out of whack with the kgl on my SD 8 adreno 740 red magic 8s pro, I got kernel invalid parameter 13 error, wasn't communicating right with kgl:
proot-distro login --user kali kali \
--shared-tmp \
--bind "$XDG_RUNTIME_DIR/.X11-unix:/tmp/.X11-unix" \
-- /bin/bash -lc '
export DISPLAY=:0
export MESA_LOADER_DRIVER_OVERRIDE=kgsl
export TU_DEBUG=noconform
export PULSE_SERVER=127.0.0.1 echo "--- Checking OpenGL Renderer ---"
glxinfo | grep "OpenGL renderer string"
'
--- Checking OpenGL Renderer ---
MESA-LOADER: failed to retrieve device information
MESA: error: kgsl_pipe_get_param:103: invalid param id: 13
OpenGL renderer string: FD740
os_same_file_description couldn't determine if two DRM fds reference the same file description. (Function not implemented)
Let's just assume that file descriptors for the same file probablyshare the file description instead. This may cause problems whenthat isn't the case. So I tried many other environmental variables and tests, always that error 13, UNTIL I had some dumb idea that your build may have opengl libs or extras that weren't functioning right in mine, maybe my custom mesa Deb compiled with zink, freedreno, virgl, and llvm fallback would work if I over installed your container driver with mine, keeping any extras aside from base drivers. Just dpkg --install Zink-mesa-freedreno-custom_25.1.6-1_arm64.deb I built over yours, and was simply amazed by the results: https://katb.in/Test2_my_driver_over_container
glxinfo | grep "OpenGL renderer string" and glxgears test in proot gave:
OpenGL renderer string: zink Vulkan 1.4(Turnip Adreno (TM) 740 (MESA_TURNIP))
and
2345 frames in 5.0 seconds = 468.948 FPS
results, and a fully working zink hardware acceleration no root on adreno 740. I'm not sure what your package has that mine was missing, or what my build has that was more agreeable for my kernel once linked with other libs from your build, but I do know that together, they fully work and are running great launching kali with mate and testing from termux x11 in GUI mode: https://katb.in/Test3_full_gui_x11_kali perfect results. Thanks for this, together we tag teamed something experts and several AI said wasn't possible without root. If you want to look, my debs and launch scripts are here, the version 24 is for virgl, the 25 I compiled for zink is whats working over the top of your build:
https://drive.google.com/drive/folders/1UGE2ND3IgOD8TL6L-uxfoFt3ixSEcOP5
Thanks again just wanted to show you what I did to get it working in case it helped with anything I had already built these so just had an idea to test with extras from yours and boom, worked.
Thank you for your feedback. I suspect this issue arose because, during testing Mali GPU support, I referenced some other open-source projects and added the panfrost,lima drivers to the build command, which may have inadvertently affected Vulkan support on certain Adreno GPU models. In practice, however, cases from others show that Panfrost’s support on Android is extremely poor—it only partially supports very old OpenGL versions on a very limited number of devices.
Moreover, when building the mesa-25.3.0-devel-20250725 version, I didn’t have any Mali GPU devices available for testing. However, I recently purchased a Pixel 6 Pro and, after conducting real-device tests, I will consider either removing those two drivers or providing them as separate optional deb packages.
Indeed, during my testing with the Adreno 730, I found that only OpenGL and OpenGL ES worked properly, while Vulkan did not. By contrast, on the Adreno 660, all three—OpenGL, OpenGL ES, and Vulkan—functioned correctly. Likely for the same reason, Zink (which relies on Vulkan) also fails to work on the Adreno 740 as you told me. Anyway, your feedback is very likely to help resolve this issue—thanks again!
No problem, and thanks again I kept trying things to get it working 😂 As you can see I built 2 different debs and versions...tried copying half of ROMs vendor over to proot-distro 🤦♂️ Everyone, reddit and a few AI said zink wouldn't work without root, keep using virgl for proot.. when I saw the results and a functional setup I couldn't believe it. If it helps (I did so many builds of 25.1 I can't remember if this was that latest one I linked in Google drive, I think it is) here's the build script I made, and my deb packager script, I figured since I built it in proot-distro in aarch64 environment for possible better compatibility, better pack it up for easy install later without having to rebuild if reinstall. I have no idea what kind of magic your build has that allowed mine to work, but installing yours then over installing mine was the winner in the end. I have the Deb builder script installing to tmp dir so it can catch all installed files and symlinks then bundle it all
Build Script: https://katb.in/maybe_the_build
DEB Packager: https://katb.in/install_tmp_pack_deb
On the plus side you can add ldconig and anything else that might prevent user error to the post install script for the deb like I did:
#!/bin/sh set -e echo "Running ldconfig to update shared library cache..." ldconfig exit 0
Makes it a little more manageable for the "what I usually just click gdebi and have my Roblox" types that aren't great with terminal, dpkg --install and done 😂
On the plus side you can add ldconig and anything else that might prevent user error to the post install script for the deb like I did:
#!/bin/sh set -e echo "Running ldconfig to update shared library cache..." ldconfig exit 0
Makes it a little more manageable for the "what I usually just click gdebi and have my Roblox" types that aren't great with terminal, dpkg --install and done 😂
Ok, in future builds, I will try packaging using standard installation formats like deb or rpm to enable proper software installation, uninstallation, and upgrade logic.
Ok, in future builds, I will try packaging using standard installation formats like deb or rpm to enable proper software installation, uninstallation, and upgrade logic.
A new version, based on the official Debian mesa source and modified accordingly, has now been released—built and packaged using gbp: https://github.com/lfdevs/mesa-for-android-container/releases/tag/debian%2F25.0.7-2-adreno
Pre-built versions compatible with the default package managers of major Linux distributions—including Debian, Ubuntu, Fedora, and Arch Linux—have now been released: https://github.com/lfdevs/mesa-for-android-container?tab=readme-ov-file#using-the-package-manager
Therefore, this issue is being closed.