Some contacts are being duplicated on the phone, not the server

  • developer

    Hello,

    Are you sure those duplicated contacts are created by DAVdroid? When you view them in the Contacts app, are they linked to DAVdroid or to a messenger app? Messenger apps are known to create duplicates of the contacts, and sometimes they’re not merged by Android as expected.


  • Are you sure those duplicated contacts are created by DAVdroid?

    Nope, I’m not sure! I’m trying to track down the cause.

    When you view them in the Contacts app, are they linked to DAVdroid or to a messenger app?

    How do I find this information? I can’t seem to find any information about which account the contact is linked to.

  • developer

    @oldmankit said in Some contacts are being duplicated on the phone, not the server:

    How do I find this information? I can’t seem to find any information about which account the contact is linked to.

    On some devices (e.g. Samsung), there’s a “Linked with” entry. On my Fairphone OS (which is quite plain Android 6), you have to edit the contact, then choose “More fields”, and then there’s another edit dialog which shows the account (“DAVdroid Addressbook Account”) on the top.


  • On Xiaomi Redmi Note 3 Pro, when you edit the contact, it has the section “imported from”.
    It runs MIUI 9.5.1.0 - I don’t know how it relates to your version. But as it is same manufacturer, it might be similar.

    It happened to my wife’s phone recently (after MIUI upgrade and/or backup again nuked all Davdroid contacts), and few contacts (with pictures) are duplicated 4 times - “imported from” there lists “google contact”, “DAVdroid Address book contact”, “Viber contact” and “Whatsapp contact”.

    There is also the option to “Merge contact”, “Separate” or “Delete 4 contact” below that section.
    So far I’ve been too busy fixing other issues, so haven’t tried any of those yet.
    Let us know how it goes if you do!

    Interestingly, sometimes the number of “imported from” accounts and amount of dupes don’t match (like 3 dupes but 4 accounts listed; or 4 dupes and 3 accounts listed)

    Note: duplication happened despite the fact that in “Settings” / “System apps” / “Contacts” / “Configure contact lists” it has ONLY “DAVdroid address book” selected.

    But I would guess it is more likely that the problem lies with MIUI (but I’m probably prejudiced to its bloat and other design issues). Or maybe it’s MIUI’s interaction with DAVdroid? MIUI in my experience (fixing wife’s phone once every few weeks) historically was NOT being very happy with DAVDroid and owncloud apps on that phone, even after clicking all the checkboxes not to kill it, not to powersave it, yes allow it to autostart etc… Waiting for warranty to run out, so I can reformat it with LineageOS instead.


  • I’ve tried now, and “delete X contacts” is wrong answer, it will delete ALL copies of that contact (even if it says “delete 3 contacts” and you have 4 duplicates - all 4 will be deleted).

    Also “merge contact” will not help, as it will ask you for some other contact to merge with selected one.

    The correct option (at least on Xiaomi Redmi Note 3 Pro MIUI 9.5.1.0) seems to be “Separate” – that will leave only 1 instance of contact in your list (and list it as “imported from DAVDroid” afterwards). So duplicate contacts seems to be some kind of Xiaomi “feature”, and clicking “Separate” is the fix for it.

    (Also note that if you edit the name or any other info of any of the duplicates, they will all get updated.)


  • The Mi A1 uses Android One, which is as close to stock Android as you can get as far as I know. It’s not MIUI. (Thanks @mnalis for the detailed notes all the same.)

    On my Fairphone OS (which is quite plain Android 6), you have to edit the contact, then choose “More fields”, and then there’s another edit dialog which shows the account (“DAVdroid Addressbook Account”) on the top.

    Great tip! On the non-duplicate contacts there is a blue circle with a pencil in the lower-right of the contacts app, to edit the contact. When I tap that I see it says “DAVdroid Address book”. All as you would expect.

    However on the non-duplicate contacts there is no blue circle icon to edit the contact! When I tap the three dots (for more options) I can delete, but there is no edit. So I cannot see what has created these contacts. I guess it’s almost certainly not DavDroid.

    Can anyone help me track down what is creating these seemingly random duplicate contacts which I cannot delete?

  • admin

    You can maybe try to look directly into the Android contacts storage database and analyze it…


  • @devvv4ever said in Some contacts are being duplicated on the phone, not the server:

    You can maybe try to look directly into the Android contacts storage database and analyze it…

    Thank you for the suggestion. I just had a look and it appears that I cannot access this database unless the device is rooted.

    I’d really love to solve this issue but don’t want to root my device. Does anyone have any other suggestions?

  • developer

    Did you try the adb method as described on https://www.davdroid.com/faq/how-to-debug/?


  • @rfc2822 said in Some contacts are being duplicated on the phone, not the server:

    Did you try the adb method as described on https://www.davdroid.com/faq/how-to-debug/?

    Awesome! Thanks so much for that tip. I was able to dump the contacts database to my computer, and low and behold the culprit is Whatsapp.

    This hasn’t solved my issue, but at least I know what the problem really is now. I’m really grateful to you guys for helping me get this far.

    The story continues on StackExchange, where I just asked this question.

Similar topics