/r/termux

Photograph via snooOG

Official Reddit community of Termux project. Share your Termux configuration, custom utilities and usage experience or help others troubleshoot issues.

For everything related to the Termux android app —an open-source terminal emulator and Linux environment for Android.

/r/termux

46,635 Subscribers

1

using adb without wifi

Hi,

I can use adb within termux to connect to the device itself in principle but the option to turn on debugging via wifi is only available when the device is connected to a wifi hotspot and sometimes I don't have a wifi network available so my question is:

Is there any app or any other workaround to make the device believe it is connected to a hotspot so that I can turn on debugging over wifi and connect to my own device via adb in termux?

6 Comments
2024/05/03
14:52 UTC

3

How to run esptool.py in termux

I've managed to install esptool through pip and created a virtualcom using socat and serial to udp app, but when i run esptool.py -p virtualcom -b 115200 i get a permission denied error, is there any way i can run esptool without root?

1 Comment
2024/05/03
10:46 UTC

0

configure: error: no acceptable ld found in $PATH

I get this error while i run ./config file from cloning the sdl repo to install it Any help?

3 Comments
2024/05/03
10:06 UTC

1

How can I build a kernel ready for LXC?

I am trying to use LXC but I keep getting some errors and I think it's because I'm missing some drivers on my kernel. I have a Redmi note 9 pro running lineage os 20, is there a way to rebuild only the kernel?

7 Comments
2024/05/03
07:25 UTC

3

My first contribution - My setup script

After sneaking around in the shadows of the Termux community, I finally decided to give back, so this is the script I've used to install all the needed things on Termux to use as a daily driver. From the readme:

TermuxSetup

Yeah, yeah, another setup script. This one does the usual boring stuff, but hey, this one is recently updated (probably) and it actually works (also probably).

