Android for command-line users

Let's admit it: I'm command line user. So, Android as mobile platform with all it's GUI doesn't seem like something I would be positive about. But, as we will see, there are quite a few hints which I managed to collect in my first two weeks of Android usage (on HTC Dream/G1 in case you are wondering).

First, I got G1 with Android 1.6 and without root. So, I decided to follow instruction to root my Android which went quite well until I upgraded to DREAM RC29 release with root hole which installed 1.22 radio ROM. I was inpatient and flashed 2.22 radio ROM and DangerSPL, but I didn't exit Amon Ra menu, so radio ROM never got flashed to cell phone and I ended up with a brick.

Having bricked my phone, I decided to buy JTAG jig for G1, some ExtUSB connectors to make serial port and components to make low-power WIGGLER JTAG. All components still didn't arrive, so unbricking my Android will take a bit longer, so I decided to get another G1 in meantime...

I had more luck second time. I got G1 which was already rooted, so I didn't have to brick it first. So, as a read geek, I decided to install Android 2.2 Froyo on it. Hack, I even compiled my own CyanogenMod.

One of most interesting commands which come with Android SDK is adb. It allows you to connect to your cell phone locally (over USB cable) or remotely using:

$ adb shell setprop service.adb.tcp.port 5555

$ dpavlin@klin:~$ adb connect

dpavlin@klin:~$ adb devices
List of devices attached  device
This proved very useful in compiling CyanogenMod on remote machine, because it requires you to download some propitiatory binary cruft from phone to build image.

I also tried to connect to Internet from Android device using USB tethering (there is also same question on stackoverflow until community decides which forum is the right place to ask it). As you can see from question, it isn't fully working because Android doesn't think it's connected to Internet (sic!). I will try tackle this problem in future or install azilink.

I also played with Scripting Layer for Android - SL4A and especially it's implementation of perl for SL4A to enable me, using RemoteControl to run perl scripts on my laptop while interacting with SL4A server on Android using helper script.

In the end, I decided to give Android x86 port a try. Compilation isn't complicated, but I still haven't been able to boot my own compiled images due to alsa segfaults (!). However, there is Android 1.6 Donut release for EeePC which works perfectly on my EeePC 701 and I highly recommend at as alternative OS for this little machine. Best part is that most sites think you are on mobile device (and you are, in fact) and show you uncluttered interface (tested with FriendFeed, Facebook and Twitter).

Update: I started collecting useful command-line scripts for Android in github repo android-command-line