I couldn’t find any Free Software to back up my Android phone contacts list. After some stumbling around and reading a ton of instructions (none of which got me where I needed to go), I came up with a simple way to do it by hand.
Use adb shell to get to the phone, then do “su” followed by “dd if=/data/data/com.android.providers.contacts/databases/contacts.db of=/sdcard/contacts.db”.
That will put your contacts on your sdcard, where you can adb pull it with “adb pull /sdcard/contacts.db”.
Replace ‘pull’ with ‘push’ to put contacts on the sdcard, then replace if and of in the dd command to put the db back in the dir where the phone expects it.
The whole thing should be rather easily scriptable if you’re so inclined.
If you’re OK with syncing them to the great cloud in the sky, ISTR wget works fine to grab CSV out of gmail.
The whole point of doing it myself is to keep the data off of Google’s servers. Their recent mishap with mapping social networks is a good example of the kind of harm I’m trying to avoid.
dd has never been the proper too for doing backups. Isn’t there a “cp”?
Anroid/Linux is not the same as GNU/Linux (which is why RMS is right that we should be using the full names to distinguish them). The various GNU pieces that we all assume come with Linux installs are missing, so unless you’ve gone to the considerable difficulty of installing busybox, there is no cp.
If you dislike dd, there is cat.
cat /data/com.android.providers.contacts/databases/contacts.db > /sdcard/contacts.db