r/termux

Which one is better ?
▲ 20 r/termux

Which one is better ?

I wanted to know which will give higher performance

  • Chroot Ubuntu (xubuntu-desktop)with termux-x11 or
  • native termux xfce4 with termux-x11
u/CraftyHorse3026 — 13 hours ago
▲ 11 r/termux

rsync errors since upgrade

Hello,

Since upgrde to rsync 3.4.3 the package is not working. I tested between two folders on the same device, i have same bug :

Any idea ?

u/Proper_Engi70 — 1 day ago
▲ 3 r/termux

←↑↓→

Does anyone know got to use these arrow keys over there? Okay up and down works but why is there a left and right key?

u/TheLpGamer24 — 1 day ago
▲ 2 r/termux

What

I literally uninstalled and then install again why is it still error

u/ShiestyCat — 1 day ago
▲ 60 r/termux+2 crossposts

Free tool for estimating foundation materials for field guys.

Hello, made a app to assist in estimating materials for foundations. 100% offline and completely free. Find it here.

u/bldrlife1 — 2 days ago
▲ 6 r/termux+2 crossposts

[Help] Antigravity CLI (agy) crashing in Termux/PRoot (TCMalloc 48-bit VA error)

Hi everyone,

I’m trying to install and run the new Antigravity CLI (agy) inside an Ubuntu PRoot environment on Termux (ARM64) Samsung Tab S8+, but I've hit a wall with a persistent memory allocation error.

Whenever I try to run agy --version, the binary crashes immediately with this error:

1 third_party/tcmalloc/internal/system_allocator.h:595] MmapAligned() failed -unable to allocate with tag ...

2 third_party/tcmalloc/internal/system_allocator.h:602] Note: the allocation may have failed because TCMalloc assumes a 48-bit virtual address space size; you may need to rebuild TCMalloc with TCMALLOC_ADDRESS_BITS defined to your system's virtual address space size

3 third_party/tcmalloc/arena.cc:61] CHECK in Alloc: FATAL ERROR: Out of memory trying to allocate internal tcmalloc data

The Problem:

It seems the binary is compiled with Google's tcmalloc, which is hard-coded to expect a 48-bit virtual address space. My Android kernel (like most) is limited to a 39-bit VA space. When tcmalloc tries to map metadata to high addresses, the kernel rejects it.

What I’ve already tried (none worked):

  1. Setting PROOT_NO_SECCOMP=1 before login.
  2. Using export TCMALLOC_SKIP_MMAP=true.
  3. Attempting to LD_PRELOAD different allocators (libc.so.6, libjemalloc.so).
  4. Running the x86_64 version of the CLI via qemu-x86_64 (fails with the same VSS error).
  5. Using a custom C shim to intercept mmap calls and strip high-address hints.

My Questions:

* Is there any way to force a pre-compiled tcmalloc binary to respect a 39-bit address space without having the source code to recompile it?

* Has anyone found a workaround for this specific "48-bit assumption" in other Google-distributed binaries (like Envoy or Bazel) when running in Termux?

* Is there a "compatible" build of agy available that I might have missed?

Any help or crazy workarounds would be much appreciated!

reddit.com
u/Phoxerity — 2 days ago
▲ 54 r/termux

Make Termux look like an old CRT monitor with Termux_CRT

Project is here: https://github.com/sam1am/termux_crt

Requires the Termux debug apk from github to be installed.

It is fully customizable and you can save/export/import your presets. Settings include:

  • Bloom
  • Burn-in
  • Curvature
  • Scanline RGB shift
  • Ambient Phosphor
  • Flicker
  • Horizontal Sync Wobble
  • Static
  • Background and Foreground color overrides

I'd love to see what others come up with as far as presets and would love to include them in the app. Please share!

u/gthing — 3 days ago
▲ 23 r/termux

I built and modded Termux:X11 entirely on my phone using Termux… and somehow added a working FPS limiter lol

I still can’t believe I actually got this working.

I built and modded Termux:X11 entirely on my Android phone using Termux. No PC. Just Termux, Android build tools, a lot of trial and error, and help from ChatGPT when I got stuck.

