|Android, Debian, Linux, remote keyboard to G1, ...
||[Dec. 14th, 2008|11:02 pm]
I'm loving Android more and more. I keep finding (and filing) bugs, but they're all fixable, and this is only going to keep getting better.
Today I installed Debian on my G1. I followed those instructions up until the unionfs part, where I opted to use bind mounts instead, letting me have a /android/data and /android/system inside my Debian chroot.
Anyway, I now have openssh, perl, python, sqlite3, emacs, git, svn, gcc, screen, nmap, tcpdump, iftop, etc... all running on my phone in a little 2GB filesystem. (I have a 16GB SD card). Then using ConnectBot, I just keep an ssh connection from the phone to localhost all the time, so Debian is accessible when I'm out and about.
But when I'm at home and want to ssh in, I have a bash alias which forwards a port over USB:
alias droid='$ANDSDK/tools/adb forward tcp:1622 tcp:22 && ssh -p 1622 root@localhost'
... so then my openssh server only needs to listen on localhost.
Now that I can just ssh into my phone to work on stuff, I was getting annoyed having to reply to SMSes by using the little phone keyboard when I was sitting in front of a real keyboard.
So I wrote this:
That's an app which captures my keystrokes in my ssh session (I have it running in a screen window), and then injects them into the Linux input layer, so Android thinks I'm typing them on the keyboard.
Even cooler: I wrote that all ssh'd into my phone, over ssh in Emacs in screen, including git-push'ing it to github.com.
(Don't worry --- I'm not just working on useless stuff. dan_erat and I were hacking on an Android app today which everybody can use....)