How to debug DAVdroid-related problems

Make sure that you're using the latest DAVdroid version and use the latest version of your server software first.

If that doesn't help, you can use DAVdroid's extensive logging facilities to identify the reason(s). It gives information about the whole synchronization process, including which resources have been found locally and on the server and how they have been processed.

Often, supposed DAVdroid problems are actually

Common methods to fix problems

If you don't find a specific solution for your problem, you can always try these general methods:

  • In case a problem is related to a specific contact/event/task, delete this resource on the server and on your Android device and force synchronization.
  • In case a problem is related to a specific address book/calendar/task list, disable this collection in the DAVdroid account (uncheck it in the list), force synchronization, enable it and force synchronizationagain.
  • If this doesn't help, delete the DAVdroid account on your device and add it again.
  • If this doesn't help, uninstall DAVdroid, reboot your device, then install DAVdroid and add the account again.

Android debugging

With adb, you can do powerful things with your Android device (you have to turn on USB debugging; no root required). It comes with the Android SDK, but also as a standalone package for most operating systems. For instance, you can see how contacts/events are really stored on your system:

  • list Android calendars with
    adb shell content query --uri content://com.android.calendar/calendars
  • list Android events with
    adb shell content query --uri content://com.android.calendar/events
  • list Android raw contacts with
    adb shell content query --uri content://com.android.contacts/raw_contacts
  • view details of an Android raw contact with
    adb shell content query --uri content://com.android.contacts/raw_contacts/{RawContactID}/data

If you use adb logcat, force-quite DAVdroid and do adb setprop log.tag.davdroid VERBOSE before starting it again to make it as verbose it possible.

Source code

To verify a potential bug, you may find it helpful to take a look into the DAVdroid source code.

Last updated: 06 Feb 2018