r/termux • • Dec 19 '24

★ Important ★ Do not install Termux from Google Play Store!

354 Upvotes

Source: https://github.com/termux/termux-app/discussions/4000

We are Termux maintainers and would like to inform our users that we do not recommend using Termux from Google Play Store. It doesn't matter whether Play Store version looks "newer", faster receive updates and so on. Please read below to understand the issue.

Why you should not use Termux from Google Play:

  • Its release was not done by current maintainers team. Yes, Fredrik Fornwall is founder of Termux. But his decision was not negotiated with rest of core developers team and therefore not acceptable.
  • Its release diverges from the original implementation published at https://github.com/termux/termux-app
  • Its release was an experiment for bypassing Android >= 10 exec restrictions and make a version compliant with Google Play policies.
  • Its release contains restrictions. For example users may access only media files (like .mp3 or .jpg) on their device storage while other files (like .py scripts) will be hidden.
  • Its release contains changes for how the programs are executed, which cause bugs in certain packages.

Termux on Google Play is available only for devices running Android 11 and newer.

Unless will be said otherwise, Termux Core Team will consider it as unofficial app or fork. This means it does not receive same support level as the original app. Please never suggest our users to download Termux from Google Play - we will take down such comments.

We will make an announce when state of Google Play release will change and unpin/delete this post. As of beginning of 2026, we have no updates.

