top | item 19345739

Run full Linux distros or specific applications on top of Android

244 points| flokii | 7 years ago |github.com | reply

103 comments

order
[+] bibyte|7 years ago|reply
Another related app is Termux. It can't run full Linux distro but it is much more lightweight and it has a pretty active community at /r/termux.

Termux wiki: https://wiki.termux.com/wiki/Main_Page Termux repo: https://github.com/termux/termux-app Subreddit: https://www.reddit.com/r/termux/

[+] elagost|7 years ago|reply
It works surprisingly well, and you can even share storage with the local Android system through termux-setup-storage.

I've been using this for years and it's the primary reason I really enjoy Android. Another comment mentioned iSH for iPhone, but the comparison between iSH and Termux is no contest - Termux on my 6-year-old Motorola Photon Q runs much better than iSH on my 6S. Plus the Photon has a full keyboard!

edit: Not only that, I attempted to run UserLAnd before, and it does not do well on my old phones with slow, small storage. UserLAnd is fun for playing around, but Termux is, for me, where the real action happens. It's my most-used Android app.

[+] snthd|7 years ago|reply
I love termux.

The virtual keyboard integration is neat:

* Volume keys do ctrl and alt

* You can type into an intermediate text area to use the usual glide typing and spell checking.

Stuff that caught me out:

The root apps repository needs to be manually enabled. `pkg install root-repo`

Swiping from the left edge lets you manage multiple sessions.

My only problem is not being able to fully use an external SD card.

[+] neals|7 years ago|reply
I love Termux, it has gotten me out of a tight situation more than once. I lets me ssh into my machines while in the pub or someplace where I'm not bringing my laptop.
[+] bloopernova|7 years ago|reply
I have Termux installed but haven't really explored it much yet.

Q: Does anyone use a somewhat recent smartphone, Termux, and a bluetooth keyboard? How well does it work for ad-hoc systems administration over SSH, or command-line tasks like text processing using awk/sed/vim? My beloved LG V20 phone is still pretty much perfect for me and I don't want to give it up any time soon!

[+] noisy_boy|7 years ago|reply
Just installed it and it looks quite polished in terms of UI - the wiki is great too and I was able to setup two way ssh between my phone (Nexus 6P) and pc (Ubuntu 18.10) with access to all my files/photos etc. I was able to scp from my PC to phone which is awesome for one-off needs (I use syncthing for more general syncing).
[+] teddyc|7 years ago|reply
I love Termux too. I used it on my Chromebook while I waited for Crostini to land for my hardware.

It's on my phone though I don't really do much besides to play around. It's pretty awesome if you have a bluetooth keyboard.

[+] ams6110|7 years ago|reply
Termux is also great on Chromebooks. I use it a lot, it reminds me of Cygwin, i.e. not really Linux but 90% of what most Linux users would use routinely.
[+] bencollier49|7 years ago|reply
Just installed it and it's great - thanks for the heads-up.
[+] angelsl|7 years ago|reply
This runs on proot, which basically ptraces all processes under it and intercepts any syscalls that need privileges or deal with paths, and emulates them.

It works pretty well until you start to run many processes, and then proot starts to be a bottleneck. It's not multithreaded, so every syscall ends up going through a single loop. Any multithreaded code that makes a lot of syscalls will be reduced to being effectively singlethreaded.

[+] tyingq|7 years ago|reply
I wonder how far we are from a real usable phone that docks into being a real usable PC. I suppose that's more of a hardware than software program. I'm aware of Samsung's DEX and similar, but I would guess the performance isn't great given the limited memory, etc, on a phone.
[+] csixty4|7 years ago|reply
Android Nougat has an experimental "Freeform Window Mode" that I've been playing with. I can connect my LG V30 to a USB-C dock and have a windowed desktop-style environment with a mechanical keyboard, Bluetooth mouse, monitor, etc. Most of my phone's apps are comfortable running like this. Chrome actually displays the desktop versions of sites.

This Thursday, I signed up for coder.com (featured here on HN) and was able to write some Go code using VS Code in the browser. It was a pretty solid experience.

Performance was fine. I had my email and a podcast player going in the background and, honestly, I could probably do a lot of my day-to-day work with this and an EC2 box for running sites.

But it was glitchy, because Android hasn't really invested in this use case. The Taskbar home screen replacement would close the start menu as soon as it opened 90% of the time. There was a black space at the bottom of the screen which would change height almost randomly. Large windows conflicted with the notification bar and I'd end up opening my notifications when I wanted a new tag in Chrome. Right clicking maps to the back arrow in Chrome for some reason.

But the point is, between modern phone hardware and the cloud, we're not far from a performance perspective. We just have to decide that's where we want to go and commit to it.

[+] reustle|7 years ago|reply
https://maruos.com

You're looking for MaruOS. I've been following development for a while and it had come a long way. While it might not be this project in particular, I feel it's the future of computing.

[+] chx|7 years ago|reply
There are a small number of phones supporting DisplayPort alternate mode so they can be docked to monitors and keyboards. And the performance is not at all bad any more, check https://browser.geekbench.com/android_devices/839 vs https://browser.geekbench.com/processors/2294 or https://browser.geekbench.com/processors/763 Basically, the fastest Android now caught up with Haswell desktop chips which is a pretty impressive feat. While RAM is not plentiful, top phones are now 8GB which is not bad at all. The real problem is more in storage, compare https://www.samsung.com/semiconductor/insights/tech-trends/e... to the SN520 -- I picked the SN520 because it's available in a 2230 physical format so the physical advantage is smaller but of course still existent, anyways: https://www.sandisk.com/content/dam/sandisk-main/en_us/asset... the sequential speed is five times faster, IOPS closer to ten. (I also picked the SN520 because I am using a 2242 version of it now.)
[+] dsr_|7 years ago|reply
Flagships from two years ago had 4GB RAM. New flagships come with 6 to 10GB, and 128GB or more storage. GPUs already handle 1440P and larger displays.

