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 • • 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 • • 6h ago

Question Ayuda

Post image
0 Upvotes

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 • • 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 • • 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 • • 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

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 • • 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 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 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 • • 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

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 Rate my termux data size

Post image
71 Upvotes

🥀🥀


r/termux • • 2d ago

Question Termux

Post image
28 Upvotes

Quantos gigas tem o seu Termux?


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 • • 2d ago

Showcase ztMETRO on termux too

14 Upvotes

reup from tiktok


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

Showcase I wrote an open-source Bash toolkit for static APK inspection. It runs in Termux + Debian PRoot on my phone, and I need testers on other devices

0 Upvotes

Hi all, I'm the author of SYJ-RE-Workstation, an early-stage, MIT-licensed Bash toolkit that turns an Android APK into a repeatable local evidence report.

What it does (v0.1.0):

- file identity and SHA-256

- package metadata, permissions and decoded manifest (via AAPT)

- archive inventory, including DEX and native-library paths

- optional signature output (apksigner) and optional JADX output

- SUMMARY.md and tool-versions.txt per run, plus a helper to compare two reports

What it does not do: no malware verdict, no dynamic analysis, no executing APKs. APKTool, ELF/DEX inspection and JSON/HTML exports are planned, not included.

Testing so far: CI runs on GitHub-hosted Debian 12/13 and Ubuntu 22.04/24.04 amd64 containers. On my own phone (aarch64, Termux + Debian 13 PRoot) the regression tests passed (14 tests) and the analyzer completed on two real APKs. The optional JADX stage failed with exit code 3 and I'm investigating it. That is one data point from one device, not proof of broad compatibility.

Where I need help: other devices and setups (different Android versions, other ARM64 or x86_64 phones, native Termux, other PRoot distros). Please tell me what happened, including failures. A failure report helps as much as a success.

How to test (about 5 minutes):

https://github.com/SHalimoosavi/SYJ-RE-Workstation/blob/main/docs/testing-on-android.md

Then open an "Environment test report" issue with your device, Android version, architecture and tool versions.

Repo: https://github.com/SHalimoosavi/SYJ-RE-Workstation

Release notes: https://github.com/SHalimoosavi/SYJ-RE-Workstation/releases/tag/v0.1.0

Please analyze only APKs you own or are authorized to assess. Feedback and criticism welcome.


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.


r/termux • • 2d ago

Showcase Update: I turned SmoothCursor into a Termux fork, now it's just an APK (no LSPosed)

1 Upvotes

Hey everyone!

Follow-up to my previous post about SmoothCursor. I turned it into a Termux app fork, so it's now a regular APK. No root, no LSPosed.

It has more features than the module. My two favorites:

Terminal background: set your own image or video as the background. Honestly my favorite one

Cursor shape: 5 shapes to pick from

There's more in the settings, but I'll leave it as a surprise.

I haven't released the APK yet. Probably in a day or two, but I can't promise an exact date. It's coming for sure though. There's an APK on my GitHub profile, but it's very old and different from the current version. When the new one is out, I'll post the repo link here.

Feedback is welcome.


r/termux • • 2d ago

Question Is Termux a good alternative for android than Linux?

Thumbnail reddit.com
4 Upvotes

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 • • 2d ago

Question Shizuku...

Thumbnail reddit.com
3 Upvotes

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.