The mod I added is a custom FPS limit option under the Output settings.

0 = auto / default refresh rate

1–600 = custom FPS value

The crazy part is that it actually works.

If I set it to something super low like 3 FPS, the whole X11 desktop becomes painfully choppy. If I set it to 30, it feels capped. If I set it to 60, it feels normal. If I set it to 90, XFCE/terminal reports 90Hz inside the session and it feels smoother, even though my phone display is still physically 60Hz.

Just to be clear: this is not overclocking the phone screen. My panel is still 60Hz. This is more like changing the internal framerate/pacing value that Termux:X11 reports and uses inside the X11 session.

The technical part:

Termux:X11 already had a Java path where it detects the Android display refresh rate and sends it to native code through:

sendWindowChange(width, height, framerate, name)

Originally, that framerate value came from Android’s detected display refresh rate.

I added an FPS limit preference in the Output settings, saved the value in SharedPreferences, parsed it safely, clamped it between 0 and 600, then used it to override the framerate before calling sendWindowChange.

So the logic is basically:

- 0 = use Android’s detected refresh rate

- 1–600 = force that value as the X11 framerate

- pass it into the existing native framerate path

The native side already uses that value for root_framerate / blank_interval, so it is not just a fake UI option. That’s why setting it to 3 FPS actually makes the desktop lag hard.

The build process was honestly painful. I had to deal with Java 17, Termux-native aapt2, AIDL problems, CMake/NDK issues on Android, APK signing, native lib mismatch, libXlorie.so replacement, and Android complaining about compressed native libraries.

Eventually I got it working by building the patched Java/resource side in Termux, making sure the correct official libXlorie.so was inside the APK as a stored native library, then signing the final APK.

This is definitely experimental and not upstream-ready, but I’m honestly proud of it. I don’t have a formal IT/programming background, so seeing this actually work inside XFCE on Termux:X11 feels insane.

u/Time-Ad-2504 — 3 days ago
▲ 1 r/termux

Ubuntu on termux

I went so far and at last i couldn't even enter password the keyboard wasn't even working only outfill worked

Help

reddit.com
u/Aeynxd — 3 days ago
▲ 236 r/termux

X11 runs beautifully!

Only having some issues installing software like vs code everything else works great. I’m using the droiddesk script by a user on GitHub.

u/Worried_Elk_3792 — 5 days ago
▲ 28 r/termux

runnig a Minecraft server on termux!

running a Minecraft server with a proxy in termux!

u/KarlosComC_ — 5 days ago
▲ 8 r/termux

New to termux

Hi All,

I am new to Termux.Could you please help me understand how this app is useful and what we can do with it..!

It would be great if you could share your experiences, suggestions,and the ways you personally use Termux.Your guidance will be very helpful for me as a beginner.Thank you in advance

reddit.com
u/IMF7 — 5 days ago
▲ 5 r/termux

I packaged Codex for Termux on Android

I’ve published a Termux wrapper package for Codex:

u/bash0816/codex-termux

Install:

npm install -g u/bash0816/codex-termux@latest

Basic checks:

codex --version

codex login status

Notes:

- This is for Termux on Android arm64

- Do not install upstream u/openai/codex directly on Termux

- Use this package for install/update on Termux instead

Update:

npm install -g u/bash0816/codex-termux@latest

Rollback:

npm install -g u/bash0816/codex-termux@0.130.0

Repo:

https://github.com/bash0816/Codex-Termux

If you try it on another device, I’d like to know:

- Android version

- Termux version

- whether login works

- whether codex exec works

u/Pure-Lengthiness-380 — 4 days ago
▲ 4 r/termux

Proot-distro v5.x is a mix of proot-distro with udocker

Analyzing the functionality of the new version of proot-distro, which is not yet in the Termux repositories. Its operation can be seen as a function of the old proot-distro package and udocker. This, in my opinion, will make the udocker package unnecessary in the Termux repositories. In any case, the creator of Udocker stopped updating the program years ago. Although the docker-compose option is also missing, I don't think Sylirre has this in mind.

