Developing on Android

A few days ago I got an Asus Transformer – an Android table with a full physical keyboard. Since then I have been trying to figure out the best way to write code on this device. While porting Eclipse to Android would be cool, it would also be near impossibly complex. It would also be excessive. What I am aiming for here is a fairly simple toolchain and workflow.

To start with, I would like to be able to:
– Check code out of Git
– Make some changes (preferably with syntax highlighting)
– Commit and push changes back to remote Git repository

And there are a number of ways this could be done…

1) Write pure-Java Android app. There are good Java libraries for most tasks, including a pure-Java Git client. This would still be quite a tough job though as there would be a lot of UI work to do.

2) Native binaries. It is in theory possible to cross-compile all the needed tools, including a shell, git client, vi, etc. The main downside here is how they interact with non-rooted devices. Native binaries must be packaged up inside a .apk like any other app and can only be run by their owning application. For example ConnectBot could not use a local-term to run a git binary from another .apk. A custom ConnectBot build containing the extra binaries would need to be built. Also I have yet to find an example of compiling git for Android. :(

3) Use a VM. Android devices like this have more than enough power to run small VMs. And recently a VM was written in JavaScript that could run shell, vi and emacs well. A small Linux VM that hosts an SSH server on a local port and using ConnectBot as its UI would provide a fairly familiar development environment. I have been pondering if I could use the JavaScript VM as a base and wrap it in a Android-Java application and fill in the extra features needed, but I fear this is somewhat beyond my skills at the moment.

4) Native binaries with bridging app. Take the native binaries from 2) and write a small SSH server app like in 4) that proves ConnectBot access to them on a local connection. Fairly minimal work once the native binaries are ready. I hope.

I keep wondering of anyone else has thought about this yet or better yet got a working solution, but I guess hardware like this are still fairly rare no not many have the inspiration to do the work. I am sure it will come at some point, I am just impatient. :)

One Response to “Developing on Android”

  1. Have you considered using something like http://compilr.com/?

Leave a Reply