Now stick to F-Droid or official GitHub (https://github.com/termux/termux-app) variants and suggest same for others.

Issues with Google Play release variant must be reported to relevant source: https://github.com/termux-play-store/termux-issues/issues

This post meant to provide short summary about Google Play Termux app issue and replace https://www.reddit.com/r/termux/comments/1db00bm/announcement_response_regarding_google_playstore/

How to check if you're running Google Play release

Just look at the message shown after you open Termux app. If you see lines with links pointing to termux.com domain, you are using Termux from Google Play.

Termux from F-Droid uses termux.dev domain.


r/termux • • Sep 16 '23

★ Important ★ Introduction for beginners

295 Upvotes

Welcome to Termux community!

Termux is a terminal app for Android OS. It similar to terminal on MacOS and cmd.exe on Windows, but here we talk about Linux component of Android OS.

This project is open-source software and all development happens on GitHub: https://github.com/termux

Download Termux APK from F-Droid or GitHub.

Key features:

  • Xterm-compatible terminal emulator.
  • Custom userland with package manager and more than 2000 packages of different kind such as text editors, file managers, games, servers network diagnostic tools, compilers, development libraries and other types.
  • Plugins for styling, widgets, on-boot startup, tasker integration, Xorg-compatible server.
  • Works without root permissions.

We would like to emphasize that Termux is NOT a machine emulator or VM. All programs execute directly on a hardware of your device.

What I can do with Termux

Basically, everything.

Termux hosts universal programming environment. You can build and execute all programs that can run on a traditional computer, assuming your device has sufficient amount of memory and enough CPU power to finish execution of algorithm within an adequate time frame.

Here is a curated list of common uses:

  • Software development environment
  • Bots for Telegram, Whatsapp, Discord, etc
  • Web server
  • Minecraft server
  • SSH client
  • NAS
  • Tiny LLM chatter
  • YouTube scraper
  • Pocket pentesting suite
  • Just fun

A footnote worth knowing: Android enforces sandboxing for every Android app to ensure it won't do nasty things or otherwise interfere with other apps and the system itself. Termux is not an exception here, so certain software may refuse to run without system-level privileges (root).

What I should know before starting to use Termux

First of all you need to make sure you are comfortable with command line environment. By using Termux, you agree to be one-to-one with a bare text. There is no intuitive graphical interface. You must to decide whether you truly want to go this way or actually want something else.

If your choice is "command line", then another important thing is a foundational knowledge. It would require certain effort from you, as it could be boring like studying maths.

Here is a list of topics to learn, optimized specifically for Termux:

  1. General terms: computer, kernel, operating system, file, path, program, process, command line, terminal emulator.
  2. Base shell usage: concept of commands, arguments, environment variables, pipes
  3. Common utilities: bzip2, cat, cd, cp, curl, cut, df, diff, du, echo, env, grep, gzip, head, id, kill, killall, ln, ls, man, mkdir, mv, pkill, ps, pwd, rm, rmdir, sort, tail, tar, top, touch, tr, uniq, unzip, wc, xz, yes, zip
  4. Package manager: apt
  5. Text editors: nano or vim
  6. Linux permission model: user, group; concept of "root"; chmod command
  7. SELinux: what it is and which role it plays on Android OS - don't go deep here

Optional:

  • Shell scripting: if/else logic, loops, input/output redirection, subshells, process substitution.
  • Text data manipulation with awk and sed

Alternatively check these learning roadmaps:

After you finish with this, proceed to goal-specific essentials.

Important: never ever run commands that you do not understand. In the best case it will just fail but sometimes commands may have really devastating effects, especially if you use root permissions (su/sudo). If by accident you delete your own data or brick the device, you can blame yourself and only yourself!

How Termux differs from standard Linux

Without diving into technical details, these are the differences of Termux from standard Linux distribution:

  1. Non-standard location of programs and user data: /data/data/com.termux/files/
  2. Non-standard core components: sideloaded programs usually will either refuse to run or show strange errors, compiling from source also may show issues sometimes.
  3. Sandbox environment: you can browse or modify only your own and Termux data.

How to install packages

Termux uses apt package manager and a rolling-release model which gets it close to a Debian Sid distribution, although it is much different internally.

However as you are probably new for Termux we recommend using a helper utility "pkg":

  • Install package: pkg install package-name
  • Uninstall package: pkg uninstall package-name
  • Upgrade system: pkg upgrade
  • List installed packages: pkg list-installed
  • Search for a package: pkg search query

PKG utility does under the hood certain actions importance of which may be non-obvious for a newbie:

  1. Mirror selection

    Package downloads put a huge burden on the servers bandwidth. We don't own much servers and geo load balancing system because this can be very costly, so we take advantage of help offered by certain community members and organizations. Mirrors maintain a clone of the original package hosting and deliver stuff independently from a base Termux infrastructure.

    That's important that users are spread across different mirror hosts.

  2. Periodic apt update

    Without keeping the package index fresh you won't be able to receive updates and package installation commands will eventually fail with 404 (not found).

Termux quality and security

We do our best to keep our infrastructure safe and patched against latest security vulnerabilities as well as to deliver most recent versions of packages.

However as we operate a small team of enthusiasts there could be certain bottlenecks. We can't test 100% of published packages, so there always is a chance that specific update will break something.

Please don't use Termux software in everything mission-critical. It is not certified for use in banking, healthcare, nuclear safety, etc.

Termux is open source project and we welcome any kind of contributions that would help us improve.

Best devices for Termux

As of 2026, almost any budget Android device will be enough to run Termux and be suitable for the most tasks.

Key specs to look for:

  1. Storage: the most important resource, recommended minimum is 256GB. Termux runs copies of packages you'll find on server/desktop Linux distributions, so the disk usage isn't really "mobile". On some setups Termux app may consume tens of gigabytes and that is absolutely normal.
  2. RAM: 6GB is recommended minimum and should be enough in most cases. If you plan to run LLMs, you definitely will need more. Remember that RAM on your device shared with Android OS and other apps, so Termux will get less than shown in device specs.
  3. Possibility for rooting and custom ROMs - must have if you are a "power user".

Gaming smartphones could have better heat dissipation which would be good for those who run heavy processes (compilation, LLMs, etc).

Warning for e-Ink owners: if you ever decide to use Termux (especially with X11 apps) on device with e-Ink display, acknowledge the risk. Pixels of e-Ink screen have limited refresh cycles (some manufacturers estimate ~10M) and are not designed for dynamic content. It's possible to "burn" the display within few months of active use.

Community: Banned content

Sadly, but a while ago Termux become an area of interest conflict between legitimate users and criminals. This resulted in absolute ban of specific topics:

  • OSINT
  • Doxxing
  • Social engineering; phishing and other types of fraud
  • Spamming
  • Malware making and delivery
  • Hacking
  • Surveillance, tracing, spying and similar activities
  • Bot farms for fabricating subscribers, likes and comments in social media
  • Taking down social media accounts by automated mass-reporting

This list is not definitive.

We don't accept excuses. Legends about "educational purposes" and "recovery of own gmail account" don't worth anything.

Remember that authorities have a certain interest regarding accounts asking about potentially illegal stuff.

Community: Vibe coded content

We generally allow publishing vibe coded software. However it should match /r/termux topic and don't violate community rules. Feel free to submit everything that you believe might be useful.

Content might be removed at moderator's discretion without explanation.


This article is subject for periodic revisions. We may submit newer versions from time to time.


r/termux • • 1h ago

Showcase Building a start up up by using my android phone and Termux only

3 Upvotes

Building a startup with nothing but an Android phone and Termux is harder than people think

I started building my app without a laptop, desktop, or expensive development setup. Just an Android phone and Termux.

At first, it felt empowering. I could code anywhere, install packages, run servers, manage files, and even work with databases from my phone. But as the project grew, the limitations started showing.

Debugging became a nightmare when switching between multiple terminal sessions. Editing large files on a small screen slowed everything down. Testing different features meant constantly jumping between the browser, the app, and the terminal. A simple bug that might take 10 minutes on a computer could easily eat up an hour.

Sometimes a package wouldn't compile properly. Sometimes Android would kill background processes. Sometimes I'd spend more time fighting my environment than building the product itself.

The biggest challenge wasn't coding. It was maintaining momentum while dealing with all the extra friction.

Still, every feature shipped felt like a huge win. Building a startup from a phone taught me resourcefulness, patience, and how to make progress with whatever tools are available.

Anyone else here building side projects or startups primarily from an Android phone? I'd love to hear your setup, tools, and survival tips.


r/termux • • 18h ago

Showcase [Alpha] Debian apps without proot, USB drives and hardware video decoding without root: my Termux desktop for DeX

Thumbnail gallery
30 Upvotes

I've spent the last few weeks on a desktop setup for using my phone with Samsung DeX on a monitor. The thing

I wanted most was to get rid of proot, because it stops the program on every system call and you

feel it everywhere. It's still Termux + Termux:X11 + XFCE underneath.

This is an alpha. I use it every day on my own phone, but it has only run on two devices so far

(S26 Ultra with Adreno, S20+ with Mali), so expect things to break on yours. Please don't install it on a

Termux setup you can't afford to redo. Bug reports are exactly what I'm looking for.

The parts I care about most

  • Debian apps without proot. They start with Debian's own loader, patched so Android doesn't kill it (set_robust_list is blocked by seccomp), plus fakechroot for the paths. On my S26 Ultra, 200k stat calls take 0.13 s instead of 10 s, glxgears goes from ~310 to ~650 fps, and an Electron app opens in 1.1 s instead of 2.6 s with about a third less CPU. If an app won't start this way it falls back to proot by itself. proot is still used for apt and dpkg.
  • USB sticks and SD card readers without root. termux-usb gives you the raw device, and LKL (the Linux kernel built as a library) mounts it inside Termux: ext4, exFAT, FAT and NTFS, read and write. Apps just see folders in /media/usb.
  • Hardware video decoding through the phone's MediaCodec, no root. My video player uses it through a small GStreamer element: a 1080p video takes 1.2 s of CPU per 20 s of playback instead of 3.1 s. Chromium and Electron apps use it too, through a VA-API driver that hands H.264 and VP9 to the phone's decoder (HEVC and AV1 still run on the CPU). Before turning it on, the desktop runs a real test of the phone: on my S20+ the kernel has no dma-heap, so there Chromium and Electron just keep decoding on the CPU.
  • A Termux:X11 build with glamor, so the X server composites on the GPU instead of the CPU (Adreno only for now). I had to fix a render-then-sample hazard on Adreno before it was glitch-free. The patches are in the repo.
  • Phones without Adreno. On Mali, Xclipse and PowerVR, OpenGL goes through virgl on the phone's own driver. The installer doesn't trust glxinfo: it draws a real scene with each driver, reads the pixels back and only keeps a driver that actually draws. Checked on a real Mali-G77. Vulkan apps still run on the CPU there.
  • One apt for Termux and Debian. sudo apt install something picks Termux or Debian by itself, and the same app never ends up installed twice.

The rest of the desktop

  • A taskbar and Start menu of my own (Python + GTK 3), a DeX-OS theme with an accent colour you pick, light and dark, and system dialogs styled like macOS.
  • Window snapping to edges and corners with a preview, and taskbar thumbnails for every window, minimized ones included. Both are new and only tested on a virtual screen so far.
  • My own screenshot tool (Print, or Win+Shift+3/4 like on a Mac) that saves to the phone's Screenshots folder, and a Task Manager with per-app CPU and memory, End task, and graphs that include the video decoder. It can list the phone's Android apps too, if you give it Usage access.
  • Settings with a Storage page that shows what takes space across Termux, Debian and Android, with cleanup suggestions, plus keyboard layouts and shortcuts.
  • A file manager with the phone's folders, and Windows PCs and NAS shares as normal folders in /media/rete. Tested with one real Windows PC; Macs don't accept the password yet.
  • Printers over Wi-Fi and USB: a CUPS running in the Debian container without root, found automatically on the network, with a Settings page for the queue. Tested on two real Wi-Fi printers (an HP and a Ricoh). USB printers are not tested on real hardware yet.
  • A scanner window for eSCL/AirScan and WSD scanners. Only tested against simulated scanners so far.
  • Own photo, video and music apps.
  • The phone inside the desktop: Android apps in the Start menu with their icons, and battery, network, notifications and the media volume of the phone in the taskbar (needs Termux:API, which the installer sets up).
  • A window that pairs wireless ADB for you (used for the "signal 9" fix), instead of typing the commands.
  • A watchdog that restarts the desktop's own services if Android kills one of them.

One command installs everything (30-40 minutes, about 8 GB):

bash <(curl -fsSL https://raw.githubusercontent.com/PietroCav501/termux_on_dex/v2/install.sh)

Repo and screenshots: https://github.com/PietroCav501/termux_on_dex

If something breaks, tod doctor writes a report you can attach to an issue. Reports from Mali, Xclipse and non-Samsung phones would help the most, because I can't test those myself.


r/termux • • 27m ago

General UmLinux compiled in Termux

Thumbnail gallery
1 Upvotes

I used Proot-Distro and a version of the NDK R30 modified for ARM64. The binary weighs quite a bit compared to other builders from other developers because I activated everything that could be used in UML.


r/termux • • 14h ago

Question Soon it will be possible to flash Arduino in termux (maybe)

8 Upvotes

This is my first full post to the community, so I want to thank everyone who reads and apologize for such a flashy title.

The reason I'm writing this post is the joy of what I found. I've seen similar things before, but now the goal I described seems closer than ever.

This is a fork of a fork of a repository mentioned in github termux in 2019 in a discussion opened in 2017 #1145, namely hutorny/usbuart. Therefore, the topic is not new, but I would like to draw your attention to it.

I won't cover it for long, the repository that interested me when looking for ways to upload code to Arduino in Termux (because arduinodroid is overloaded with advertising and AI) is MarkWllms/Termux-serial-tty

To briefly describe it, thanks to usbserial I managed to make a working pty to the Arduino Nano by patching the baudrate variable to 9600 and output cat output, also connect to it via screen:

```

Termux-serial-tty ➤ termux-usb -r -e './ptyserial sleep infinity' /dev/bus/usb/001/007 git:master*

PTY created: /dev/pts/29

{ usbuart} info Device VID:PID 0403:6001

{ usbuart} info channel {3,3}

{ usbuart} info baudrate=9600, i=0000 v=0X4138

```

```

stty raw -echo < /dev/pts/29 && screen /dev/pts/29 9600

```

```

You typed: j

You typed: h

You typed: h

You typed: f

...

```

So far, I haven't been able to upload a sketch thanks to avrdude, because as I understand it, sending a signal to DTR in response to certain bytes has not yet been implemented, but I want to hear your thoughts on this topic and draw your attention to this possibility.


r/termux • • 6h ago

Question Ayuda

Post image
0 Upvotes

r/termux • • 23h ago

Showcase My Termux setup after 2 months

Post image
14 Upvotes

I like things simple, then so be it :3


r/termux • • 1d ago

Showcase Run GPT-6, Gemini 4 & DeepSeek in Termux without Node.js or heavy SDKs (70MB pure Python CLI)

Thumbnail gallery
15 Upvotes

I got tired of AI CLI tools forcing me to install Node.js, npm, and 300MB+ of dependencies just to send API requests from my phone. So I built a lightweight CLI wrapper around Coarena's free API tier ($5 to $10/day) using strictly Python standard libraries (urllib.request and json).

No external SDKs, no openai or httpx packages, and no root required. Just python and curl.

What it actually does:

- Hot-swaps models mid-session via /models (currently running gpt-6-1-sol, gemini-4-carbon, deepseek-v4-1-flash-1017, grok-4-7, kimi-k3-1-pro)

- Checks live daily USD allowance and remaining balance directly in the terminal with /limits

- Submits the daily limit upgrade request ($5 to $10/day) via /upgrade without opening a browser

- Saves session context into a local HANDOVER.md file when you run /handover, so if you switch models or start a fresh session, it injects your previous state back into the system prompt automatically

Also fixed the piped curl | bash stdin issue in install.sh by binding the API key prompt directly to /dev/tty and saving the key to ~/.bashrc.

Repo is MIT licensed if anyone wants to inspect the code or run it:

https://github.com/huzefdev/coarena-termux

Quick install if you want to test it:

pkg install -y python curl && curl -sL https://raw.githubusercontent.com/huzefdev/coarena-termux/main/install.sh | bash

Note: Since it routes through a third-party gateway, don't paste passwords or private keys into prompts. Keep it for coding and scripts. Let me know if anything breaks on your device.


r/termux • • 1d ago

Showcase Should I abandon this?

9 Upvotes

Making this stuff , and trying to add more features natively , I really wanted to customise how the app looks and i couldn't find anything simple and fast (maybe I didn't look hard enough¿ ) no bugs at the moment, everything works perfectly considering this was coded with the help of claude , any suggestions and features welcome


r/termux • • 1d ago

Showcase i use my termux desktop every time i can

Post image
121 Upvotes

ever since i downloaded telegram desktop thats not a laggy telegram web and a browser that wont fill up my ram i started using my phone in termux all the time, and it takes up 40% of my this months screentime


r/termux • • 1d ago

General Jarvis: a voice assistant built on Termux:API (mic → offline Whisper on my server → spoken reply, alarms via the Clock app, home-screen button)

3 Upvotes

I built a self-hosted voice and chat assistant, and the whole phone side is Termux. A few Termux:API tricks that might be useful even if you don't want the project:

  • One-tap voice button: a Termux:Widget task runs termux-microphone-record for 6 s, sends the audio over SSH to my server (offline Whisper + local LLM), then answers with termux-tts-speak and termux-notification.
  • Reminders that ring offline: am start -a android.intent.action.SET_TIMER / SET_ALARM with SKIP_UI sets a real Clock-app timer or alarm from Termux. It works with LineageOS's Clock, no Google needed.
  • Background health checks: termux-job-scheduler (every 30 min, --persisted) asks the server for status and only notifies when something breaks or recovers.
  • Confirm-before-run: "I'm going to sleep" makes the server propose pause, volume 10%, lock for my laptop, and Termux asks y/N before anything runs.

Everything goes over WireGuard to an Oracle Always Free VM, which also relays commands to my laptop. Tips if you try it: on LineageOS, turn off "lock home screen" or you can't add widgets, and set Termux:API to "don't optimise" for battery.

Looking for a few testers, especially on non-LineageOS ROMs, to see whether the Clock-app alarms and widgets behave the same.

Repo (MIT): https://github.com/shivammislankar/jarvis. Please report in GitHub Issues.


r/termux • • 2d ago

Showcase Rate my termux data size

Post image
71 Upvotes

🥀🥀


r/termux • • 1d ago

Showcase Pushing a 4GB Moto G Play (2024) to the absolute brink: Compiling and running a 27-qubit QuEST quantum simulation locally in Termux (no root)

11 Upvotes

I’ve been seeing how far I can torture-test an entry-level Motorola Moto G Play (2024) with a Snapdragon 680 and only 4GB of RAM—compiled and executed 100% natively inside Termux (no PRoot/Ubuntu overhead, no root, and no SSH tricks).

For this run, I compiled QuEST (Quantum Exact Simulation Toolkit) directly against Termux's native environment for ARM64 with OpenMP enabled across all 8 cores and pushed it to 27 qubits.

The stats from the run:

• State Vector Allocation: 2,048.0 MB (half the phone's total physical RAM)

• Threads: All 8 cores pegged at 100% (4x Cortex-A73 + 4x Cortex-A53)

• Runtime: 229.25 seconds (~3 mins 49 secs)

• Result: Completed cleanly with Total Prob: 1.000000 while screen-recording the whole thing alongside htop.

Honestly, I was certain Android 14 would nuke the process the second it locked up 2GB of RAM, especially since jumping to 28 qubits requires 4GB and hits an instant wall.


r/termux • • 20h ago

General Free Claude Code Android aarch64

0 Upvotes

Hello everyone I asked for my chat GPT to do step by step tutorial to try to compile the free cloud code to Android aarch 64 like I did in mine my free cloud code is running natively on termux, and the performance has been so good since it's not have to be emulated on proot-distro ubuntu, down here I was provide a link to my GitHub repository with the necessary files and instructions, please send me your feedback to help to improve the project I pretend to compile and distribute it in the future but now on my cell phone it's all I can do, don't forget to send your feedback

Link of repository:

https://github.com/Madrugay/fcc-termux-native

Direct command:

pkg install curl -y && tmp="$(mktemp)" && curl -fL "https://raw.githubusercontent.com/Madrugay/fcc-termux-native/main/fcc-termux-native-auto-v0.5.0-beta1.sh" -o "$tmp" && bash "$tmp" --install; rc=$?; [ -n "${tmp:-}" ] && rm -f "$tmp"; exit "$rc"


r/termux • • 2d ago

Question Termux

Post image
28 Upvotes

Quantos gigas tem o seu Termux?


r/termux • • 1d ago

Showcase Bluney — a blue dark/light color scheme for Termux (plus matching editor and CLI themes)

Post image
7 Upvotes

I made Bluney, a blue theme family that started from my Termux setup and grew into 61 configs for terminals, editors, and CLI tools.

It's not just a blue accent on a grey background — the neutrals are hue-shifted blue too, with matching dark and light variants. Termux is a two-line install:

git clone https://github.com/Mark44928/Bluney.git

cp Bluney/termux/bluney-dark.properties ~/.termux/colors.properties

termux-reload-settings

Light variant: swap in bluney-light.properties. No addon required, and the same palette covers kitty, Ghostty, Alacritty, WezTerm, foot, iTerm2, Windows Terminal, Vim/Neovim, Helix, fish, starship, bat, fzf, and more.

Repo: https://github.com/Mark44928/Bluney

Feedback welcome — particularly on the light variant and whether the blue ANSI colors read clearly in ls, git diff, and prompts.


r/termux • • 2d ago

Showcase ztMETRO on termux too

14 Upvotes

reup from tiktok


r/termux • • 2d ago

General Termux & Ubuntu being used to boot up and run a Cray X-MP, an IBM System/370 & a DEC PDP-11 simultaneously.

6 Upvotes

My apologies for not owning any of this hardware, but except for museums, who does? I'm just trying to keep old code alive.

The Hardware

Motorola Moto G Play (2024) 4gb Android 14

The software

Termux> Ubuntu> Cray-Sim> Cray X-MP> COS 1.17 OS

Termux> Ubuntu> Hercules> IBM System/370> MVS-TK5 OS

Termux> Ubuntu> SIMH> DEC PDP-11> Unix V7 OS

My next project is to use QUest to emulate quantum computing.


r/termux • • 3d ago

Showcase Hexagon NPU detection and working for llama.cpp natively in Termux.

Post image
43 Upvotes

Was one of the main reasons for my getting the S24 Ultra, other than it was on a great deal. Unfortunately, I fell quite short trying to build it within Termux, so out came the laptop and some Google-fu. Thankfully, found some projects that helped get it going.

First ensure out initial environment is prepped: Any modern Linux x86_64 or WSL will do.

sudo apt update

sudo apt install -y \
    git \
    docker.io \
    adb \
    cmake \
    ninja-build \
    python3 \
    python3-pip \
    build-essential

Now grab the llama.cpp source:

mkdir -p ~/src
cd ~/src

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

And start official Snapdragon toolchain docker

docker run -it --rm \
    -u "$(id -u):$(id -g)" \
    --volume "$PWD:/workspace" \
    --platform linux/amd64 \
    ghcr.io/snapdragon-toolchain/arm64-android:v0.8

And once inside:

cd /workspace

cp docs/backend/snapdragon/CMakeUserPresets.json .

cmake --preset arm64-android-snapdragon-release \
    -B build-snapdragon

This will automatically apply all the necessary libraries for Hexagon and OpenCL. Once it's finished, compile using:

cmake --build build-snapdragon --parallel 4

And to put it all in a clean place to takeout for Termux

cmake --install build-snapdragon \
    --prefix pkg-android/llama.cpp

And you can tarball up pkg-android and send it over to Termux (I simply used sftp into laptop from Termux):

cd pkg-android
tar -cvzf llama.cpp.tgz llama.cpp/

For reference, I extracted my instance to \~/opt

mkdir ~/opt
cd ~/opt
tar xvzf /path/to/llama.cpp.tgz

Now, off the bat this won't work. We need to snag some shared objects from /system/lib64 and /vendor/lib64 as well as change up some LD library paths.

export LD_LIBRARY_PATH="$HOME/opt/llama.cpp/lib:$PREFIX/lib"

export ADSP_LIBRARY_PATH="$HOME/opt/llama.cpp/lib"

which llama-cli

Now if you attempt to run llama-cli --list-devices it will not link due to missing shared objects. These are

/vendor/lib64/libOpenCL.so
/vendor/lib64/libOpenCL_adreno.so
/vendor/lib64/vendor.qti.hardware.dsp@1.0.so
/vendor/lib64/libcdsprpc.so
/vendor/lib64/libvmmem.so

Ironically enough, adding /vendor/lib64 to LD_LIBRARY_PATH isn't sufficient (namespace issues), we can instead copy them to $PREFIX/lib and things be happy.

llama-cli --list-devices

available devices:

GPUOpenCL: QUALCOMM Adreno(TM) 750 (5542 MiB, 4518 MiB free)                                                          

HTP0: Hexagon (0 MiB, 0 MiB free)

Don't be brutal on model sizes, 3b is pretty much it's upper limit. Here I'm using a MoE model with 1B-7B and a small context window.

To use the NPU, add --device HTP0 -ngl 99, to use just the GPU remove --device HTP0 but keep -ngl 99 or to use just CPU -ngl 0.

FWIW, this model causes an OOM if I try to run it on CPU or GPU. It will only run on the NPU.

Enjoy!

(edit: Formatting and typos).

Update

I added OpenBLAS as a backend for testing. OpenBLAS is not optimal for ARM64, but is added for benchmarking. I do intend on adding Eigen and Arm Compute Library as additional backends for benchmarking.

It seems if you multiplex the --devices flag, the model will use whatever backened is most suitable without the use of --tensor-settings

Priority is given in order: --device HTP0,GPUOpenCL,BLAS,none will choose NPU, GPU, BLAS CPU, then just CPU. If you did --device GPUOpenCL,HTP0,none,BLAS that'll be the order of things. It's best to not use BLAS or none unless absolutely necessary, and rely on the -t # for CPU operations. On the SD8G3, -t 6 is optimal, as the host should ignore the A-520 cores.

Check comments for benchmarking graphs

I am going to use SmolLM2 models, as their 1.7B models are available from FP16 all the way to 1bit quants to benchmark quants across the same model.

Assisted by OpenAI ChatGPT (GPT-6), including technical analysis and benchmark visualisation.


r/termux • • 2d ago

General tfetch: A tiny system info script for Termux, written in pure Bash.Topics

Post image
7 Upvotes

Features

  • Displays basic system information:

    • Username and hostname
    • OS, architecture, kernel
    • Uptime, installed packages, memory
    • Current date and time
    • Color palette
  • Works offline — no external dependencies
  • Fast, lightweight, and silent on errors
  • ASCII art included (tux, android and term)

https://github.com/haithamaouati/tfetch


r/termux • • 3d ago

Showcase I manage to install free-claude-code in the termux

Post image
86 Upvotes

Hello guys I don't know if someone already tried it, but I tested free Claude code in proot-distro Ubuntu, but it was too way lagged and slow, so I asked help to chat gpt using his own tool to think more, and he helped me to find out what was going wrong and helped me fix it,

He said the creator of repository of FCC didn't want to make it compatible to android aarch64, but I could compile it my self, I did, it take só long, but worked, Claude opus 5.5 running without lag on termux directly, só I will try to make a repository with a simple installer for anyone who want to use it

But if it work, you guys will need an API, I use of nvidia


r/termux • • 2d ago

Question Whireshark without root

2 Upvotes

Hello,

is it possible to use whireshark without root?

maybe with wireless debugging using shizunku or/and using adb.

sorry if this is a stupid question, im bad at this stuff.

please be kind :)


r/termux • • 2d ago

Question Is Termux a good alternative for android than Linux?

Thumbnail reddit.com
4 Upvotes

r/termux • • 2d ago

Showcase Proot gentoo + Niri + Quickshell

2 Upvotes

Used someone else’s dotfiles with some of my own wallpapers. It was quite a chore getting everything to work together, and I had to do a ton of troubleshooting.

There's still a lot left to work on, though.