maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   How to access SMS database in Sailfish? (https://talk.maemo.org/showthread.php?t=91909)

merlin1991 2013-12-24 17:05

Re: How to access SMS database in Sailfish?
 
Quote:

Originally Posted by Nikos Alexandris (Post 1400316)
The only place from where I could execute the binary smsExport was from /home/user. Anywhere else, e.g. under /home/user/MyDocs/N9Export I could neither alter permissions nor let it run (always permission denied).

If you have a look at mount, especially this bit:
Code:

/dev/mmcblk0p1 on /home/user/MyDocs type vfat (rw,nosuid,nodev,noexec,noatime,nodiratime,uid=29999,fmask=0133,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,rodir,errors=remount-ro)
you'll see, that "noexec" flag ist set for MyDocs which prevents you from running executables from there.


Regarding your problem, never forget our dear friend aegis. You have to run the application as the developer user since he is the only user with enough aegis credentials to access your messages database.

rainisto 2013-12-25 14:45

Re: How to access SMS database in Sailfish?
 
Otherwise works ok, but it scrambles צהו characters on import, maybe it should export/import in utf8 or something?

And on N9 side you needed to run it as developer and not as user.

zlatko 2013-12-25 16:05

Re: How to access SMS database in Sailfish?
 
Worked perfect on my N9 and Jolla :) Thanks everyone involved!

merlin1991 2013-12-26 01:05

Re: How to access SMS database in Sailfish?
 
Another day, another update:

As suggested by rainisto the application now saves to utf-8 files.
It also can ex/import the call history now by using the -c flag.

New binaries:
http://cdnm.at/~christian/Harmattan-...at/jollaImport
http://cdnm.at/~christian/Harmattan-SMS-Boat/n9Export

Source still at github:
https://github.com/merlin1991/Harmattan-SMS-Boat

Nikos Alexandris 2013-12-26 04:18

Re: How to access SMS database in Sailfish?
 
Quote:

Originally Posted by merlin1991 (Post 1400645)
Another day, another update:

As suggested by rainisto the application now saves to utf-8 files.
It also can ex/import the call history now by using the -c flag.

New binaries:
http://cdnm.at/~christian/Harmattan-...at/jollaImport
http://cdnm.at/~christian/Harmattan-SMS-Boat/n9Export

Source still at github:
https://github.com/merlin1991/Harmattan-SMS-Boat

Amazing! I can't get it working though :-(
Code:

/home/user # whoami
root
/home/user # ls -lah n9Export
-rwxr-xr-x    1 user    users    259.1K Dec 26 06:14 n9Export
/home/user # ./n9Export -s sms_n9
"GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.148" (uid=0 pid=6202 comm="./n9Export -s sms_n9 ") interface="org.freedesktop.Tracker1.Steroids" member="Query" error name="(unset)" requested_reply=0 destination="org.freedesktop.Tracker1" (uid=29999 pid=1346 comm="/usr/lib/tracker/tracker-store "))"
# sms:  0
QTrackerDirectSelectResult: QSparqlError(9, "GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.148" (uid=0 pid=6202 comm="./n9Export -s sms_n9 ") interface="org.freedesktop.Tracker1.Steroids" member="Query" error name="(unset)" requested_reply=0 destination="org.freedesktop.Tracker1" (uid=29999 pid=1346 comm="/usr/lib/tracker/tracker-store "))", 4) "SELECT ?message nie:plainTextContent(?message) rdf:type(?message) nmo:communicationChannel(?message) nmo:sentDate(?message) nmo:messageId(?message) nmo:receivedDate(?message) nie:contentLastModified(?message) nmo:isSent(?message) nmo:isDraft(?message) nmo:isRead(?message) nmo:encoding(?message) nie:characterSet(?message) nie:language(?message) (SELECT GROUP_CONCAT(tracker:coalesce(nco:imID(?medium), nco:phoneNumber(?medium), ?medium), "\u001e") WHERE { ?from nco:hasContactMedium ?medium . }) (SELECT GROUP_CONCAT(tracker:coalesce(nco:imID(?medium), nco:phoneNumber(?medium), ?medium), "\u001e") WHERE { ?to nco:hasContactMedium ?medium . }) nmo:phoneMessageId(?message) WHERE { SELECT ?message ?from ?to  IF (nmo:isSent(?message) = true, ?to, ?from) AS ?target  ?message WHERE {?message nmo:from ?from ; nmo:to ?to .  ?message rdf:type nmo:SMSMessage . } }"


zlatko 2013-12-26 06:54

Re: How to access SMS database in Sailfish?
 
@Nikos Alexandris
Run
Code:

develsh
prior executing the export.

Nikos Alexandris 2013-12-26 11:18

Re: How to access SMS database in Sailfish?
 
Quote:

Originally Posted by zlatko (Post 1400660)
@Nikos Alexandris
Run
Code:

develsh
prior executing the export.

Thank you! Apologies for my ignorance. It works :-). For the "-c" option, however, I get countless lines of:

Code:

libqtcontacts-tracker: engine.cpp:1591: Not cleaning up obsolete resources for nao:hasTag property since the property's range is too generic (rdfs:Resource).
What does it actually mean?

Nikos Alexandris 2013-12-26 12:59

Re: How to access SMS database in Sailfish?
 
Quote:

Originally Posted by Nikos Alexandris (Post 1400696)
Thank you! Apologies for my ignorance. It works :-). For the "-c" option, however, I get countless lines of:

Code:

libqtcontacts-tracker: engine.cpp:1591: Not cleaning up obsolete resources for nao:hasTag property since the property's range is too generic (rdfs:Resource).
What does it actually mean?

In any case, it worked. Awesome work!!

nicetux 2013-12-26 13:04

Re: How to access SMS database in Sailfish?
 
When i try to export my sms on n9 i get following error message:

Code:

~/MyDocs/SMSBackup $ develsh n9export -s 20132612
n9export: line 1: syntax error: unexpected word (expecting ")")

What I'mdoing wrong?

juiceme 2013-12-26 17:34

Re: How to access SMS database in Sailfish?
 
Quote:

Originally Posted by nicetux (Post 1400733)
When i try to export my sms on n9 i get following error message:

Code:

~/MyDocs/SMSBackup $ develsh n9export -s 20132612
n9export: line 1: syntax error: unexpected word (expecting ")")

What I'mdoing wrong?


you should first launch "develsh", then "./n9export"


All times are GMT. The time now is 01:13.

vBulletin® Version 3.8.8