Forked From Mesa - The 3D Graphics Library
A Mesa build for containers on Android (Proot, Chroot, LXC, etc.), to support hardware acceleration with Adreno GPU.
- The Freedreno and Turnip driver in Mesa 26.0.0 and later versions supports Adreno 8xx GPU.
- Mesa drivers compiled in arm64 chroot containers across multiple popular Linux distributions offer better compatibility and can be used in Proot, chroot, and LXC containers hosted on Android.
- For some Adreno 6xx/7xx/8xx GPUs, the Freedreno driver can be used for OpenGL, OpenGL ES, and Vulkan, eliminating the need for Zink for graphics API call translation and significantly improving GPU utilization.
- Only drivers relevant to the vast majority of Android devices are compiled to reduce the package size.
This section only displays GPU models confirmed to be supported through actual testing by me and others, it does not mean that other GPU models are unsupported. You can search for your device's GPU model in the freedreno_devices.py file (for example, search for 725 for Adreno 725). If the model has a complete device definition, it is likely supported. You are welcome to share how the driver runs on your device in Issues, which will help us improve the table below.
| GPU | OpenGL | OpenGL ES | Vulkan |
|---|---|---|---|
| Adreno 660 | ✔️ Supported | ✔️ Supported | ✔️ Supported |
| Adreno 710/720/730/735/740/750 | ✔️ Supported | ✔️ Supported | ✔️ Supported |
| Adreno 829/830/840 | ✔️ Supported | ✔️ Supported | ✔️ Supported |
Experimental support (by whitebelyash): Adreno 825
This project's Releases provide two types of installation packages: one installable via the Linux distribution's package manager, and another that must be installed by direct extraction. The first type is recommended; however, if you need the latest Mesa features (such as Adreno 8xx support), use the second type.
If the Turnip driver from the standard release (whose release title doesn't have the turnip- prefix) fails to work properly, you can use the unpatched Turnip driver (whose release title does have the turnip- prefix) by directly installing it over the standard one.
PS: The term "unpatched" mentioned in this project refers to the original patches from xMeM not being applied; however, some necessary patches (such as those for additional GPU support) will still be applied.
Depending on your Linux distribution, go to Releases and download all corresponding packages for a specific release, then follow the installation instructions provided in the release notes. Below are the latest releases for some popular Linux distributions:
| Linux Distribution | Latest Release | Unpatched Turnip driver |
|---|---|---|
| Debian 13 | 25.0.7-2+deb13u1 | turnip-25.0.7-2+deb13u1 |
| Ubuntu 24.04 LTS | 25.0.7-0ubuntu0.24.04.2 | turnip-25.0.7-0ubuntu0.24.04.2 |
| Fedora 43 | 25.2.7-4.fc43 | turnip-25.2.7-4.fc43 |
| Arch Linux | 26.2.0-1 | turnip-26.2.0-1 |
Note
The .tar.gz installation packages in Releases can only overwrite the existing Mesa drivers. To uninstall, you must manually delete the extracted files. These packages are intended for testing purposes only.
Currently, the "Direct Extraction" way supports the following Linux distributions:
| Linux Distribution | Installation package filename suffix |
|---|---|
| Debian 13 | debian_trixie_arm64 |
| Ubuntu 24.04 LTS | ubuntu_noble_arm64 |
| Ubuntu 25.10 | ubuntu_rolling_arm64 |
| Fedora 43 | fedora_43_arm64 |
| Arch Linux | archlinux_arm64 |
| Void Linux | void_arm64 |
- Go to Releases and download the
.tar.gzinstallation packages. Please note the Linux distribution suffix in the filename, such asdebian_trixie_arm64. You can only install the package that matches your distribution. For Adreno 7xx/8xx, it is generally recommended to first extract the standard installation package (which includes Freedreno), followed by the unpatched Turnip installation package. The latest releases for both are as follows:
| Standard Installation Package | Unpatched Turnip Installation Package |
|---|---|
| 26.2.0-devel-20260423 | turnip-26.2.0-devel-20260423 |
If you need the latest possible Mesa upstream features, you can use the Turnip weekly builds: turnip-weekly
turnip-weekly can be used together with standard installation packages (those whose Release titles do not have the turnip- prefix), or it can be used alone (usually with better compatibility). When used alone, you need to change the value of the environment variable MESA_LOADER_DRIVER_OVERRIDE from kgsl to zink.
Note
turnip-weekly is built weekly by GitHub Actions by pulling upstream mainline code and is released directly without testing, so various issues may occur. These issues are usually because upstream has not yet finished developing a certain feature, and it is necessary to wait for upstream to complete the development of that feature to resolve them. Therefore, when encountering issues with turnip-weekly, you can switch to other versions of the driver or wait for the next week's build.
- Extract the installation package directly to the root directory.
sudo tar -zxvf mesa-for-android-container_26.0.0-devel-xxxxxxxx_debian_trixie_arm64.tar.gz -C /
sudo tar -zxvf turnip_26.0.0-devel-xxxxxxxx_debian_trixie_arm64.tar.gz -C /- Refresh the dynamic linker cache.
sudo ldconfigUninstallation can be performed by referring to the following commands:
# Copy the file list output by this command
tar tf mesa-for-android-container_26.0.0-devel-xxxxxxxx_debian_trixie_arm64.tar.gz | grep -v '/$' | tr '\n' ' ' ; echo
cd /
# Replace <file-list> with the actual file list
sudo rm <file-list>
# Reinstall the distribution-maintained Mesa drivers
# Debian or Ubuntu:
sudo apt update
sudo apt install --reinstall libegl-mesa0 libgbm1 libgl1-mesa-dri libglx-mesa0 mesa-libgallium mesa-vulkan-drivers
# Fedora:
sudo dnf reinstall mesa-filesystem mesa-libglapi mesa-libgbm mesa-libEGL mesa-libGL mesa-vulkan-drivers mesa-dri-drivers mesa-libOpenCL
# Arch Linux:
sudo pacman -S mesa mesa-docs opencl-mesa vulkan-freedreno vulkan-mesa-implicit-layers vulkan-mesa-layersSpecify the environment variables MESA_LOADER_DRIVER_OVERRIDE and TU_DEBUG when running a specific program, as follows:
MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=noconform glmark2Alternatively, add them to the /etc/environment file so they are loaded automatically when the container starts:
MESA_LOADER_DRIVER_OVERRIDE=kgsl
TU_DEBUG=noconform
If you are a developer and want to build the drivers from this project or contribute code, please refer to the development documentation.
Detailed test results: benchmark-result
| Device | Model | SoC | GPU | glmark2 | glmark2-es2 | vkmark |
|---|---|---|---|---|---|---|
| Redmi K40 Pro | M2012K11G | Qualcomm Snapdragon 888 | Adreno 660 | 842 | 771 | 1170 |
| Xiaomi Pad 6 Pro | 23046RP50C | Qualcomm Snapdragon 8+ Gen 1 | Adreno 730 | 1169 | 1143 | 263 |
| REDMI K80 Pro | 24122RKC7C | Qualcomm Snapdragon 8 Elite | Adreno 830 | 3081 | 3083 | 308 |
| Xiaomi 17 Pro Max | 2509FPN0BC | Qualcomm Snapdragon 8 Elite Gen 5 | Adreno 840 | 2947 | 2901 | Not tested |
| OnePlus 15 | PLK110 | Qualcomm Snapdragon 8 Elite Gen 5 | Adreno 840 | 3574 | 3621 | Not tested |
PS: The Xiaomi 17 Pro Max was connected to a power source during benchmarking, which caused performance throttling; the actual score would be higher under normal conditions.
- Lucas Fryzek: Author of the KGSL backend code for the Mesa Freedreno driver.
- xMeM: For porting the Freedreno driver's KGSL backend to Termux:X11.
- Robert Kirkman: For integrating and improving xMeM's patches.
- Rob Clark: For adding Freedreno (including Turnip) support for Adreno Gen8 architecture (including Adreno 840).
- whitebelyash: Add experimental support for Adreno 825.
- Termux maintenance team and contributors: Developed a series of patches for the normal operation of Mesa drivers on Termux.