Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

palm2droid: a script to help import palm addresses into your android phone

OP MartinFick

11th April 2009, 06:23 AM   |  #1  
MartinFick's Avatar
OP Senior Member
Flag Boulder, CO
Thanks Meter: 2
 
214 posts
Join Date:Joined: Mar 2009
More
Finally I seem to have completed my conversion script which can be used to convert a palm address CSV file as output by the pilot-addresses tool (from the linux pilot-xfer suite of tools) to a sql script which can be used with sqlite3 to load the addresses into an android contacts db.

This is useful if you do not want to use the google contact service to transfer your old contacts to your new phone. Perhaps you like keeping your contacts' info private for them. Afterall, there's hardly a less public way to expose their personal data then to give it to google, the largest search provider, eh!!!


Since there is not a perfect match between palm fields and android fields, your results may vary. The script makes a best attempt to match things logically, it even tries to combine entries with the same name (in case you have multiple addresses for a person). If you have non US addresses, you should probably edit the country list in the BEGIN{} section.

Once you have converted your palm db to sql, you may want to check the transformation visually before loading it to your phone.


HowTo:

1) Before loading your palm db onto your phone, it makes sense to make a backup of your droid contacts to your PC like this:

adb pull /data/data/com.android.providers.contacts/databases/contacts.db .

2) Output your palm db to a file with the linux pilot-xfer tool (note the important -a switch):

pilot-addresses -a -w add.palm

3) Convert the add.palm created above like this:

palm2droid < add.palm > droid.sql

4) Load the sql onto your phone like this:

adb push droid.sql /cache/droid.sql

5) Load the sql into your contacts db like this:

adb shell
su
sqlite3 /data/data/com.android.providers.contacts/databases/contacts.db < /cache/sroid.sql


That's it!


If you do not like your results, restore your contacts db like this:

adb push contacts.db /data/data/com.android.providers.contacts/databases

Good luck, I hope this helps!


Download: palm2droid (GPLed)
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes