Writing code and flash it on Android devices (Nexus 7) or Linux

Incidentally, the "ideal" way to use the makefile, rather than modify it, would be to include it. So, for example, your Makefile might look something like this:

SHELL:=/system/bin/sh
ARDUINODIR:=/sdcard/arduino
AVRTOOLSPATH:=/sdcard/arduino/avr/bin
SERIALDEV:=/dev/ttyUSB0
include arduino.mk

that way, arduino.mk wouldn't have to be modified at all (which would have benefits: it could be updated, and you would know that problems with it weren't due to modifications). But this relies on arduino.mk working on Android.

Currently the only issue that prevents arduino.mk work on Android "out of the box", that I know if, is that we don't have a way of detecting if rm accepts the -f parameter or not. I could try to add a detection for this, but would you be willing to test it on Android for me? I have an Android device, but it accepts rm -f!