Reply
Thread Tools
Posts: 10 | Thanked: 3 times | Joined on Jan 2010
#1
Hi there!
my N900 got stolen a week ago and now i only got a backup from which i hope i can extract my contacts to another mobile phone.
is there a way to get them in a .csv or somehow, that i can import them to my old mobile?
thanks a million
 
gLobster's Avatar
Posts: 203 | Thanked: 47 times | Joined on Jun 2007 @ St.Petersburg, Russia
#2
Which backup? By build backup programm or made by PC Suite ?
__________________
Nokia's 6151|N900

Last edited by gLobster; 2010-07-29 at 10:03.
 
Posts: 10 | Thanked: 3 times | Joined on Jan 2010
#3
thanks for the reply! i most probably made it with OVI Suite (or directly with the backup software on the phone, not sure). its structured like this:
N900(folder)
>Backup01(folder)
>>applications.zip
>>backup.metadata
>>bookmarks.zip
>>comm_and_cal.zip
>>settings.zip

there is a file comm_and_cal.zip\Root\home\user\.osso-abook-backup\db\addressbook.db which includes all the information (i guess), but i dont know how to export/format them in a way that i can import them elsewhere

hope this helps, thank you so much!

Last edited by flair; 2010-07-29 at 10:38.
 
gLobster's Avatar
Posts: 203 | Thanked: 47 times | Joined on Jun 2007 @ St.Petersburg, Russia
#4
I think adressbook.db is sqlite database. Try to connect to the file by sqlite. It's very simple program.
__________________
Nokia's 6151|N900
 
Posts: 10 | Thanked: 3 times | Joined on Jan 2010
#5
thanks for the hint, i am not familiar with sqlite, but i think i figured out how to use it.
1. i put the sqlite3.exe in the same folder as the addressbook.db
2. then i ran "sqlite3.exe addressbook.db" from cmd
3. i typed "select *;" --> error: no tables specified;
4. i typed "create table test;" --> error: file is encrypted or is not a database
5. i typed "select * from sqlite_master;" --> error: file is encrypted or is not a database

does this tell you anything? should i try sth else?
when i open the address.db with an editor it starts with some command characters followed by what i guess is my addressbook, where each entry looks something like this:
VERSION:3.0
REV:2010-04-28T11:21:36Z
UID:259
PHOTO;VALUE=uri:file:///home/user/.osso-abook/photos/2H4YBV
FN:***** ***
EMAIL:******@******.com
X-SKYPE;X-OSSO-VALID=yes;TYPE=skype:******
URL:http://www.facebook.com/******
TEL;TYPE=VOICE:******
TEL;TYPE=CELL:******
TEL:******
BDAY:2010-******
NICKNAME:******
N:******;******
END:VCARD

Last edited by flair; 2010-07-29 at 11:45.
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#6
As far as I know, it isn't a sqlitedb file, but Berkeley-DB.

regards
Nicolai
 
Posts: 10 | Thanked: 3 times | Joined on Jan 2010
#7
so there isnt a possibility to export the contacts using the OVI Suite or PC Suite? that really sucks..
if it is berkeley DB, how can i extract the information to a format suitable for android phones? i only found the berkely source on the oracle website, dont know how to deal with that..
those contacts are really important for me, it would be a pain in the *** to have to copy them manually... please help!!
 
manvik60's Avatar
Posts: 128 | Thanked: 46 times | Joined on Mar 2010 @ Switzerland
#8
As nicolai already told, its in Berkeley-DB format. So you need some utility like db4.5_dump to dump the addressbook.db into more readable format.

I have cygwin installed on my XP and that includes db4.5_dump.exe in it. If you dont have cygwin, install it from here. At the page, right hand it says install. When you install make sure you install the db4.5 package also. Or you can install it in any other os you want,like ubuntu etc.

After install steps.
-- copy the addressbook.db to your PC.
-- open the cygwin prompt
-- cd to directory where the addressbook.db is and run below command,
PHP Code:
db4.5_dump.exe -p addressbook.db sed -'9,$ !d' \
-
'/^ pas-id/d' \
-
's/\\0d\\0a/\n/g' \
-
's/\\\\, / /g' \
-
's/^ //' -'s/\\00//' \
-
's/\\c3\\89/É/g' \
-
's/\\c3\\8a/È/g' \
-
's/\\c3\\a9/é/g' \
-
's/\\c3\\a8/è/g' \
-
's/\\c3\\aa/ê/g' \
-
's/\\c3\\a0/à/g' \
-
's/\\c3\\a1/á/g' \
-
's/\\c3\\a2/â/g' \
-
's/\\c3\\a7/ç/g' \
-
's/\\c3\\b4/ô/g' \
-
's/\\c3\\af/ï/g' \
-
's/\\c3\\ab/ë/g' \
mycontact.vcf 
Now this will convert your addressbook.db into a nice readable vcf format. Now you can use some tool to convert into excel or someother format (whatever you want)

This is not my code, but I have used it sometime back, so maybe some syntax error could be there. But you got the idea how to do it.
 

The Following 5 Users Say Thank You to manvik60 For This Useful Post:
Posts: 10 | Thanked: 3 times | Joined on Jan 2010
#9
hey manvik,

thank you so much, despite some errors i was able to convert my contacts by using your code! i had to reconvert it to csv afterwards (didnt know how to do it directly) and somewhere along the process my germen ä, ö, ü got lost, but it wont be too much work to correct that.

again thank you so much for the fast and great support!
 
manvik60's Avatar
Posts: 128 | Thanked: 46 times | Joined on Mar 2010 @ Switzerland
#10
Hi flair,

Glad it worked for you. But I just noticed that, the code is missing the backslash at the end. But when I edit it, I see the "\" properly, so may be when you write PHP code in forum, it dosen't display "\" :-(

Any ways the code with \ is below.

db4.5_dump.exe -p addressbook.db | sed -e '9,$ !d' \
-e '/^ pas-id/d' \
-e 's/\\0d\\0a/\n/g' \
-e 's/\\\\, / /g' \
-e 's/^ //' -e 's/\\00//' \
-e 's/\\c3\\89/É/g' \
-e 's/\\c3\\8a/È/g' \
-e 's/\\c3\\a9/é/g' \
-e 's/\\c3\\a8/è/g' \
-e 's/\\c3\\aa/ê/g' \
-e 's/\\c3\\a0/à/g' \
-e 's/\\c3\\a1/á/g' \
-e 's/\\c3\\a2/â/g' \
-e 's/\\c3\\a7/ç/g' \
-e 's/\\c3\\b4/ô/g' \
-e 's/\\c3\\af/ï/g' \
-e 's/\\c3\\ab/ë/g' \
> mycontact.vcf
 

The Following User Says Thank You to manvik60 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 04:46.