reddit.com
u/YitzakAF — 5 days ago
▲ 12 r/termux

Excellent use for an old phone - secure backup server

I found a cool use for my old Samsung S5 (rooted). I have already been using Dropbox and Google Drive to backup my most important files (from my main linux Desktop) but call me paranoid, I was still concerned about possibility of a remote hack that could in theory wipe out both my main files as well as the linked cloud backups. So.. I had an idea.

Setup termux and a few scripts on an unused S5 to do a daily backup to the phone. S5 has ssh key for the desktop but not the other way around and S5 has no outward facing services running. Each day, it would first rsync ~20 randomly scattered static PDF, DOC, image and source files, compare their hashes to make sure they have not been changed (ransomware encryption detection) and only then rsync the whole backup from the desktop. It then adds it to a local borgbackup repo. I have a separate script that prunes the oldest backups if I ever run out of storage but considering that my daily changes are very small, I can easily have over a year of daily backups even in the phone's built-in storage and I also keep another borgbackup on the microSD card. I am far from being a security expert but to me this seems like a pretty secure setup, not to mention - completely free thanks to termux. Otherwise I would have had to use something like RaspberryPi which is nowadays very much not free.

reddit.com
u/Efficient-Rhubarb-99 — 4 days ago
▲ 5 r/termux

A problem with x11

Whenever i try to use it on openbox or any desktop environment it requires me to have the termux app opened instead of the x11 and i tried a lot of ways such as battery optimization configs what do i do

reddit.com
u/Beanie_76 — 4 days ago
▲ 84 r/termux

Kernel compiled in Termux

I compiled a Linux kernel using Termux with gcc on proot-distro

u/YitzakAF — 6 days ago
▲ 1 r/termux

[Guide] Running llama.cpp with Vulkan GPU Acceleration on Termux + Pixel 9 Pro XL (Mali-G715)

🚀 llama.cpp + Vulkan GPU Acceleration on Termux (Pixel 9 Pro XL / Mali-G715)

After lots of trial and error, I finally got llama.cpp running with real GPU acceleration on my Pixel 9 Pro XL. Here's the minimal working setup.

> TL;DR: Modern Termux + llama.cpp b9190 + -ngl 99 = automatic Mali GPU acceleration. No manual driver extraction needed (for now).


✅ Prerequisites

  • Pixel 9 Pro XL (or any Android 14+/Mali-G715 device)
  • Termux installed from F-Droid or GitHub
  • Root access (optional, but helpful for GPU frequency tuning)
  • ~4 GB free storage for model

🟢 Step 1: Install Dependencies

pkg update && pkg upgrade -y
pkg install git cmake clang make vulkan-loader vulkan-tools vulkan-headers glslang -y

🟢 Step 2: Build llama.cpp with Vulkan

git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp

# Clean build with Vulkan enabled
rm -rf build
cmake -B build -DGGML_VULKAN=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build -j4

✅ Verify Vulkan was compiled:

grep "GGML_VULKAN:BOOL" build/CMakeCache.txt
# Should output: GGML_VULKAN:BOOL=ON

ls -lh build/bin/libggml-vulkan.so
# Should show the .so file exists

🟢 Step 3: Download a Model

mkdir -p ~/models
cd ~/models

# Example: Gemma 2 2B (Q5 quantized, ~2GB)
wget https://huggingface.co/google/gemma-2-2b-it-GGUF/resolve/main/gemma-2-2b-it-Q5_K_M.gguf

> 💡 Tip: Use hf-mirror.com if Hugging Face is slow in your region.


🟢 Step 4: Run with GPU Acceleration

cd ~/llama.cpp

./build/bin/llama-cli \
  -m ~/models/gemma-2-2b-it-Q5_K_M.gguf \
  -p "Hello, introduce yourself in Chinese" \
  -n 100 \
  -ngl 99 \
  --jinja \
  --color auto

🔑 Key Parameters:

