16

I'm brand new to Android; in fact I've never owned one.

But I'm traveling all this summer, and I'm very interested in doing some programming while I'm on the run.

QUESTION: Is it possible to run a full Ruby development environment with Emacs on Android? How?

And does "rooting" give you anything close to a real Linux system?

3

4 Answers 4

10

"Rooting" allows you access to the internal Android environment, which of course consists of more than just the Linux kernel. So you are running Linux, but you should consider it as though you are running under a different distribution than say Debian or Redhat.

There's a different set of standard libraries and some files are in different locations. At least on my Droid ext2 support is not built-in by default. There is also no init or cron. The full set of Linux modules is not available unless you compile them yourself and put then in /system/lib/modules. Important ones you may miss on standard ROMs are cifs, ext2, tun, and others.

Most, if not all, phones running Android are ARM CPUs. So the binaries you run on them must be ARM "EABI" "soft-float" binaries. If you have the source you can cross-compile whatever utilities you need, but read on.

There are many standard commands and utilities available in the /system/bin directory such as grep, ps, cp, rm, mv, ls, ip, even vi. You have enough to get by until you...

...use the "Linux Installer" utility to install a chroot'ed Debian environment. Debian has supported ARM for a while. It takes some work, but if you can root your phone, and have a sizeable enough SD card, this is the way to go.

This is close to a standard Linux system and under it you can install and run Ruby. Of course CPU and RAM limitations come into play.

5

Ruby has not been ported to Android, though you might want to check out Ruboto. For simple editing there are a few options, but I don't believe emacs has been ported either, there are no Market results anyways.

Rooting might provide you the ability to run Linux on your phone, but Android is not Linux. Its kernel is largely based on the Linux kernel but that's about it. You cannot run any Linux application with a GUI on Android, it would need to be rewritten. I'm not sure to what extent native command line apps would need to be rewriten, though of course they would need to be recompiled.

Android also does not have a full Java VM.

4

You can install a working debian distro on your phone without upsetting the distribution on the phone already. This way you'll have a full userland with stuff you're used to on any other Linux box. You should ssh into your phone to use this comfortably.

Install this: https://play.google.com/store/apps/details?id=org.dyndns.sven_ola.debian_kit

3

At the present date, Emacs port for Android already exists:

  • android-emacs-toolkit released Jun 23, 2012:

    Android-emacs-toolkit helps to build android development environment on emacs. It contains a emacs major mode which help to develop android sdk and ndk program.

  • GNU Emacs ported to Android available from Google Play Store, last updated August 23, 2012:

    GNU Emacs ported to Android!

    Runs on modified version of Terminal Emulator - requires hardware keyboard and a rather big display.

    Includes Busybox and eshell. SSH (for TRAMP) and git are planned.


Additionally, you may find useful the information provided by EmacsWiki - EmacsOnAndroid, that essentially is a guide about installing Emacs into an Android device.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .