Article

Unlocking Your Phone's GPU, Camera and Codecs in Termux

A Linux container on Android is locked out of the GPU, the cameras and the hardware video encoder. How to get all three back, with every measurement.

  • Published 2026-09-25
  • Author: Yves Ketemwabi Shamavu
  • Topics: Termux, proot, Android, SELinux, Adreno

Overview

A practical guide to reaching Android hardware from a Termux/proot Linux container: probing which device nodes SELinux actually permits, building Mesa with the KGSL backend so Turnip and Zink drive an Adreno GPU directly, three failure modes that present as unrelated problems, why Codec2 hardware video encoding is blocked by the shell app identity rather than the device, and two ways around it - an Android bridge app that lends its MediaCodec, Camera2 and AudioRecord access over a loopback socket, and a video codec written in GPU compute shaders. Includes full benchmarks for GPU rendering, hardware encode and decode, camera and microphone capture.

The prerendered article page is intentionally descriptive. It gives crawlers and link preview systems enough plain HTML to understand the topic, the technical scope, and the reason the article exists before the full Flutter reading experience loads.

Key themes

The article focuses on Termux, proot, Android, SELinux, Adreno. The complete in-app essay expands on the engineering tradeoffs, implementation details, and practical lessons behind the topic.

  • Termux
  • proot
  • Android
  • SELinux
  • Adreno
  • Mesa