Flag Meaning
-ngl 99 Offload all layers to GPU (Vulkan)
--jinja Enable Jinja2 template engine (fixes chat format warnings)
--color auto Color-coded output
--verbosity 0 Minimal logs (optional)

🔍 Verify GPU is Actually Working

Method 1: Check startup logs (verbose mode)

./build/bin/llama-cli -m ~/models/your-model.gguf -p "test" -n 10 -ngl 99 --verbosity 3 2>&1 | grep -i "vulkan\|mali\|device"

✅ Look for:using device Vulkan0 (Mali-G715) offloaded XX/XX layers to GPU

Method 2: Speed comparison (most reliable)

# GPU mode
./build/bin/llama-cli -m model.gguf -p "test" -n 50 -ngl 99 --verbosity 0

# CPU-only mode (for comparison)
./build/bin/llama-cli -m model.gguf -p "test" -n 50 -ngl 0 -t 8 --verbosity 0

📊 Expected results on Pixel 9 Pro XL:

Mode Speed
CPU-only (-ngl 0 -t 8) ~1-2 t/s
Vulkan GPU (-ngl 99) ~7-8 t/s ✅

> If GPU mode is 5-6x faster, Vulkan is working!


⚡ Optional: Boost GPU Frequency (Root Required)

Mali GPUs often run at conservative frequencies by default. Unlock performance:

# Check current GPU frequency
cat /sys/devices/platform/gpu0/devfreq/gpu0/cur_freq

# Set to performance mode (max frequency)
su -c "echo performance > /sys/devices/platform/gpu0/devfreq/gpu0/governor"

# Verify change
cat /sys/devices/platform/gpu0/devfreq/gpu0/cur_freq

🚀 Expected improvement: 7-8 t/s → 12-15 t/s

> ⚠️ Warning: Higher frequency = more heat + battery drain. Reverts on reboot.


🛠️ Troubleshooting

❌ "Permission denied" when loading model

chmod 644 ~/models/your-model.gguf

❌ Vulkan not detected / still using CPU

  1. Verify compilation: grep GGML_VULKAN build/CMakeCache.txt
  2. Rebuild with -DGGML_VULKAN=ON
  3. Ensure dependencies installed: pkg list-installed | grep vulkan

❌ Chat template warnings

Add --jinja flag to enable Jinja2 template engine.

❌ Slow performance (<5 t/s with -ngl 99)

  • Try reducing context: -c 512 instead of -c 2048
  • Enable KV cache quantization: -ctv q8_0
  • Boost GPU frequency (see above)

📦 Recommended Models for Testing

Model Size Expected Speed (Vulkan)
Qwen2.5-0.5B ~0.4 GB 20-30 t/s
Qwen2.5-1.5B ~1.1 GB 12-18 t/s
Gemma-2-2B ~2.0 GB 7-10 t/s
Llama-3-8B ~4.9 GB 4-7 t/s

> Smaller = faster. Start with Qwen2.5-0.5B for testing.


🔄 Why This Works Now (No Manual Driver Extraction)

Older guides required manually copying vulkan.mali.so and setting LD_LIBRARY_PATH. On modern setups, this is often unnecessary because:

✅ Android 14+ has better Vulkan ICD discovery
✅ Termux's vulkan-loader package auto-detects system drivers
✅ llama.cpp b9190+ has improved Android Vulkan backend

> ⚠️ If auto-detection fails on your device, fall back to manual driver extraction guides.


🎯 Final Working Command (Copy-Paste)

cd ~/llama.cpp
./build/bin/llama-cli \
  -m ~/models/gemma-2-2b-it-Q5_K_M.gguf \
  -p "Hello, write a short poem about Android" \
  -n 150 \
  -ngl 99 \
  -c 1024 \
  --jinja \
  --color auto \
  --verbosity 0

💬 Questions?

Drop a comment if you run into issues! Happy to help troubleshoot.

Device: Pixel 9 Pro XL
Android: 15
Termux: Latest from F-Droid
llama.cpp: b9190 (main branch)
GPU: Mali-G715 (Vulkan)


Last tested: May 2026

u/Rickx005x — 5 days ago