Hello Android!
I now [have]{into-android} a [sim-unlocked]{sim-unlocking-g1} [rooted]{rooting-g1} T-mobile G1 phone running Android. I’ve installed the Cyanogen v3.6.8.1 firmware on it, and upgraded the recovery image to Cyanogen’s pimped out version. I am really impressed with the cell phone and MID aspects of the device. But I bought it so I could do some hacking. All right… so what else can I do with this thing? It sounds logical that I now write a Hello world application.
sim unlocking a G1
One of the phones I picked up on eBay was SIM-locked (see my [previous post]{into-android}) and I had to go through the process of unlocking it so I could use it on my local cell network. WARNING: It worked for me, but it may not for you. This may very well brick your phone! In some cases you will only have 3 chances (in others 10) to unlock, failing to do so can damage your SIM card or the phone. Still here? Let’s get started…
rooting the droid
In my continued quest to learn more and start hacking on the Android phones, I’ve recently rooted my Android based HTC Dream (aka Tmobile G1) phones. I’ll start by explain the terminology. There are two ways in which the phones can be unlocked: so called rooting, which I describe in this post, involves replacing the bootloader so that the phone can use community generated firmware images, aka ROM’s. there is also unjailing or unlocking the phone so that it can be used with any SIM card on any GSM network; and I’ll talk about that in due time.
getting into android
I am a late comer to the Android craze. I got to play with one recently at the Linux Symposium in Montreal, and I decided I have to get one. I ended up picking up a pair from ebay – one to hack on, and one to carry in my pocket. I’d like to work on the core platform and not so much the apps. Anyway, my storey is boring so far. Below are the interesting links I found so far while researching the platform.
importing an old project into git
I have recently been asked to revive an old project. Way back when I used to use bk for tracking changes. But today, I don’t even have a working bk tree. Moving the history to git is easiest done by taking the tarballs I’ve published and creating a commit per tarball. Below is a simple script that will do just that.
Why pick Git?
Someone on the Git LinkedIn group asked “why pick Git?”. I started writing a response on LinkedIn but quickly realized I had more to say on the topic than I’d care to leave behind closed doors of LinkedIn. If you already use Git, none of the stuff I talk about below will surprise you. But if this sparks your interest see my Git talk.
select loop for X events
I am not a huge fan of threading when it can be avoided. I always thought that it was OK for GUI programs to be threaded. I just discovered that you can handle X events from a select loop. dis = XOpenDisplay(DISPLAY); fd = ConnectionNumber(dis); FD_SET(fd, &in_fds); select(fd+1, &in_fds, NULL, NULL, NULL); ...
portable printf
I was squashing some warnings in [uzbl]{tags/uzbl} code: printf("set %s = %d\n", (char *)k, (int)*c->ptr); Ignoring the fact that, at first glance, it’s weird to cast a pointer to int (ptr is defined as void**), compiling this code on 64bit would warn you that you were casting a pointer to an int. That’s because a pointer is 64bit and an int is 32bit.
switching to uzbl
I’ve been using vimperator for a long time now. I love this firefox plugin, but firefox is pretty slow at times. Today I decided to more seriously look at uzbl. I am surprised how much I like it. I’ve put up my configuration on github and will try to blog about it again as I convert more of my usage to uzbl.
Linux Symposium
I will be attending the Linux Symposium/2009 in Montreal in under a month. It’s been for for 11 years now, and I am looking forward to the break from work. I hear that the conference is not yet sold out… so you can still attend.