I'm finally getting around to upgrading my trusty old Android Dev Phone 1 from the original Android 1.5 firmware to Cyanogenmod 6.1. In doing so, I wanted to take my contacts with me. The contacts application changed its database schema from Android 1.x to Android 2.x, so I need to export/import. Android 2.x's contact application supports importing from VCard (.vcf) files. But Android 1.5's contact application doesn't have an export function.
The Android 1.x contacts database is saved in /data/com.android.providers.contacts/databases/contacts.db which is a standard sqlite3 database. I wanted contact names and phone numbers and notes, but didn't care about any of the other fields. My export tool generates a minimalistic version of .vcf that the new contacts application understands.
./contacts.py contacts.db > contacts.vcf adb push contacts.vcf /sdcard/contacts.vcf
Then in the contacts application import from that file.
If you happen to have a need to export your contacts from an Android 1.x phone, this tool should give you a starting point. Note that the clean_data function fixes up some issues I had in my particular contact list, and might not be very applicable to a different data set. I'm not sure the labels ("Home", "Mobile", "Work", etc.) for the phone numbers are quite right, but then, they were already a mess in my original data. Since this was a one-off task, the code wasn't written for maintainability, and it'll probably do something awful to your data--use it at your own risk.
I have been using a little black pouch with a hook and loop fastener for... a while now. But it began to develop a distressing tendency to open at unexpected and inopportune times, such as when I'm standing at the top of a set of stairs, and let my precious Android Dev Phone 1 tumble to the ground, and down the stairs. Time to find something that would work better. I went to the T-Mobile store, and bought a leather belt pouch. But it drove me crazy -- I had to push the phone up from below, then try to grasp it from the top with out dropping it, and the top flap had a metal button on the inside that would scrape across the screen when I pulled the phone out.
At the mall recently, I saw a leather pouch that would almost work for what I wanted: a Mybat leather belt pouch that looks like this:
("Before" image generously provided by my friends at Culture Red.)
This pouch had a smooth leather interior on the underside of the flap, and two magnets; one near each corner of the flap. It also had the exact same problem of having to push the phone up from below, and attempt to grasp it from the top without dropping it.
However, the two-magnet design allowed for a slight modification to the belt pouch:
I used a box cutter to slice down the center of the face of the pouch, then I peeled back the leather, padding, and backing to expose about 1/4" of the internal cardboard. I cut about 1/4" of the cardboard off both sides, then folded the leather back to where it had been originally. Then I wrapped the leather over the new edge of the cardboard and stuck the backing over the back edge of the leather. Then I (amateurishly) hand-stitched through it all to hold it in place and trimmed the backing to size. The stitching was rather fiddly, but I managed it.
The resulting gap in the front allows me to lift the flap with my thumb, grasp the phone with a finger and that thumb, and remove the phone from the pouch in an easy and quick motion. This works so much better than the original. The phone does not feel quite as secure in the pouch as it originally did, but in a bit of ad-hoc testing (shaking it upside down, flap down, and whatnot), it held the phone just fine.
If I were to do this all over again, I would:
- measure and square the location of the center to cut
- measure the amount of internal cardboard to cut
- do better stitching