What you need is a standard dock that can break out HDMI, USB ports for input and I/O, and a gigabit NIC. As it turns out, people make those for Macbooks right now.

[+] sgc|7 years ago|reply
s10+ has up to 12 gb of ram. More than plenty of laptops. The videos of dex in action on that are awesome. Foldable phones that give a tablet sized display when on the go will be a piece of the puzzle, because a bunch of peripherals in tow doesn't solve anything.

I think we are there for performance, now it's a question of whether anyone gets the software right enough to make it practical. That includes the possibility of making a restorable image of everything on the phone so you can be up and running in an hour if you lose or break it. I have not used dex, so maybe they are already basically there.

[+] tambourine_man|7 years ago|reply
I never understood why there isn’t something like this for iOS. A package of the top 100 or so most popular precompiled tools wouldn’t be against the App Store rules AFAIK.

Going the emulation root like iSH seems nuts to me.

Running Vim, mutt, ffmpeg, imagemagic, httpd, etc, at full speed would be sweet.

Things like [1] [2] seem either dead or not getting much traction.

[1] https://github.com/louisdh/openterm

[2] https://github.com/ColdGrub1384/LibTerm/blob/master/README.m...

[+] tokyodude|7 years ago|reply
What would you do with it if you can't add more software yourself? (which Apple expressly forbids). Try to customize your vim macros? Nope. Want to change your ~/.bash_profile? Also against the rules.
[+] josteink|7 years ago|reply
> I never understood why there isn’t something like this for iOS.

Android is natively Linux, so launching a chroot isn’t really all that hard.

On iOS things are very different and you’ll need to fake the whole stack. (Also Apple policies blah blah)

[+] seba_dos1|7 years ago|reply
Way more interested in the other way around. Having to carry a second phone just for things like instant payments or city bikes app sucks.
[+] fxfan|7 years ago|reply
I would love it too- I would like to carry an old bb with just contacts and emails synced. I'm not an App guy.
[+] edoo|7 years ago|reply
I want a "phone" with data only that runs Linux and has docking support. The average techie could piece one together now with a pi, screen, and 4g module. It can't be that hard to build one in a phone form factor. It is all open source so you could whip up correctly shaped boards in weeks. The hardest part to me is the enclosure/case to screen finish.
[+] robolange|7 years ago|reply
Last time I used UserLand I couldn't install something major (maybe typescript from npm, it's been a while) because there was some file path limit (maybe 143 bytes, again, it's been a while) that a bunch of the package's files violated. Has this been addressed with new versions?
[+] craftyguy|7 years ago|reply
Did you submit an issue, or do you expect developers to be able to read your mind?
[+] mehrdadn|7 years ago|reply
A bit of a tangent, but does anyone know what happened to Microsoft's x86-on-ARM emulator? I thought it was going to be the next big thing for mobile but there seems to be little trace of it?
[+] mrpippy|7 years ago|reply
It’s shipping with all Windows-on-ARM laptops, and probably used pretty heavily on those machines. It’s the only way to run Chrome and pretty much all Win32 apps.
[+] usr1106|7 years ago|reply
I don't have an Android phone and I don't miss one. In rare cases I might want to do the opposite what the author does: Run an Android app on my computer (Linux). Sounds weird that that is still not standard. I know there has been more than one attempt to implement it. But AFAIK none of them really successful. Would be glad to get corrected.
[+] ausjke|7 years ago|reply
Have not used termux, just installed and don't understand what is is. It just goes into a linux env directly without login that is running 3.18 kernel and I can install some packages on top of that, what is it?

mainly used juicessh in the past, use connectbot occasionally, both are excellent, but I'm confused what I can use with Termux

[+] a-saleh|7 years ago|reply
If I understand correctly, termux is a terminal emulator first, with some additional packages installed.

Android is running linux kernel, so in theory, if you have like sh executable compiled for android you would be able to run it inside of a terminal emulator on android.

The additional packages are compiled with android ndk. There is a repository used to build and configure the basic set of packages [1].

[1] https://github.com/termux/termux-packages/tree/master/packag...

[+] darkmuck|7 years ago|reply
For Samsung users there's Linux on Dex
[+] isodude|7 years ago|reply
Notice that only S9 had DeX over USB-C earlier, not using a DeX-hub. This is now gone with the recent upgrade to Android 9 on at least S8. Tested it out as recently as yesterday!
[+] unsignedint|7 years ago|reply
Just tried this and great it runs PowerShell Core and .NET Core where Termux seems to struggle with.

Since I have a handful of PowerShell modules I regularly use, this will be useful.

[+] gruesome|7 years ago|reply
This is easier to use than Termux or any of the others. Looks nice.
[+] slezyr|7 years ago|reply
VNC into chrooted linux.
[+] untog|7 years ago|reply
...which requires a remote Linux machine to VNC into.
[+] aasasd|7 years ago|reply
Awful name.

It's like calling your app “An Executable.” The name means a concept in the same problem domain. ‘A program in userland’ is already a thing.