I did a little bit of research. Contacts
communicates with ofono
(the modem interface) via D-bus
.
So, just started dbus-monitor
and then tried to import the contacts. Contacts
correctly sends the request (ofono documentation
method call time=1537922880.561822 sender=:1.106 -> destination=org.ofono serial=2 path=/ril_0; interface=org.ofono.Phonebook; member=Import
but there was no answer. When I tried to do the import for the second time, an answer came:
method call time=1537922880.561822 sender=:1.106
-> destination=org.ofono serial=2 path=/ril_0; interface=org.ofono.Phonebook; member=Import
error time=1537922880.561933 sender=:1.44 -> destination=:1.105
error_name=org.ofono.Error.InProgress reply_serial=2
string "Operation already in progress"
error time=1537922880.562014 sender=org.freedesktop.DBus -> destination=:1.44 error_name=org.freedesktop.DBus.Error.ServiceUnknown reply_serial=257
string "The name :1.105 was not provided by any .service files"
It was an error that the request is already in progress, however ofono
for some reason sent it to a different destination. Therefore, D-bus
didn't forward it to Contacts
.
I also tried to wait longer (maybe just the import takes longer), but even after 5 hours the answer was "already in progress" (with the wrong destination, as well).
Then I found an old SIM in my drawer which was already blocked but it had some saved contacts. I tried the same procedure on it and the correct answer arrived almost instantly:
method call time=1537944623.758662 sender=:1.106 -> destination=org.ofono serial=2 path=/ril_0; interface=org.ofono.Phonebook; member=Import
method return time=1537944623.759495 sender=:1.43 -> destination=:1.106 serial=263 reply_serial=2
string "BEGIN:VCARD VERSION:3.0 <OUTPUT OMITTED>"
So, maybe my SIM is damaged after all. I will try to look into ofono
why it gets stuck and why it sends the answer with wrong destination.