Live data from Hacker News

ESP32 and Termux

blog.gavide.dev

11–20 of 57 posts

Re: ESP32 and Termux

#12
I've been playing with Termux, both on Chromebook (Eve), and my Samsung Galaxy S22 - pretty cool, though hit some issue with recent `bazel` - as newer versions try to access a `/dev` endpoint that's not available.

Quick fix, was to add `~/.bazelrc` this:

    common --experimental_collect_system_network_usage=false
and then it works! Though sometimes I need to first `termux-chroot` and then it it handles cases, where some tooling expects `/usr/bin` and not `/mnt/data/com.termux/files/usr/bin`

On measurements it's a bit 2x, 3x slower than Crostini (Termina) on Chromebook, but being available (so far) on all my Android devices is just awesome!

And there exist X11 too!

I wish there would be backdoor for F-Droid in the future, though maybe not as it seems :(

Re: ESP32 and Termux

#13

very cool. termux has to be peak for unbridled nerddom, the new linux terminal in android 16 is really a pale shadow of it. you don't get access to anything non-virtual, not even the gpu (atleast, i couldn't get it to work.) theres so much cool hardware on modern smartphones, with quite solid drivers by virtue of the (relatively stringent) android quality requirements, and its all locked away. video encoders, decoder…

You don't have to use Android. I've been using various GNU/Linux phones for the last 17 years, so being able to do `gcc -o main main.cpp && ./main` on a phone is just natural to me. Back in 2008, as a teenager, I could choose to spent my first earned money to get me either one of the first GNU/Linux phones on the market or the first Android phone, and I feel that as the time goes it only validates my decision.

Re: ESP32 and Termux

#14

very cool. termux has to be peak for unbridled nerddom, the new linux terminal in android 16 is really a pale shadow of it. you don't get access to anything non-virtual, not even the gpu (atleast, i couldn't get it to work.) theres so much cool hardware on modern smartphones, with quite solid drivers by virtue of the (relatively stringent) android quality requirements, and its all locked away. video encoders, decoder…

It is possible to write native code for Android using Native Development Kit. Typical NDK use would be to develop a library that is then called into by java code. But one can make whole app with it, 100% java-free:

https://github.com/cnlohr/rawdrawandroid

Re: ESP32 and Termux

#15

If you like this stuff, I highly recommend you look at Samsung Galaxy phones. They come with DeX, which is a linux DE that you can use with a dock.

Technically a Linux DE by virtue of being an Android DE, but most definitely NOT a Linux DE for purposes of a discussion involving Termux.

Re: ESP32 and Termux

#16

very cool. termux has to be peak for unbridled nerddom, the new linux terminal in android 16 is really a pale shadow of it. you don't get access to anything non-virtual, not even the gpu (atleast, i couldn't get it to work.) theres so much cool hardware on modern smartphones, with quite solid drivers by virtue of the (relatively stringent) android quality requirements, and its all locked away. video encoders, decoder…

You don't have to use Android. I've been using various GNU/Linux phones for the last 17 years, so being able to do `gcc -o main main.cpp && ./main` on a phone is just natural to me. Back in 2008, as a teenager, I could choose to spent my first earned money to get me either one of the first GNU/Linux phones on the market or the first Android phone, and I feel that as the time goes it only validates my decision.

I've been looking at Linux phones for a while, and now the latest 'sideloading' lockdown from Google has pushed me to seriously consider getting off Android. What phones do you use or recommend for someone who has a little Linux experience?

Re: ESP32 and Termux

#17

very cool. termux has to be peak for unbridled nerddom, the new linux terminal in android 16 is really a pale shadow of it. you don't get access to anything non-virtual, not even the gpu (atleast, i couldn't get it to work.) theres so much cool hardware on modern smartphones, with quite solid drivers by virtue of the (relatively stringent) android quality requirements, and its all locked away. video encoders, decoder…

You don't have to use Android. I've been using various GNU/Linux phones for the last 17 years, so being able to do `gcc -o main main.cpp && ./main` on a phone is just natural to me. Back in 2008, as a teenager, I could choose to spent my first earned money to get me either one of the first GNU/Linux phones on the market or the first Android phone, and I feel that as the time goes it only validates my decision.

What is your feedback in regards to battery? Android have been exhausted in development to optimize battery usage but I'm reading linux phones don't really care that much so you end up with a dead phone in less of a day.

Has a power user, what has your experience been on that topic?

I'd switch my phone to linux on a heartbeat because android apps seem compatible enough nowadays to run there too but battery is always the pressing limitation.

My thanks in advance.

Re: ESP32 and Termux

#18

I'm trying to repurpose my Pixel 6a that I no longer use, as a Home Assistant Core main driver. I was hoping the author will talk a little bit about that. I still haven't had the luck to have a fully working Home Assistant running inside (rooted) Termux. Anyone succeeded to start `hass` and have it running without throwing errors?

If you have root, it is fairly trivial to run full-on arm64 Linux distro in chroot. That should fix most problems with linux software running in android.

There is also Linux Deploy[1] that automates the process of setting up chroot, ssh and even gui desktop (through framebuffer).

[1] https://github.com/meefik/linuxdeploy

Re: ESP32 and Termux

#19

Earlier quoted context omitted.

You don't have to use Android. I've been using various GNU/Linux phones for the last 17 years, so being able to do `gcc -o main main.cpp && ./main` on a phone is just natural to me. Back in 2008, as a teenager, I could choose to spent my first earned money to get me either one of the first GNU/Linux phones on the market or the first Android phone, and I feel that as the time goes it only validates my decision.

What is your feedback in regards to battery? Android have been exhausted in development to optimize battery usage but I'm reading linux phones don't really care that much so you end up with a dead phone in less of a day. Has a power user, what has your experience been on that topic? I'd switch my phone to linux on a heartbeat because android apps seem compatible enough nowadays to run there too but battery is always…

I'm using a Librem 5 and its battery life is good enough for me - it lasts pretty much exactly what's needed for me to get through a typical day, so I often get home with the battery almost but not entirely flat. When I know that I'm going to be using it more intensively or need it to last longer, I'll usually just put a spare battery into my backpack, but I rarely actually need to use it when these days you can just charge up in a train or tram.

That's not a universal property of these devices though - N900 that I used previously could easily last a few days.

Post reply on HN