
Run full Linux distros or specific applications on top of Android - flokii
https://github.com/CypherpunkArmory/UserLAnd
======
bibyte
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](https://wiki.termux.com/wiki/Main_Page)
Termux repo: [https://github.com/termux/termux-
app](https://github.com/termux/termux-app) Subreddit:
[https://www.reddit.com/r/termux/](https://www.reddit.com/r/termux/)

~~~
bloopernova
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!

~~~
crowbahr
I use an original Google pixel and a cheap $20 keyboard and have done some
basic scripting etc on it.

Main problem is tmux doesn't work well on it. Otherwise vim is pretty great,
for example. It's actually even pretty usable without the Bluetooth keyboard
thanks to the volume keys being a fn layer and ctrl

~~~
fxj
emacs works pretty well. even the touch scroll gestures are translated into
scolling in emacs. and changing the buffer by touch also works. so you can use
emacs eshell and a keyboard and it is perfect.

~~~
_emacsomancer_
Emacs does work pretty well in Termux, but on Ubuntu Touch you can run full
X11/GTK Emacs, which is nice. (I suppose you could do the same thing via
Termux with an X11 session.)

------
angelsl
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
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.

~~~
sgc
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.

~~~
imtringued
Unfortunately the RAM battle has already been lost thanks to electron, etc. A
laptop with less than 16GB for development just doesn't make any sense.

------
tambourine_man
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](https://github.com/louisdh/openterm)

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

~~~
tokyodude
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.

~~~
0x38B
As far as the rules, quoting Federico Viticci[1]:

"For a long time, Apple's App Store review guidelines prohibited apps from
downloading executable code from the Internet. The company's original stance
resulted in IDEs that couldn't sync scripts and programs across multiple
devices – a serious limitation for the emergent movement of programmers
embracing the iPad Pro as a portable workstation.

Fortunately, Apple started relaxing their rules earlier this year, allowing
"apps designed to teach, develop, or test executable code" to download and run
code."

As an example of what's possible, in Pythonista 3[2] on my iPad Pro I
installed StaSH[3] (bash-like shell implementation), youtube-dl using pip, and
then wrote a simple script[4] to let me save YouTube videos with a long-press
on a link -> Share -> Run Pythonista 3 Script...

1: [https://www.macstories.net/linked/pythonista-3-2-syncs-
scrip...](https://www.macstories.net/linked/pythonista-3-2-syncs-scripts-with-
icloud-supports-open-in-place-via-ios-11s-files-app/)

2: [https://omz-software.com/pythonista/](https://omz-
software.com/pythonista/)

3: [https://github.com/ywangd/stash](https://github.com/ywangd/stash)

4:
[https://gist.github.com/solarfl4re/0a3647788f8ec2f375f2da3db...](https://gist.github.com/solarfl4re/0a3647788f8ec2f375f2da3db55fb0fe)

~~~
tambourine_man
Amazing, I may steal the idea.

------
bump-ladel
Related: under development for iOS, iSH - a usermode Alpine Linux
[https://github.com/tbodt/ish](https://github.com/tbodt/ish)

~~~
tyingq
Wow...that's a pretty crazy approach. Userland x86 emulation on an arm device,
and a ton of ASM code and a sort of JIT. Guess options are limited in a walled
garden.

Edit: Found an HN discussion about it:
[https://news.ycombinator.com/item?id=18421016](https://news.ycombinator.com/item?id=18421016)

~~~
saagarjha
The assembly and pseudo-JIT are there for performance, IIRC. iSH should work
fine without them.

~~~
tyingq
Yes, not being critical at all. Just amazed at the dancing bear :)

------
seba_dos1
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
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.

------
fxfan
Somewhat related: Run arch on any distro:
[https://github.com/fsquillace/junest](https://github.com/fsquillace/junest)

------
edoo
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.

~~~
Ultramanoid
Get a GPD Pocket 2 : [https://liliputing.com/2018/07/gpd-
pocket-2-preview.html](https://liliputing.com/2018/07/gpd-
pocket-2-preview.html)

~~~
Legogris
Neat! I would pick one up right now if it weren't for the keyboard layout. I
would shoot myself with the up arrow between comma and dot. Would have loved
to see a 60% option, which is de-facto standard for semi-minimal mechanical
keyboards. I feel there's a certain overlap between users of 60% keyboards and
the target audience for this device.

~~~
splintercell
You're exaggerating the impact of that layout decision. I use many keyboards
(including ortholinear) and this is never really a problem.

You can always remap the dot key to be only be triggered when pressed with
super or fn key (and that can also work with shift).

------
robolange
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
Did you submit an issue, or do you expect developers to be able to read your
mind?

~~~
robolange
Fair enough. I had a few minutes of spare cycles and I tried it out. It failed
on the first thing I tried (installing Typescript), so I dropped it and didn't
look back.

------
mehrdadn
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
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.

~~~
mehrdadn
Oh I see, thanks. Do you know if there's any way to get it on other systems
that don't come with it? I was so looking forward to getting Windows on my
phone someday...

------
usr1106
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
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

~~~
ausjke
just played with termux, looks neat, basically it is a local linux running on
your cellphone.

if I can miracast the screen to a tv or pc monitor(if the phone provides a
hdmi-out), along with a bluetooth keyboard, then I have a portable little
computer that I can use anywhere?? that is fantastic.

~~~
ausjke
talking about miracast, we now need a chromecast or firetv dongle to relay
that, hope the TV and monitors will support all kinds of casting one day.

for now, can termux add chromecast?

~~~
burk96
You can mirror your screen to your Chromecast through the Google Home app

~~~
komali2
At your phone's resolution, which is a mild bummer (an not, as far as I'm
aware, things like chromecasting youtube work)

------
darkmuck
For Samsung users there's Linux on Dex

~~~
isodude
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
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
This is easier to use than Termux or any of the others. Looks nice.

------
slezyr
VNC into chrooted linux.

~~~
untog
...which requires a remote Linux machine to VNC into.

------
aasasd
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.

~~~
gruesome
Seems pretty good. Android runs on the Linux kernel, but is missing the
GNU/Linux userland. This app gives you that.

