by teekert · 1y ago · 0 comments
That does not rule out having your phone as your primary development device of course. I was already pleasantly surprised that when I tried to charge my iPad with the USB-C dangling of my ultrawide, the screen came to life! Sadly with the iPad's own screen ratio. My screen-attached wireless keyboard and mouse did work though!
I still dream of having normal Linux (or GrapheneOS, or PostMarketOS) on something like a Fairphone and being able to plug it in USB-C and just work (I just need a terminal, perhaps an editor, and a browser of course). Ubuntu Phone came so close :'( Maybe it becomes workable on the FairPhone 6... (actually, it seems like it is working? Can it do the desktop thing? It does say "Wired External monitor :check:")
Or you know, at least a Padfone [0] (just kidding, I'm just always looking for an excuse to share this masterpiece of a video).
Google Pixel is supposed to ship a more complete desktop in Android 16 QPR1. Also has a Linux VM.
Of course, Samsung has had a pretty complete desktop on phones that support DeX for a while now.
I'm actually really excited for this and am watching it closely, although I believe right now it's limited to Debian? It might be the thing that finally tempts me out of iOS & the whole Apple ecosystem.
I want the one device dream, but I want to be able to run my own OS on it, even if it's in a VM for desktop mode, so I can bring my arch+hyprland setup with me. It can run Android in "phone" mode that's fine, then when I hook it up to my dock or a kb+mouse it'll launch arch.
I won't go all in on it though until it looks like Google is committed for the long haul. I don't want to switch "ecosystems" and rely on it only for them to kill it by Android 18 or whatever.
edit: You're right, an unfortunate downgrade https://forum.fairphone.com/t/fp6-discussion-about-usb-2-and...
I was pleasantly surprised with my Son relatively budget Samsung phones, when I plugged it into an external monitor. Instead of showing a the phone screen on the monitor (like an iPhone would), it loaded up a different desktop that looked more like Ubuntu than it did like Android.
I can’t remember the specifics but it was definitely designed to be used with a keyboard and mouse.
You can run the browser without any issues, use ssh with JuiceSSH and have the terminal. Running vim on there might be an option but another editor that is not a TUI might be more troublesome.
I will keep dreaming and in the mean time keep my Linux Laptop close.
I think the best we can hope for is something that allows us to run a sandboxed vanilla Linux container. Which I think is already possible on Android?
In principle however, it worked.
Termux is as great terminal, AFAIK it can be run on any modern (not even that modern) Android. With that alone you can get most common Linux terminal packages, run vim (including LSPs), tmux, ranger, compile C/C++, Python, Go, Rust...
Termux-X11 lets you run X11/GUI apps. It has settings to properly capture mouse (trackball in my case) and keyboard, preventing annoyances by disabling Android default keys (eg allowing Alt-tab to switch tabs in your Linux desktop rather than switching between Android tasks).
Termux proot-distro lets you install loads of Linux distros. I've daily driven Ubuntu in the past, currently using Debian Bookworm on my Tab S8 Ultra, which although a flagship is a couple of generations old now. I run the same setup on a Tab S4, which is a 7 year old device now. It's slow for some GUI stuff but works well for a lot of things, most stuff in the terminal is great.
The above is without root. With root, I've recently changed over to chroot as I wanted to try it.
You can get GPU acceleration, I'm currently using turnip, there are also virgl drivers, it can take some trial and error depending on which GPU your device has (I don't know much about GPU stuff so if any of those sentences had errors that's why, but it's perfectly googlable).
As I just rebuilt my system a few days ago, here's what I've done since then:
- Installed Debian Bookworm
- Installed Chromium and Firefox, both with GPU acceleration via a custom command eg: `Exec=env MESA_LOADER_DRIVER_OVERRIDE=zink /usr/bin/chromium %U` in a .desktop file
- Compiled yazi (Rust terminal file manager) with rustup and `cargo install`ed another couple of apps
- Been working on a Hugo site, after installing go and dart-sass
- Compiled dwm with standard gcc stuff (dwm is my preferred environment but XFCE etc are around too)
- Worked on some PSDs in Photopea (Krita, Gimp, Inkscape also all work perfectly)
- Installed my preferred vim setup with nvim-coc, so all the LSPs etc
Node works perfectly. Python works perfectly. As above, C/C++, go all work perfectly (ARM64/AARCH64 of course).What I'm trying to say is, it's strange for me to see so many in this thread wondering about if it's possible to do Linux stuff on Android. I thought Termux was pretty well known (?). I think the first time I installed a full Linux distro on Android was about 10 years ago via LinuxDeploy. I've been daily driving a setup similar to the above for maybe 5 years, on 3 or 4 different devices. I get that this is geeky and a bit niche but I'm surprised to see so many comments on HN without this stuff being mentioned.
I have a Macbook which I use begrudgingly when I have to (Apple lock-in reasons such as needing to compile Flutter stuff for iOS/Mac on Apple hardware --- btw Flutter works well on my Android Debian compiled for ARM64 Linux, meaning I can do most Flutter dev work here and just move over to the other hardware when I want to compile/test other architectures). I have an AMD ProxMox machine for when I need a bit more grunt or have something that requires Windows. Despite these other machines, if I can do it on the Android tablet I always prefer it (love the OLED display and low power usage), meaning 70-80% (guessing) of my work gets done there.
Docker can't/won't work, something to do with proot/chroot and cgroups I think. In my limited experience (Flutter), cross-compiling to different architectures hasn't worked. The OOM killer in Android can be annoying so you want a device with plenty of RAM, but there are ways to mitigate it, and in practice it doesn't bother me (rare and relatively inconsequential in my usage patterns) otherwise I wouldn't work this way.
I get that people in here today are mainly talking about phones, and I'm using tablets. But this all works on phones (I used to do it on my Note 3 up until I lost it a few months ago, that's over 10 years old). You just need a device which outputs video over USB-C, not uncommon nowadays.
I have had to faff a bit to get stuff working. Some people will hate this and just want instant. Horses for courses, I'm happy.
I haven't tried the new Linux stuff on Android 15 as I don't have a Pixel. I get the feeling it won't have much if anything to offer over my current setup and might be slower. But hopefully it will become standard in future. I don't like Dex on Samsung as it forces its own UI sensibilities on you (eg last time I tried it windows had huge ugly titlebars, which I personally don't like, hence dwm preference).
I've probably spilled most of the beans in this novel of a comment, but have written about this stuff before, here https://mm-dev.rocks/posts/android-as-a-dev-environment/intr...