EmacsOnAndroid

This is about installing Emacs into an Android device. See GoogleAndroid for tips about using Emacs to develop Android applications.

Ways to run Emacs on Android devices

Native port (installable Android application)

A native Emacs on Android, without requiring root or special setup, can be installed in the Termux terminal emulator application by executing:

apt update && apt install emacs

Run Linux inside a jail

GNU/Linux in a chroot jail (requires root)

For a Linux and Emacs environment in a chrooted loopback filesystem on a rooted tablet, see Running Emacs on an Android tablet. Android apps such as ConnectBot shell client and Hacker’s Keyboard (including Ctrl, etc. keys) can be used with Emacs in this way.

GNU/Linux in a ptrace-based container (does not require root)

Besides running Emacs inside a true chroot, it’s also possible to get a running Emacs from a ready GNU/Linux distro package in an unrooted Android – as a faster solution compared to the native app option, which would require some work on adapting and recompiling Emacs against the Android environment.

This is possible with the GNURoot app. It allows to use a GNU/Linux distribution like Debian in an unrooted Android.

The GNURoot app does all this by means of a PTRACE container implemented by proot: interception of syscalls and “emulating” what should be done in the different Android and unprivileged environment (redirecting paths, faking the root user privileges, etc.).

It’s a pity that the source code for GNURoot seems not to be well documented, so it’s not easy to start hacking with it right away or at least learn how all the things have been compiled and put together from source.

Don't run Emacs, use a SSH client to connect to a server which runs Emacs

This is by far the easiest and fastest way. It does not require uninstalling Android, and Emacs will run at normal speed. You could also use VNC if you need graphics.


CategoryPorts