What This Script (Begrudgingly) Does

  • Updates Your Repos (Because It Has To): Gets you the freshest packages because apparently that's important to some people.
  • Installs Essential Repos: Adds tur-repo and x11-repo, because who doesn't need more package sources?
  • Development Tools (Blah Blah Blah): Installs Code-OSS (for the GUI lovers), Nodejs (with npm, of course), Python 3 (with pip), Python 2 (for the dinosaurs), and more.
  • XFCE4 Desktop (If You're Into That Sort of Thing): Sets up XFCE4 so you can pretend Termux is a real computer.
  • VNC Server (With a Catch): Installs a VNC server so you can remotely access your tiny Android desktop. Don't forget: Run vncpasswd after restarting to actually set a password.
  • Zsh Upgrade (Because Bash Is Lame): Switches your default shell to the mighty Zsh.
  • Aliases (For the Extremely Lazy): Includes these shortcuts so you don't have to type a few extra characters:
    • py - Run Python 3 scripts
    • py2 - Run Python 2 scripts
    • startvnc - Start the VNC server and XFCE4 desktop
    • killvnc - Stop the VNC server (Srsly: this is important because if you do not kill the server before stopping Termux, the next time you use startvnc, it'll bitch about display locks.)

Usage (If You Must)

Here is an overly-complicated one-liner to install so I can look as though I'm smart and I know what I'm doing:

curl https://raw.githubusercontent.com/theregoesmyeye/TermuxSetup/main/setup.sh | tee ~/setup.sh && chmod +x ~/setup.sh && bash ~/setup.sh && rm ~/setup.sh

A link to my repo: https://github.com/theregoesmyeye/TermuxSetup

Changes:

  1. Now installs git and sets up storage, bruh.
3 Comments
2024/05/03
05:27 UTC

1

Ls problem in proot distro

I can't access my storage from Ubuntu in proot distro that I installed on my termux, please help me resolve this problem

4 Comments
2024/05/02
14:04 UTC

0

Send and receive bluetooth with python.

On my laptop I wanna send, and also receive Bluetooth data using python. I'm on a galaxy A12, and I have root installed, which was patched with Magisk 27.0, with ram disk but no zygisk.

9 Comments
2024/05/02
03:28 UTC

3

Have you made any Termux Tool?

I've recently started contributing to Termux tools and I'm on the lookout for active projects to contribute to. However, I've been facing some challenges in finding projects that are actively maintained and open to contributions.

Many tools I come across are outdated or seem to be abandoned, with issues and pull requests left unaddressed. It's like trying to find a needle in a haystack! 😅

So, I'm reaching out to the Termux community here to see if anyone knows of any active projects or tools that could use some help. Whether it's fixing bugs, adding new features, or just providing general support, I'm eager to contribute where I can.

If you're working on a project or know of one that could use an extra set of hands, please drop a link below or shoot me a DM. I'd love to get involved and help out however I can.

  • masterplan
4 Comments
2024/05/01
23:13 UTC

1

can I start the ssh-server via adb?

Hi,

I have a tablet (not rooted, Android 14 I believe) with a broken screen that still is still accessible via adb.

Before I send it off for repairments I would like to get a few files off the device, however for whatever reason within an adb shell the directory /sdcard does not exist and /storage/emulated/0/ is empty...

So I thought I might be able to use an ssh-server to get to my files as the device still connects to my wifi and the termux sshd is installed and configured, so all I need is a way to start it via adb.

I have tried this:

adb shell am startservice --user 0 -n com.termux/com.termux.app.RunCommandService -a com.termux.RUN_COMMAND --es com.termux.RUN_COMMAND_PATH '/data/data/com.termux/files/usr/bin/sshd'

But I get the error "Error: Not found; no service started."

So my question is: Is there a way to start the termux-sshd with adb?

14 Comments
2024/05/01
21:19 UTC

2

How can I access logs.txt on Termux?

So I was activating a tool and to see the informations COLLECTED I had to access a file named logs.txt. But I don't know how to access it. Can someone help?

8 Comments
2024/05/01
17:13 UTC

2

Black screen with square cursor in VNC after Ubuntu 22.04 install and vncserver-start

Hello all and thanks.

I have just installed Andronix, Termux and the ubuntu 22.04 distro on my Xiaomi 11T Pro running android 13.

I have disabled the phantom process limit using adb, and so far so good. But if I connect through RealVNC on my android phone I log in correctly but I don't see any desktop, just a blank black screen with a square cursor I can move. I would say this is identical to what is happening https://github.com/termux/x11-packages/issues/578

In order to clarify, I initially tried the default ubuntu (free) linux installation and then installed the (paid) andronix ubuntu 22.04 distro. Both showed the same black screen.

I have searched online for similar problems and solutions but nothing has seem to help.

Does anybody have a clue about what can be going on??

2 Comments
2024/05/01
15:46 UTC

0

How Can i sudo in termux without rooting my device (Android)? (New to linux here)

15 Comments
2024/05/01
14:35 UTC

3

Question

Can I Install Slax/Slitaz/TinyCore/Dawn Small Linux/Pepermint Mini Os On Termux?

3 Comments
2024/05/01
07:30 UTC

2

my_lookupdev: ccmni0: SIOCETHTOOL(ETHTOOL_GLINK) ioctl failed: Permission denied

$ sudo arp-scan -l

my_lookupdev: ccmni0: SIOCETHTOOL(ETHTOOL_GLINK) ioctl failed: Permission denied

???(?localhost)-[~]

??$ sudo arp-scan -l -interface wlan0

pcap_create: wlan0: SIOCETHTOOL(ETHTOOL_GET_TS_INFO) ioctl failed: Permission denied

why ?

2 Comments
2024/05/01
05:24 UTC

4

How to reverse Termux to clean state

Hi, is it possible to get back to install state (remove all installed package and configuration files) thanks to Android app management with clean cache and empty storage ?

5 Comments
2024/04/30
16:35 UTC

1

What would be the ideal distro to run in chroot?

I've already used it, K..., Ubuntu, Debian, Fedora, Void (xfce4 bug) and Arch (xfce4 bug). I only saw a difference in the interface.

4 Comments
2024/04/30
16:07 UTC

2

Nmap install problem

First off thanks for, this amazing resource and for letting me join you all, I come bearing questions, I'm a termux noob on a Samsung s10 non rooted, termux from Google add a repo if memory serves right, anyway since then when trying to install 99% of things I get ":bad" at the end of a mirror as in the picture, any ideas what I did to mess it up, I've tried to use command "pkg install nmap" I reckon it's a learner mistake of not understanding but that's what I'm trying to do is learn, thank you.

7 Comments
2024/04/30
11:50 UTC

6

does anyone know a good editor like gedit for termux?

Hello everyone,

I hope you are doing great.

I've been looking for a decent text editor like gedit to work in my termux. I have installed xfce desktop, and this is missing so far. I dont plan on doing a proot as its heavy for my usecase.

please note that im not looking for coding so the likes of code, emacs, etc are out of the question. just looking for a way for viewing files in my xfce desktop when the needs be.

Thanks a lot in advance

10 Comments
2024/04/30
07:04 UTC

0

How to install arch-linux in Android...

I wanna install arch on Android as it would not lag much having no gui.....

6 Comments
2024/04/30
03:14 UTC

1

Virgl - lost connection to render server - chroot debian

Hello all, previously I had been running a Debian proot, used it everyday and it worked well. That environment had the DE accellerated, which in turn everything launched inside it as well, made the firefox experience for my uses much better

I now decided to root my tab extreme and get a Debian chroot going. Its working well, currently using llvm for the rendering. I cannot get virpipe to function, been digging around online and tweaking things to no avail.

The error I am receiving when trying to launch something such as glmark or glxgears with virpipe specified is: lost connection to rendering server on 8 read -1 22.

The launch scripts are as follows:

#!/bin/bash

# Kill all old prcoesses
killall -9 termux-x11 Xwayland pulseaudio virgl_test_server_android

# Start virgl server
virgl_test_server_android &

sleep 1

## Start Termux X11
XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :0 -ac &

sudo busybox mount --bind $PREFIX/tmp /data/local/tmp/chrootDebian/tmp

am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity

sleep 1

# Start Pulse Audio of Termux
pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1

sleep 1

# Execute chroot Debian script
su -c "sh /data/local/tmp/start_debian.sh"

The start_debian.sh script launched at the end of that initial script is:

#!/bin/sh
#Path of DEBIAN rootfs
DEBIANPATH="/data/local/tmp/chrootDebian"

# Fix setuid issue
busybox mount -o remount,dev,suid /data

busybox mount --bind /dev $DEBIANPATH/dev
busybox mount --bind /sys $DEBIANPATH/sys
busybox mount --bind /proc $DEBIANPATH/proc
busybox mount -t devpts devpts $DEBIANPATH/dev/pts

# /dev/shm for Electron apps
mkdir $DEBIANPATH/dev/shm
busybox mount -t tmpfs -o size=256M tmpfs $DEBIANPATH/dev/shm

# Mount sdcard
mkdir $DEBIANPATH/sdcard
busybox mount --bind /sdcard $DEBIANPATH/sdcard

# chroot into DEBIAN
busybox chroot $DEBIANPATH /bin/su - cap980 -c 'export DISPLAY=:0 && export PULSE_SERVER=127.0.0.1 && dbus-launch --exit-with-session xfce4-session'

Hoping someone on here might have some insight as to how to get virpipe to work, my head is spinning from from messing with it the last few days.

6 Comments
2024/04/30
01:50 UTC

Back To Top