maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Solved] Commhist-import for transferring conversations to N9 (https://talk.maemo.org/showthread.php?t=81082)

ejasmudar 2011-12-24 08:12

[Solved] Commhist-import for transferring conversations to N9
 
1 Attachment(s)
I just got my N9 and need to transfer my complete conversations and call logs from N900 to N9. Thankfully, Msameer has developed a small utility for harmattan that does this, (http://talk.maemo.org/showthread.php?t=79686) but it only imports SMS messages.

He has indicated how this utility can be modified to import everything, but it needs to be compiled after that. I'm running windows on my laptop and am not able to compile the utility. Can anybody please help me by compiling the attached file or by showing me how I can do it from windows. (I unfortunately do not have access to any Linux systems apart from my N9/N900)

Please Help

Note: the source is at: https://gitorious.org/n900-comhist-i...comhist-import

nicolai 2011-12-24 21:46

Re: [Help Required] Compile commhist-import for transferring conversations to N9
 
1 Attachment(s)
untested.
I just compiled the source with scratchbox.

hope this works.


nicolai

ejasmudar 2011-12-25 11:55

Re: [Help Required] Compile commhist-import for transferring conversations to N9
 
Yay, nicolai to the rescue!!

Yes thanks it worked. Installed it and it transferred all my sms and IM conversations. (Not call logs, wonder why...)
The only problem is that IM conversations were ordered wrong. First outgoing and ten incoming IMs grouped together. Hmmm.... would it be possible to reorder them based on time?

nicolai 2011-12-26 12:16

Re: [Help Required] Compile commhist-import for transferring conversations to N9
 
1 Attachment(s)
I don't know why, but for outgoing messages the
n900 eventlogger has odd "event-end time" entries.
For outgoing messages start and end-time should be the
same. But on my N900 the end-time is few seconds
before start-time.
Anyway, can you try this version and report back
if it works.

ejasmudar 2011-12-26 20:14

Re: [Help Required] Compile commhist-import for transferring conversations to N9
 
Thats a lot, nicolai! It works perfectly now. All conversations have been transferred to my N9!

Damn, I wish I could donate to you, but paypal needs credit card :/ Let me see if I can send you some donations any other way...

JanMalte 2012-01-03 21:14

Re: [Help Required] Compile commhist-import for transferring conversations to N9
 
How did you managed to import your sms?
I tried the compiled version but got several errors like these: http://pastebin.com/w19u8vLK

First error from device. I'm using the tool over ssh as user
Quote:

"GDBus.Error:org.freedesktop.DBus.Error.AccessDeni ed: Rejected send message, 2 matched rules; type="method_call", sender=":1.101" (uid=29999 pid=2407 comm="./importn900commhist el-v1.db ") interface="org.freedesktop.Tracker1.Steroids" member="Query" error name="(unset)" requested_reply=0 destination="org.freedesktop.Tracker1" (uid=29999 pid=1276 comm="/usr/lib/tracker/tracker-store "))"
QTrackerDirectSelectResult: QSparqlError(9, "GDBus.Error:org.freedesktop.DBus.Error.AccessDeni ed: Rejected send message, 2 matched rules; type="method_call", sender=":1.101" (uid=29999 pid=2407 comm="./importn900commhist el-v1.db ") interface="org.freedesktop.Tracker1.Steroids" member="Query" error name="(unset)" requested_reply=0 destination="org.freedesktop.Tracker1" (uid=29999 pid=1276 comm="/usr/lib/tracker/tracker-store "))", 4) "SELECT ?channel nie:subject(?channel) nie:generator(?channel) nie:identifier(?channel) nie:title(?channel) ?_lastDate ( SELECT COUNT(?_total_messages_1) WHERE { ?_total_messages_1 nmo:communicationChannel ?channel . ?_total_messages_1 nmo:isDeleted false . }) ( SELECT COUNT(?_total_unread_messages_1) WHERE { ?_total_unread_messages_1 nmo:communicationChannel ?channel . ?_total_unread_messages_1 nmo:isRead false . ?_total_unread_messages_1 nmo:isDeleted false . }) ( SELECT COUNT(?_total_sent_messages_1) WHERE { ?_total_sent_messages_1 nmo:communicationChannel ?channel . ?_total_sent_messages_1 nmo:isSent true . ?_total_sent_messages_1 nmo:isDeleted false . }) ?_lastMessage (SELECT GROUP_CONCAT(fn:string-join((tracker:id(?contact), nco:nameGiven(?contact), nco:nameFamily(?contact), "\u001d", ?nicknames), "\u001e"), "\u001c") WHERE { SELECT ?contact (SELECT GROUP_CONCAT(fn:string-join((?addr, ?nickname), "\u001f"), "\u001e") WHERE { ?contact nco:hasAffiliation [ nco:hasIMAddress ?addr ] . ?addr nco:imNickname ?nickname . }) AS ?nicknames WHERE { { ?part nco:hasIMAddress ?address . ?contact nco:hasAffiliation [ nco:hasIMAddress ?address ] . } UNION { ?part nco:hasPhoneNumber [ maemo:localPhoneNumber ?number ] . ?contact nco:hasAffiliation [ nco:hasPhoneNumber [ maemo:localPhoneNumber ?number ] ] . }} }) AS ?contacts rdf:nil fn:string-join((nmo:messageSubject(?_lastMessage),nie:plainT extContent(?_lastMessage)),"\u001e") nfo:fileName(nmo:fromVCard(?_lastMessage)) rdfs:label(nmo:fromVCard(?_lastMessage)) rdf:type(?_lastMessage) AS ?_type nmo:deliveryStatus(?_lastMessage) AS ?_deliveryStatus ?_lastModified nmo:sentDate(?_lastMessage)WHERE { { SELECT ?channel ?_lastDate ?_lastModified ?part ( SELECT ?_message WHERE { ?_message nmo:communicationChannel ?channel . ?_message nmo:isDeleted false . ?_message nmo:sentDate ?messageSentDate . } ORDER BY DESC(?messageSentDate) DESC(tracker:id(?_message)) LIMIT 1) AS ?_lastMessage WHERE { GRAPH <commhistory:message-channels> { ?channel a nmo:CommunicationChannel . } ?channel nmo:lastMessageDate ?_lastDate . ?channel nie:contentLastModified ?_lastModified . ?channel nmo:hasParticipant ?part . } }}ORDER BY DESC(?_lastDate)"
QTrackerDirectUpdateResult: QSparqlError(-1, "", 0) "INSERT OR REPLACE { GRAPH <commhistory:message-channels> { <conversation:12> a nmo:CommunicationChannel } <conversation:12> nie:subject "/org/freedesktop/Telepathy/Account/ring/tel/ring" ; nie:identifier "0" ; nie:title "" ; nmo:hasParticipant [rdf:type nco:Contact; nco:hasIMAddress <telepathy:/org/freedesktop/Telepathy/Account/ring/tel/ring!Nokia>] ; nie:generator "Nokia" ; nmo:lastMessageDate "1970-01-01T00:00:00Z"^^xsd:dateTime ; nie:contentLastModified "2012-01-03T21:13:46Z"^^xsd:dateTime . } INSERT SILENT {<telepathy:/org/freedesktop/Telepathy/Account/ring/tel/ring!Nokia> a nco:IMAddress ; nco:imID "Nokia"}"
I have 3972 events!

JanMalte 2012-01-03 21:19

Re: [Help Required] Compile commhist-import for transferring conversations to N9
 
Just ignore what i have just posted. I used the deb file and everything went fine. Thanks for your work.

1.) Just install the deb file posted above
3.) Make a backup on your N900
4.) Copy the el-v1.db from the packed backup file to /home/user on you N9
5.) Run the code below on your N9
Code:

/usr/bin/n900-comhist-import el-v1.db


All times are GMT. The time now is 06:23.

vBulletin® Version 3.8.8