Self running on x86 Android Tablet

Chris Double chris.double at
Wed Sep 11 03:28:03 UTC 2013

Now that x86 Android tablets and phones are available I thought it'd be
interesting to try and get a version of Self running on one. I succeeded
in getting a Self binary running on the device. The REPL works but
there's no GUI as there's no currently available backend.

A screen shot of it running on a Samsung Galaxy Tab 3 10.1 is here:


The binary I used is:


To run it on a device, uncompress it and push it to it:

  $ bunzip2 i686-android-linux-Self.bz2
  $ mv i686-android-linux-Self Self
  $ adb push Self /data/local/tmp
  $ adb shell
  device$ cd /data/local/tmp
  device$ chmod 0755 Self
  device$ ./Self

To build an image on the device, push the 'objects' directory there:

  $ adb push objects /data/local/tmp
  $ adb shell
  device$ cd /data/local/tmp
  device$ ./Self
  device# 'worldBuilder.self' _RunScript

You can run directly on the device by installing 'Terminal Emulator' or
a similar program instead of 'adb shell' from a connected PC.

To build this I made some hacks to the source to workaround Android
differences. The patch is here:


It applies on top of my Tup tree at:


Build a standalone Android NDK for x86 with:

  $ cd $NDK_HOME
  $ ./build/tools/ --arch=x86 \

Add it to your patch and run 'tup upd' in the Self source directory with
that patch applied:

  $ cd $SELF_DIR
  $ export PATH=/somewhere/stk/bin:$PATH
  $ tup init  # <-- only needs to be run once
  $ tup upd

The resulting 'Self' binary is the Android binary and will run on x86 devices.


More information about the Self-interest mailing list