
Installing and Running a GNU/Linux Environment on Any Android Device - edtechdev
https://www.xda-developers.com/guide-installing-and-running-a-gnulinux-environment-on-any-android-device/
======
crims0n
_Some applications will refuse to run or will crash, usually due to the fact
that some resources that are usually exposed on GNU /Linux systems are kept
hidden by Android._

If your device is rooted, and you use chroot instead of proot, are any of
those limitations lifted?

~~~
lutusp
> If your device is rooted, and you use chroot instead of proot, are any of
> those limitations lifted?

On a rooted Android device, beyond chroot you have to take additional steps --
remount the filesystem read/write, then begin replacing system binaries with
ones that behave differently than the defaults. So it can be done, but it's
more like a game of whack-a-mole than normal system reconfiguration.

------
CaptSpify
To me this is just sidestepping the real issue: I want an actual Linux phone,
not android. I want a phone that runs debian/ubuntu/rh/whatever. I know Ubuntu
makes a phone, but their website says they are currently all sold out. I also
think that they just recently started selling to the US.

~~~
shmerl
There isn't anything decent out of the box, especially if you want to have a
working LTE. You have two options. First, use Android kernel + blobs +
libhybris, and on top of that install normal mobile glibc Linux distro.

Second option is the same thing, but using upstream kernel and open drivers.
If you can succeed in that, it's the best.

Some pointers:

* [https://plasma-mobile.org](https://plasma-mobile.org)

* [https://talk.maemo.org/showthread.php?t=96932](https://talk.maemo.org/showthread.php?t=96932)

* [https://wiki.merproject.org/wiki/Adaptations/libhybris](https://wiki.merproject.org/wiki/Adaptations/libhybris)

Handsets are harder because of more specialized hardware. Tablets should be
easier. I red, that Nexus 7 2013 (flo) should be almost ready to work with
upstream kernel out of the box.

The impression I get is, that Nexus 5 / Neuxs 7 are closest to becoming usable
that way.

------
shmerl
This keeps all Android underneath though. A real way to do it, is to have
hardware drivers, but mobile situation is so messed up, that they simply
aren't available most of the time.

I saw some article a while ago, that Nexus 5 got better support upstream now.
With Freedreno for graphics it sounds interesting. And it looks like brcmfmac
should work for WiFi. Does anyone know if there are drivers that can replace
other blobs there?

Here is a list that I found:
[https://developers.google.com/android/drivers#hammerhead](https://developers.google.com/android/drivers#hammerhead)

~~~
hd4
Came here to say the same thing, the driver situation is something Google
really let slide for too long instead of making life tough for vendors who
didn't want to release the source, and yes I know that would have made it
tough to get decent hardware on android devices, but you need to start
somewhere.

~~~
shmerl
Did you ever try running upstream kernel on Nexus 5? I have one to experiment,
but not sure if it's even feasible at present. I'd try it, if there was a
chance of success.

~~~
hd4
I have a Nexus 6 at present, I assumed that it was too hard/impossible to
somehow get it working with an upstream kernel otherwise someone would already
have done it, never owned a 5 though.

------
lutusp
Personally, I think "Installing and Running a GNU/Linux Environment on Any
Android Device" is a bit misleading. The GNU/Linux environment is just an
application running alongside Android. There are a number of similar apps
available for Android, most of them rely on chroot to accomplish what they do.

I wrote SSHelper, which does something similar (without using chroot) -- it
provides Busybox and a command-line environment, but it's just an application,
it doesn't replace Android. Using chroot creates a more complete environment,
but all these solutions rely on Android being present in the background.

------
hsivonen
Is there a way to use a desktop computer as the tty for the Debian instance
and to run the scheduler on the Android device in active mode without keeping
poking at the touchscreen?

I recently installed Ubuntu Touch hoping that I could turn my Nexus 5 into an
ARM dev board, but power-save scheduling when usin the device via ssh made it
useless for my use case: [http://askubuntu.com/questions/875625/how-to-make-
ubuntu-tou...](http://askubuntu.com/questions/875625/how-to-make-ubuntu-touch-
run-at-normal-speed-with-screen-turned-off)

~~~
mschuster91
> and to run the scheduler on the Android device in active mode without
> keeping poking at the touchscreen?

Enable Developer Mode, there is a checkbox that allows you to keep the display
powered as long as there is USB power.

------
kwhitefoot
Looks interesting but it wouldn't install on my Lenovo A7600F 10" tablet. I
even went through the Google trouble shooting guide which involved trying to
install at least another six times.

Error -24 every time.

Any ideas?

------
aceperry
Cool hack. Although there are already some nice terminals and IDEs on the Play
store for Android. I wouldn't want to run Eclipse on my phone even though I
like it a lot.

------
mschuster91
Does anyone know a good PC-style keyboard for tablets?

Especially one that can send stuff like Ctrl+C to terminal emulators or to
XSDL?

~~~
hasperdi
Are you looking for software (on-screen) keyboard or hardware keyboard?

Hacker's keyboard* is the go to keyboard if you are looking for a soft
keyboard and want to work with terminals & SSH clients.

* [https://play.google.com/store/apps/details?id=org.pocketwork...](https://play.google.com/store/apps/details?id=org.pocketworkstation.pckeyboard&hl=en_GB)

~~~
mschuster91
On-screen. Very cool, thanks for the hint - the problem is that I don't want
that keyboard for all the other apps. Can I pin a specific keyboard to a
specific app (i.e. Hacker's keyboard to sshdroid + XSDL, and Google Keyboard
to the rest)?

~~~
ivankolev
Nope, there can be only one active IME at a time:
[https://developer.android.com/guide/topics/text/creating-
inp...](https://developer.android.com/guide/topics/text/creating-input-
method.html)

