Remix.run Logo
seszett 10 hours ago

Honestly I don't find it more useful than Termux, especially for being so much heavier.

cogman10 10 hours ago | parent [-]

Just because I was curious.

Termux is doing a container. The android terminal is doing a virtual machine. That's the difference.

Termux would definitely be the light weight option, but you will be pinned to whatever version of the kernel your device is shipped with (may be a bit old.)

yjftsjthsd-h 10 hours ago | parent | next [-]

No, termux isn't a container, it's running directly in userspace on the host. The only weird thing is that because it's running directly on the host, it has to be built to use unusual paths, eg. /data/data/com.termux/files/usr/bin/bash instead of /usr/bin/bash. If it used containers (which IIRC it can't because Android doesn't really support it) that would actually be easier because then it could use a chroot to make the paths look normal.

cogman10 10 hours ago | parent | next [-]

Ah, well that stinks a little. I guess it makes sense, if android doesn't mandate a few kernel settings then working with containers might not be an option.

skissane 7 hours ago | parent | prev [-]

Couldn’t it implement a “fake chroot” by e.g. creating its own libc which wraps the real one but with path remapping, and then linking all its executables against that?

yjftsjthsd-h 4 hours ago | parent [-]

That would only work for things that use libc (so eg. most Go programs are probably not going to work). The main way that you can do an unprivileged fake chroot is proot, which termux does offer - see https://wiki.termux.com/wiki/PRoot - but that has a significant performance hit.

seszett 7 hours ago | parent | prev [-]

> you will be pinned to whatever version of the kernel your device is shipped with

That doesn't matter much for using SSH though.

For running more complex Linux programs or scripts Termux is indeed less comfortable (but it can still work).