Unlike the OP though, I barely touched the on screen keyboard for all of this — I just used android voice input, even for the terminal commands and `enter` command.
I literally said "apt install emacs enter" out loud and it just worked! Voice recognition has come a long way.
Sadly (maybe it's my pronunciation), but voice typing isn't that perfect for me. It works alright for regular sentences, but it refuses to understands things that are not plain english (like apt).
Finger IO: http://fingerio.cs.washington.edu
Google's Soli: http://www.youtube.com/watch?v=0QNiZfSsPc0
Perhaps a modified game controller: http://www.amazon.com/iGrip-Ergonomic-Keyboard-by-AlphaGrip/...
There is always evil mode I suppose.
Keyboards vary to the extent that they are emacs friendly (how many Super-Meta-Alt keys do they have?) but I find this Logitech one just about usable for programming:
http://www.amazon.co.uk/Logitech-Device-Bluetooth-Keyboard-S...
(In case it's not clear, the keyboard is huge, as large as a laptop keyboard, so once you start down this road you lose portability).
――――――
With the Java IDE for Android, a remote keyboard and external display would make for a full on computer.