Running elixir on my Android tablet

As the Mrs. does not allow me to take the laptop on vacation, but we do take the tablet with us, I decided to find out whether Elixir runs on an Android tablet.

I experimented for about an hour or so, and apparently it is quite easy. Here is my proof:

How do you do this

With a lot of unicorns and fairydust… No, actually it is quite simple….

Please note that all these steps should be performed on the tablet

  1. Make sure your tablet is allowed to install non-verified packages/apk’s (Under settings/security, allow unknown sources - I am not sure about the naming, as my tablet is in Dutch.)
  2. Install ScriptingLayer4Android/SL4A by downloading it from here. I used release 6.
  3. Install Erlang4Android R16B - download here.
  4. Download the Elixir precompiled package and unzip it on your device. I used v0.9.3 and unzipped into /mnt/sdcard/elixir
  5. Fire up Erlang4Android, install Erlang, and click on the 3 squares on the top right, choose settings. Enter -pa /mnt/sdcard/elixir/lib/elixir/ebin as a parameter, so your erlang scripting environment will auto-load the elixir lib.
  6. Close Erlang4Android, open up SL4A, and click the menu on the bottom, view, and then choose interpreters
  7. Click on the Erlang interpreter, it should fire up an erlang interactive console.
  8. Type the following code:
elixir:eval("IO.puts 'blah'",[]).

and press return.

For non-erlangers: to quit, type q(). and press return.


While this works, it is by no means workable; I tried using elixir:start_cli(). but that does not work as it closes down the Erlang shell and ‘SL4A’ assumes it can close the scripting environment. It might be easy to setup a quick REPL script, but the proper way to do this, would be building a script package.

comments powered by Disqus