Live data from Hacker News

Termux is an Android terminal emulator and Linux environment app

termux.dev

71–80 of 174 posts

Re: Termux is an Android terminal emulator and Linux environment app

#72
post #9

Termux singlehandedly makes me feel like I'm living my childhood dream of having a full computer in my pocket. I use git to blog from my phone, I have ffmpeg and yt-dlp installed to download videos for when I am going to be away from internet access for a while, and I even have some home automation scripts setup that control the lights over the local network. But I am concerned about the direction Android is headed,…

They can switch to provide an UNIX like experience rewritten in Java/Kotlin instead, CLI and stuff, their option.

Google has been quite clear since NDK was introduced in Android 2.0, that is only for games and native methods implementations.

Re: Termux is an Android terminal emulator and Linux environment app

#73
Story Time

I was an IT person for the math building while I was in college and I was mining a newish crypto called doggo on a computer lab while everyone was out for the summer. I had approval to do it and it was going to turn off as soon as the semester started back but they all had workstation cards and I couldn't resist. A man had offered to sell me a 99 civic if I got 200k and I needed a car.

Cut to weeks later and I'm hundreds of miles away for the day eating and drinking at a vitnamese restaurant with some friends and I get some notifications that the mining stopped.

I wasn't worried or afraid though because I knew in my pocket I could just pull out my android and click the magic button, Termux, to get a friendly and sensible shell with which to fix whatever mess had been thrown my way.

It was over in 5 minutes, I just rebooted them, process continued and I kept eating my noodles. Couldn't recommend it enough.

I had 300k by winter break and I had been set to meet the person for the civic after Christmas but that holiday a bunch of people's wallet got hacked and mine was no exception.

I ended up getting a card eventually but it wasn't the 99 civic -_-.

Termux on the other hand has been on every phone ive owned since

Re: Termux is an Android terminal emulator and Linux environment app

#74
post #64
post #47

Earlier quoted context omitted.

> Android 13+ includes a crosvm based virtulization setup Interesting; but I feel that their choice of a hypervisor-based design here supports my point of plain container-based isolation (or even containers + gVisor) being insufficient to achieve true sandboxing on Android. > Android's sandboxing is not limited to ART and has multiple layers [0]. Native apps cannot bypass sandboxing, I don't think. Yes, but when I sa…

Google does, in fact publish apps that require root access in the play store. Titanium Backup is a popular example (though I'd recommend the open source Neo Backup instead). They presumably don't publish apps that use exploits to help the user gain root without unlocking the bootloader and wiping the data partition.

Now thats an app I miss using, but unfortunately its much harder to get root on phones now, or if you do a lot of functions like banking apps will not work.

Androids built in app backup functions are woefully incomplete, and switching to a new phone recently I had to relogin to most apps and re-set up nearly everything, except for stuff like contacts and anything from google. At least some apps supported exporting settings to external files and allowed re-importing them.

Re: Termux is an Android terminal emulator and Linux environment app

#76
post #26

I have been struggling with termux on Android 13 pixel 6 pro. Whenever I edit a picture with ffmpeg, it's invisible to the normal Photos app.

Termux uses a sandboxed file system by default, but you can give it access to the rest of the phone's shared files by running `termux-setup-storage` from within Termux (more details at: https://wiki.termux.com/wiki/Termux-setup-storage ). That'll mount a new folder called "storage" in your home directory where you can place files in locations where other apps can see them.

That doesn't work any more in modern Android, unless SAF is used for communication between applications to access private data.

Re: Termux is an Android terminal emulator and Linux environment app

#78
post #48

Earlier quoted context omitted.

There is quite a difference in size there! Find me a 7 inch laptop with phone battery life and pocket availabilty.

The closest option is probably the GPD MicroPC. It's 6", but pretty damn close to the ideal of a truly tiny PC. I think they're making a successor to this finally, dunno what the status is. https://www.gpd.hk/gpdmicropc

Thanks for the link. It looks pretty cool. Form fact wise it looks to be competitive with an Android phone and a portable keyboard. So it's not clear immediately which is better.

I use termux daily, and you can stand up pretty much anything including a production grade PostgresDB. It's not a toy.

Re: Termux is an Android terminal emulator and Linux environment app

#79
Folks who want a more traditional linux environment and libraries then what termux comes with might find proot-distro[1] to meet their needs. Basically it allows running an actual arm linux distro in a pseudo container created by (ab)using the ptrace syscall to emulate root privileges. This has a fairly big performance impact, but it works if you want to run arbitrary arm linux binaries.

[1] https://github.com/termux/proot-distro

Re: Termux is an Android terminal emulator and Linux environment app

#80

I’ve put this on a 20$ android phone that I got on eBay and was so impressed it made me consider switching from iOS to android.

That's the neat part about this. Need a Linuxy ARM SBC to run python, or a tiny web server, or home automation hub or something like that but Raspberry PIs are unavailable or overpriced in your area and alternative products are too sketchy and unsupported? No problemo. Just get an old Android flagship off the second hand market that can be had dirt cheap, flash some FOSS de-Googled ROM on it, and use that instead. Yo…

For extra tricks (and challenges), buy an Android phone that can run postmarketOS, which is basically Alpine Linux. This comes with more up to date kernels (something older phones often lack) and can run things like Docker without too much trouble.

Most phones aren't fully supported but there are a bunch of phones with decent support and modern enough SoCs that can be had for cheap.

PmOS devices don't run Android so the Android HAL that custom ROMs often rely on isn't in use, which can lead to broken hardware support. On the other hand, many of these devices run a recent version of Linux so you can play around with all kinds of modern features.

https://wiki.postmarketos.org/wiki/Devices

Post reply on HN