Comment by rahen
You absolutely can write something in C, Rust, Go, or whatever on Lineage. Just install Termux and the relevant packages (e.g., pkg install rust, etc.).
AOSP is still vanilla Linux under the hood, just with a touch interface on top. Plus, ART is open-source and works great for GUI apps.
Right, but that is still severely limited in my experience.
Like I can't bind these programs to run on keyboard shortcut (or I guess the mobile equivalent would be a button on the home/lock screen?)
I can't do basic UI-- even if I don't write a QT/GTK app sometimes I want to pipe to imv, mpv, present a list of options via dmenu/rofi, send a notification to dunst/mako via notify-send, copy strings to the system clipboard, write a script that calls wtype to emulate keystrokes, etc.
I don't have access to the whole filesystem too, right? Last time I tried writing a script in termux I couldn't access the photos my phone took.
One concrete example: I use music player daemon to play music throughout my home. On the phone the answer is to download an app that implements the protocol, but the app isn't great. Instead, I wish I could bind dmenu to open up when I press volume up for example that just shells out to mpc. These are the types of things that I like to set up on my desktop to get a really ergonomic experience tailored to my workflow, but on mobile I'm at the mercy of what apks are available.
I also haven't found any great solution for setting up a phone declaratively. On desktop I can use NixOS to codify my configuration, on mobile, flashing a new OS means pecking around settings/fdroid like a point and click adventure game for an hour to get everything to a somewhat usable state.
Perhaps this is all just user error and everyone else has figured out how to do these things, or they just suck it up and build their own android apps. But for me, this is really what I'm asking for when I say I want Linux on mobile.
> Plus, ART is open-source and works great for GUI apps.
This requires writing the app in java and building it in android studio, right? Is there an easy way to just compile an apk from a non-android project?
Also if I invest a lot of time in learning ART and building apps for android, I will have a much worse experience running these apps on desktop linux (for example under waydroid) which is where I spend a vast majority of my time.