sync issue in xiaomi



  • Hello, DavDroid 1.2.3-ose (and earlier) won't sync on my Xiaomi Mi4c with MIUI 8.5.1 developer.
    It should sync with an owncloud v. 9.0.1 server
    Nothing happens.

    I checked all permissions in the MIUI permissions... all granted to DavDroid.
    I tried aCalDav and it syncs correctly my calendars.
    DavDroid is able to "see" there are personal contacts and several calendars on the server, it lists them but don't syncronize anything.
    I've also turned on logging... It writed once. (Pasted aboce. I change my real ip with "my_ip" and my real user name with "my_user_name")

    Maybe is an issue with the ssl certificate?
    I use a self signed certificate on my owncloud server. It didn't give me problems on old mobiles.

    Any clue?
    thanks for your work and your help

    2016-08-16 15:46:01 2 [AccountSettings] Account my_user_name.owncloud has version 4, current version: 4
    2016-08-16 15:46:50 0 [AccountSettings] Account my_user_name.owncloud has version 4, current version: 4
    2016-08-16 15:46:54 0 [AccountSettings] Account my_user_name.owncloud has version 4, current version: 4
    2016-08-16 15:47:42 3 [DavService$RefreshCollections] Refreshing carddav collections of service #1
    2016-08-16 15:47:43 3 [AccountSettings] Account my_user_name.owncloud has version 4, current version: 4
    2016-08-16 15:47:43 3 [DavService$RefreshCollections] Querying principal for home sets
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering DAV property factories
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.AddressbookDescription$Factory for addressbook-description(urn:ietf:params:xml:ns:carddav)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.AddressbookHomeSet$Factory for addressbook-home-set(urn:ietf:params:xml:ns:carddav)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.AddressData$Factory for address-data(urn:ietf:params:xml:ns:carddav)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CalendarColor$Factory for calendar-color(http://apple.com/ns/ical/)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CalendarData$Factory for calendar-data(urn:ietf:params:xml:ns:caldav)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CalendarDescription$Factory for calendar-description(urn:ietf:params:xml:ns:caldav)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CalendarHomeSet$Factory for calendar-home-set(urn:ietf:params:xml:ns:caldav)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CalendarProxyReadFor$Factory for calendar-proxy-read-for(http://calendarserver.org/ns/)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CalendarProxyWriteFor$Factory for calendar-proxy-write-for(http://calendarserver.org/ns/)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CalendarTimezone$Factory for calendar-timezone(urn:ietf:params:xml:ns:caldav)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CurrentUserPrincipal$Factory for current-user-principal(DAV:)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.CurrentUserPrivilegeSet$Factory for current-user-privilege-set(DAV:)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.DisplayName$Factory for displayname(DAV:)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.GetContentType$Factory for getcontenttype(DAV:)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.GetCTag$Factory for getctag(http://calendarserver.org/ns/)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.GetETag$Factory for getetag(DAV:)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.GetLastModified$Factory for getlastmodified(DAV:)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.GroupMembership$Factory for group-membership(DAV:)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.ResourceType$Factory for resourcetype(DAV:)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.SupportedAddressData$Factory for supported-address-data(urn:ietf:params:xml:ns:carddav)
    2016-08-16 15:47:43 3 [dav4android.PropertyRegistry] Registering at.bitfire.dav4android.property.SupportedCalendarComponentSet$Factory for supported-calendar-component-set(urn:ietf:params:xml:ns:caldav)
    2016-08-16 15:47:43 3 [HttpClient$1] --> PROPFIND https://my_ip/remote.php/dav/principals/users/my_user_name/ http/1.1
    2016-08-16 15:47:43 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-08-16 15:47:43 3 [HttpClient$1] Content-Length: 221
    2016-08-16 15:47:43 3 [HttpClient$1] Depth: 0
    2016-08-16 15:47:43 3 [HttpClient$1] 
    2016-08-16 15:47:43 3 [HttpClient$1] <?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><CARD:addressbook-home-set /><group-membership /></prop></propfind>
    2016-08-16 15:47:43 3 [HttpClient$1] --> END PROPFIND (221-byte body)
    2016-08-16 15:47:44 3 [dav4android.BasicDigestAuthHandler] Trying Basic auth preemptively
    2016-08-16 15:47:44 3 [dav4android.BasicDigestAuthHandler] Adding Basic authorization header for https://my_ip/remote.php/dav/principals/users/my_user_name/
    2016-08-16 15:47:44 3 [HttpClient$1] <-- 207 Multi-Status https://my_ip/remote.php/dav/principals/users/my_user_name/ (1301ms)
    2016-08-16 15:47:44 3 [HttpClient$1] Date: Tue, 16 Aug 2016 13:47:44 GMT
    2016-08-16 15:47:44 3 [HttpClient$1] Server: Apache/2.2.22 (Debian)
    2016-08-16 15:47:44 3 [HttpClient$1] Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
    2016-08-16 15:47:44 3 [HttpClient$1] X-Powered-By: PHP/5.4.45-0+deb7u4
    2016-08-16 15:47:44 3 [HttpClient$1] Set-Cookie: oc8241418ed0=nj7vehq96508v7of9ske1ipmp0; path=/; HttpOnly
    2016-08-16 15:47:44 3 [HttpClient$1] Expires: Thu, 19 Nov 1981 08:52:00 GMT
    2016-08-16 15:47:44 3 [HttpClient$1] Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    2016-08-16 15:47:44 3 [HttpClient$1] Pragma: no-cache
    2016-08-16 15:47:44 3 [HttpClient$1] Set-Cookie: oc_sessionPassphrase=lS7sCPJQQWt1y8nlZa6FTXWRU4lNtDx7orOEXjd4oG75SWLLqvnH%2FAzOJrBgVM%2BZ6%2BZYIVjSTmcktszSwCSlBHrjbHxSdA9BsSM2TBMpuanJCpgpgl9P7G8wWeAQMXfh; path=/; secure; httponly
    2016-08-16 15:47:44 3 [HttpClient$1] Content-Security-Policy: default-src 'none';
    2016-08-16 15:47:44 3 [HttpClient$1] Set-Cookie: oc8241418ed0=5ufn3mvqadqdu318abvfon9hg1; path=/; secure; HttpOnly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: cookie_test=test; expires=Tue, 16-Aug-2016 14:47:44 GMT
    2016-08-16 15:47:45 3 [HttpClient$1] Vary: Brief,Prefer
    2016-08-16 15:47:45 3 [HttpClient$1] DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendar-auto-schedule, calendarserver-subscribed, oc-resource-sharing, addressbook
    2016-08-16 15:47:45 3 [HttpClient$1] X-Content-Type-Options: nosniff
    2016-08-16 15:47:45 3 [HttpClient$1] X-XSS-Protection: 1; mode=block
    2016-08-16 15:47:45 3 [HttpClient$1] X-Robots-Tag: none
    2016-08-16 15:47:45 3 [HttpClient$1] X-Frame-Options: SAMEORIGIN
    2016-08-16 15:47:45 3 [HttpClient$1] X-Download-Options: noopen
    2016-08-16 15:47:45 3 [HttpClient$1] X-Permitted-Cross-Domain-Policies: none
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Length: 697
    2016-08-16 15:47:45 3 [HttpClient$1] Keep-Alive: timeout=5, max=100
    2016-08-16 15:47:45 3 [HttpClient$1] Connection: Keep-Alive
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-08-16 15:47:45 3 [HttpClient$1] 
    2016-08-16 15:47:45 3 [HttpClient$1] <?xml version="1.0"?>
    <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns">
     <d:response>
      <d:href>/remote.php/dav/principals/users/my_user_name/</d:href>
      <d:propstat>
       <d:prop>
        <card:addressbook-home-set>
         <d:href>/remote.php/dav/addressbooks/users/my_user_name/</d:href>
        </card:addressbook-home-set>
        <d:group-membership>
         <d:href>/remote.php/dav/principals/groups/admin/</d:href>
        </d:group-membership>
       </d:prop>
       <d:status>HTTP/1.1 200 OK</d:status>
      </d:propstat>
     </d:response>
    </d:multistatus>
    
    2016-08-16 15:47:45 3 [HttpClient$1] <-- END HTTP (697-byte body)
    2016-08-16 15:47:45 3 [dav4android.DavResource] Received <response> for https://my_ip/remote.php/dav/principals/users/my_user_name/
    	PARAMETER #1 = [group-membership(DAV:): hrefs=[/remote.php/dav/principals/groups/admin/], addressbook-home-set(urn:ietf:params:xml:ns:carddav): hrefs=[/remote.php/dav/addressbooks/users/my_user_name/]]
    2016-08-16 15:47:45 3 [DavService$RefreshCollections] Principal is member of group /remote.php/dav/principals/groups/admin/, checking for home sets
    2016-08-16 15:47:45 3 [HttpClient$1] --> PROPFIND https://my_ip/remote.php/dav/principals/groups/admin/ http/1.1
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Length: 221
    2016-08-16 15:47:45 3 [HttpClient$1] Depth: 0
    2016-08-16 15:47:45 3 [HttpClient$1] 
    2016-08-16 15:47:45 3 [HttpClient$1] <?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><CARD:addressbook-home-set /><group-membership /></prop></propfind>
    2016-08-16 15:47:45 3 [HttpClient$1] --> END PROPFIND (221-byte body)
    2016-08-16 15:47:45 3 [dav4android.BasicDigestAuthHandler] Adding Basic authorization header for https://my_ip/remote.php/dav/principals/groups/admin/
    2016-08-16 15:47:45 3 [HttpClient$1] <-- 207 Multi-Status https://my_ip/remote.php/dav/principals/groups/admin/ (549ms)
    2016-08-16 15:47:45 3 [HttpClient$1] Date: Tue, 16 Aug 2016 13:47:44 GMT
    2016-08-16 15:47:45 3 [HttpClient$1] Server: Apache/2.2.22 (Debian)
    2016-08-16 15:47:45 3 [HttpClient$1] Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
    2016-08-16 15:47:45 3 [HttpClient$1] X-Powered-By: PHP/5.4.45-0+deb7u4
    2016-08-16 15:47:45 3 [HttpClient$1] Expires: Thu, 19 Nov 1981 08:52:00 GMT
    2016-08-16 15:47:45 3 [HttpClient$1] Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    2016-08-16 15:47:45 3 [HttpClient$1] Pragma: no-cache
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Security-Policy: default-src 'none';
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: oc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: oc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: oc_remember_login=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: oc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: oc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: oc_remember_login=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: oc8241418ed0=501hci48b6oepjt9evd4dpslk6; path=/; secure; HttpOnly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: oc8241418ed0=eocuso4peiveomdhouckb9nn27; path=/; secure; HttpOnly
    2016-08-16 15:47:45 3 [HttpClient$1] Set-Cookie: cookie_test=test; expires=Tue, 16-Aug-2016 14:47:45 GMT
    2016-08-16 15:47:45 3 [HttpClient$1] Vary: Brief,Prefer
    2016-08-16 15:47:45 3 [HttpClient$1] DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendar-auto-schedule, calendarserver-subscribed, oc-resource-sharing, addressbook
    2016-08-16 15:47:45 3 [HttpClient$1] X-Content-Type-Options: nosniff
    2016-08-16 15:47:45 3 [HttpClient$1] X-XSS-Protection: 1; mode=block
    2016-08-16 15:47:45 3 [HttpClient$1] X-Robots-Tag: none
    2016-08-16 15:47:45 3 [HttpClient$1] X-Frame-Options: SAMEORIGIN
    2016-08-16 15:47:45 3 [HttpClient$1] X-Download-Options: noopen
    2016-08-16 15:47:45 3 [HttpClient$1] X-Permitted-Cross-Domain-Policies: none
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Length: 605
    2016-08-16 15:47:45 3 [HttpClient$1] Keep-Alive: timeout=5, max=99
    2016-08-16 15:47:45 3 [HttpClient$1] Connection: Keep-Alive
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-08-16 15:47:45 3 [HttpClient$1] 
    2016-08-16 15:47:45 3 [HttpClient$1] <?xml version="1.0"?>
    <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns">
     <d:response>
      <d:href>/remote.php/dav/principals/groups/admin/</d:href>
      <d:propstat>
       <d:prop>
        <card:addressbook-home-set>
         <d:href>/remote.php/dav/addressbooks/groups/admin/</d:href>
        </card:addressbook-home-set>
        <d:group-membership/>
       </d:prop>
       <d:status>HTTP/1.1 200 OK</d:status>
      </d:propstat>
     </d:response>
    </d:multistatus>
    
    2016-08-16 15:47:45 3 [HttpClient$1] <-- END HTTP (605-byte body)
    2016-08-16 15:47:45 3 [dav4android.DavResource] Received <response> for https://my_ip/remote.php/dav/principals/groups/admin/
    	PARAMETER #1 = [group-membership(DAV:): hrefs=[], addressbook-home-set(urn:ietf:params:xml:ns:carddav): hrefs=[/remote.php/dav/addressbooks/groups/admin/]]
    2016-08-16 15:47:45 3 [DavService$RefreshCollections] Listing home set https://my_ip/remote.php/dav/addressbooks/users/my_user_name/
    2016-08-16 15:47:45 3 [HttpClient$1] --> PROPFIND https://my_ip/remote.php/dav/addressbooks/users/my_user_name/ http/1.1
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-08-16 15:47:45 3 [HttpClient$1] Content-Length: 422
    2016-08-16 15:47:45 3 [HttpClient$1] Depth: 1
    2016-08-16 15:47:45 3 [HttpClient$1] 
    2016-08-16 15:47:45 3 [HttpClient$1] <?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><resourcetype /><current-user-privilege-set /><displayname /><CARD:addressbook-description /><CARD:supported-address-data /><CAL:calendar-description /><n0:calendar-color xmlns:n0="http://apple.com/ns/ical/" /><CAL:supported-calendar-component-set /></prop></propfind>
    2016-08-16 15:47:45 3 [HttpClient$1] --> END PROPFIND (422-byte body)
    2016-08-16 15:47:45 3 [dav4android.BasicDigestAuthHandler] Adding Basic authorization header for https://my_ip/remote.php/dav/addressbooks/users/my_user_name/
    2016-08-16 15:47:46 3 [HttpClient$1] <-- 207 Multi-Status https://my_ip/remote.php/dav/addressbooks/users/my_user_name/ (420ms)
    2016-08-16 15:47:46 3 [HttpClient$1] Date: Tue, 16 Aug 2016 13:47:45 GMT
    2016-08-16 15:47:46 3 [HttpClient$1] Server: Apache/2.2.22 (Debian)
    2016-08-16 15:47:46 3 [HttpClient$1] Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
    2016-08-16 15:47:46 3 [HttpClient$1] X-Powered-By: PHP/5.4.45-0+deb7u4
    2016-08-16 15:47:46 3 [HttpClient$1] Expires: Thu, 19 Nov 1981 08:52:00 GMT
    2016-08-16 15:47:46 3 [HttpClient$1] Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    2016-08-16 15:47:46 3 [HttpClient$1] Pragma: no-cache
    2016-08-16 15:47:46 3 [HttpClient$1] Content-Security-Policy: default-src 'none';
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_remember_login=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_remember_login=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc8241418ed0=8slbbadidpf8vrgbpgu851iog2; path=/; secure; HttpOnly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc8241418ed0=popbcj2scb30in1safs278q0i5; path=/; secure; HttpOnly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: cookie_test=test; expires=Tue, 16-Aug-2016 14:47:45 GMT
    2016-08-16 15:47:46 3 [HttpClient$1] Vary: Brief,Prefer
    2016-08-16 15:47:46 3 [HttpClient$1] DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendar-auto-schedule, calendarserver-subscribed, oc-resource-sharing, addressbook
    2016-08-16 15:47:46 3 [HttpClient$1] X-Content-Type-Options: nosniff
    2016-08-16 15:47:46 3 [HttpClient$1] X-XSS-Protection: 1; mode=block
    2016-08-16 15:47:46 3 [HttpClient$1] X-Robots-Tag: none
    2016-08-16 15:47:46 3 [HttpClient$1] X-Frame-Options: SAMEORIGIN
    2016-08-16 15:47:46 3 [HttpClient$1] X-Download-Options: noopen
    2016-08-16 15:47:46 3 [HttpClient$1] X-Permitted-Cross-Domain-Policies: none
    2016-08-16 15:47:46 3 [HttpClient$1] Content-Length: 3148
    2016-08-16 15:47:46 3 [HttpClient$1] Keep-Alive: timeout=5, max=98
    2016-08-16 15:47:46 3 [HttpClient$1] Connection: Keep-Alive
    2016-08-16 15:47:46 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-08-16 15:47:46 3 [HttpClient$1] 
    2016-08-16 15:47:46 3 [HttpClient$1] <?xml version="1.0"?>
    <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns">
     <d:response>
      <d:href>/remote.php/dav/addressbooks/users/my_user_name/</d:href>
      <d:propstat>
       <d:prop>
        <d:resourcetype>
         <d:collection/>
        </d:resourcetype>
        <d:current-user-privilege-set>
         <d:privilege>
          <d:write/>
         </d:privilege>
         <d:privilege>
          <d:write-acl/>
         </d:privilege>
         <d:privilege>
          <d:write-properties/>
         </d:privilege>
         <d:privilege>
          <d:write-content/>
         </d:privilege>
         <d:privilege>
          <d:bind/>
         </d:privilege>
         <d:privilege>
          <d:unbind/>
         </d:privilege>
         <d:privilege>
          <d:unlock/>
         </d:privilege>
         <d:privilege>
          <d:read/>
         </d:privilege>
         <d:privilege>
          <d:read-acl/>
         </d:privilege>
         <d:privilege>
          <d:read-current-user-privilege-set/>
         </d:privilege>
        </d:current-user-privilege-set>
       </d:prop>
       <d:status>HTTP/1.1 200 OK</d:status>
      </d:propstat>
      <d:propstat>
       <d:prop>
        <d:displayname/>
        <card:addressbook-description/>
        <card:supported-address-data/>
        <cal:calendar-description/>
        <x1:calendar-color xmlns:x1="http://apple.com/ns/ical/"/>
        <cal:supported-calendar-component-set/>
       </d:prop>
       <d:status>HTTP/1.1 404 Not Found</d:status>
      </d:propstat>
     </d:response>
     <d:response>
      <d:href>/remote.php/dav/addressbooks/users/my_user_name/contacts/</d:href>
      <d:propstat>
       <d:prop>
        <d:resourcetype>
         <d:collection/>
         <card:addressbook/>
        </d:resourcetype>
        <d:current-user-privilege-set>
         <d:privilege>
          <d:write/>
         </d:privilege>
         <d:privilege>
          <d:write-acl/>
         </d:privilege>
         <d:privilege>
          <d:write-properties/>
         </d:privilege>
         <d:privilege>
          <d:write-content/>
         </d:privilege>
         <d:privilege>
          <d:bind/>
         </d:privilege>
         <d:privilege>
          <d:unbind/>
         </d:privilege>
         <d:privilege>
          <d:unlock/>
         </d:privilege>
         <d:privilege>
          <d:read/>
         </d:privilege>
         <d:privilege>
          <d:read-acl/>
         </d:privilege>
         <d:privilege>
          <d:read-current-user-privilege-set/>
         </d:privilege>
        </d:current-user-privilege-set>
        <d:displayname>Contacts</d:displayname>
        <card:addressbook-description></card:addressbook-description>
        <card:supported-address-data>
         <card:address-data-type content-type="text/vcard" version="3.0"/>
         <card:address-data-type content-type="text/vcard" version="4.0"/>
         <card:address-data-type content-type="application/vcard+json" version="4.0"/>
        </card:supported-address-data>
       </d:prop>
       <d:status>HTTP/1.1 200 OK</d:status>
      </d:propstat>
      <d:propstat>
       <d:prop>
        <cal:calendar-description/>
        <x1:calendar-color xmlns:x1="http://apple.com/ns/ical/"/>
        <cal:supported-calendar-component-set/>
       </d:prop>
       <d:status>HTTP/1.1 404 Not Found</d:status>
      </d:propstat>
     </d:response>
    </d:multistatus>
    
    2016-08-16 15:47:46 3 [HttpClient$1] <-- END HTTP (3148-byte body)
    2016-08-16 15:47:46 3 [dav4android.DavResource] Received <response> for https://my_ip/remote.php/dav/addressbooks/users/my_user_name/
    	PARAMETER #1 = [displayname(DAV:): null, calendar-description(urn:ietf:params:xml:ns:caldav): null, addressbook-description(urn:ietf:params:xml:ns:carddav): null, current-user-privilege-set(DAV:): [read/write], calendar-color(http://apple.com/ns/ical/): null, supported-calendar-component-set(urn:ietf:params:xml:ns:caldav): null, resourcetype(DAV:): ResourceType(types=[collection(DAV:)]), supported-address-data(urn:ietf:params:xml:ns:carddav): null]
    2016-08-16 15:47:46 3 [dav4android.DavResource] Received <response> for https://my_ip/remote.php/dav/addressbooks/users/my_user_name/contacts/
    	PARAMETER #1 = [calendar-description(urn:ietf:params:xml:ns:caldav): null, calendar-color(http://apple.com/ns/ical/): null, current-user-privilege-set(DAV:): [read/write], resourcetype(DAV:): ResourceType(types=[collection(DAV:), addressbook(urn:ietf:params:xml:ns:carddav)]), displayname(DAV:): DisplayName(displayName=Contacts), supported-address-data(urn:ietf:params:xml:ns:carddav): at.bitfire.dav4android.property.SupportedAddressData@17267922, addressbook-description(urn:ietf:params:xml:ns:carddav): AddressbookDescription(description=null), supported-calendar-component-set(urn:ietf:params:xml:ns:caldav): null]
    2016-08-16 15:47:46 3 [DavService$RefreshCollections] Found collection
    	PARAMETER #1 = CollectionInfo(id=0, serviceID=null, type=ADDRESS_BOOK, url=https://my_ip/remote.php/dav/addressbooks/users/my_user_name/contacts/, readOnly=false, displayName=Contacts, description=null, color=null, timeZone=null, supportsVEVENT=null, supportsVTODO=null, selected=false, confirmed=true)
    2016-08-16 15:47:46 3 [DavService$RefreshCollections] Found collection
    	PARAMETER #1 = CollectionInfo(id=0, serviceID=null, type=null, url=https://my_ip/remote.php/dav/addressbooks/users/my_user_name/, readOnly=false, displayName=null, description=null, color=null, timeZone=null, supportsVEVENT=null, supportsVTODO=null, selected=false, confirmed=true)
    2016-08-16 15:47:46 3 [DavService$RefreshCollections] Listing home set https://my_ip/remote.php/dav/addressbooks/groups/admin/
    2016-08-16 15:47:46 3 [HttpClient$1] --> PROPFIND https://my_ip/remote.php/dav/addressbooks/groups/admin/ http/1.1
    2016-08-16 15:47:46 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-08-16 15:47:46 3 [HttpClient$1] Content-Length: 422
    2016-08-16 15:47:46 3 [HttpClient$1] Depth: 1
    2016-08-16 15:47:46 3 [HttpClient$1] 
    2016-08-16 15:47:46 3 [HttpClient$1] <?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><resourcetype /><current-user-privilege-set /><displayname /><CARD:addressbook-description /><CARD:supported-address-data /><CAL:calendar-description /><n0:calendar-color xmlns:n0="http://apple.com/ns/ical/" /><CAL:supported-calendar-component-set /></prop></propfind>
    2016-08-16 15:47:46 3 [HttpClient$1] --> END PROPFIND (422-byte body)
    2016-08-16 15:47:46 3 [dav4android.BasicDigestAuthHandler] Adding Basic authorization header for https://my_ip/remote.php/dav/addressbooks/groups/admin/
    2016-08-16 15:47:46 3 [HttpClient$1] <-- 404 Not Found https://my_ip/remote.php/dav/addressbooks/groups/admin/ (598ms)
    2016-08-16 15:47:46 3 [HttpClient$1] Date: Tue, 16 Aug 2016 13:47:46 GMT
    2016-08-16 15:47:46 3 [HttpClient$1] Server: Apache/2.2.22 (Debian)
    2016-08-16 15:47:46 3 [HttpClient$1] Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
    2016-08-16 15:47:46 3 [HttpClient$1] X-Powered-By: PHP/5.4.45-0+deb7u4
    2016-08-16 15:47:46 3 [HttpClient$1] Expires: Thu, 19 Nov 1981 08:52:00 GMT
    2016-08-16 15:47:46 3 [HttpClient$1] Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    2016-08-16 15:47:46 3 [HttpClient$1] Pragma: no-cache
    2016-08-16 15:47:46 3 [HttpClient$1] Content-Security-Policy: default-src 'none';
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_remember_login=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc_remember_login=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; secure; httponly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc8241418ed0=c0q0ifsccg4aubebkbo7v535a1; path=/; secure; HttpOnly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: oc8241418ed0=bsp7pacmp152rc3836q1jh7st5; path=/; secure; HttpOnly
    2016-08-16 15:47:46 3 [HttpClient$1] Set-Cookie: cookie_test=test; expires=Tue, 16-Aug-2016 14:47:46 GMT
    2016-08-16 15:47:46 3 [HttpClient$1] X-Content-Type-Options: nosniff
    2016-08-16 15:47:46 3 [HttpClient$1] X-XSS-Protection: 1; mode=block
    2016-08-16 15:47:46 3 [HttpClient$1] X-Robots-Tag: none
    2016-08-16 15:47:46 3 [HttpClient$1] X-Frame-Options: SAMEORIGIN
    2016-08-16 15:47:46 3 [HttpClient$1] X-Download-Options: noopen
    2016-08-16 15:47:46 3 [HttpClient$1] X-Permitted-Cross-Domain-Policies: none
    2016-08-16 15:47:46 3 [HttpClient$1] Content-Length: 232
    2016-08-16 15:47:46 3 [HttpClient$1] Keep-Alive: timeout=5, max=97
    2016-08-16 15:47:46 3 [HttpClient$1] Connection: Keep-Alive
    2016-08-16 15:47:46 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-08-16 15:47:46 3 [HttpClient$1] 
    2016-08-16 15:47:46 3 [HttpClient$1] <?xml version="1.0" encoding="utf-8"?>
    <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
      <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
      <s:message>File not found: groups in 'addressbooks'</s:message>
    </d:error>
    
    2016-08-16 15:47:46 3 [HttpClient$1] <-- END HTTP (232-byte body)
    2016-08-16 15:47:46 3 [DavService$RefreshCollections] Saving collection
    	PARAMETER #1 = description=null displayName=Contacts sync=1 timezone=null color=null readOnly=0 url=https://my_ip/remote.php/dav/addressbooks/users/my_user_name/contacts/
    

  • developer

    Hello,

    Thanks for your report. Please provide steps to reproduce, debug info and verbose logs of the synchronization (not the resource detection).



  • steps:

    1. installed davdroid from f-droid.
    2. apps - permission --> all granted
    3. added my account: url, username, password
    4. verified account has been added
    5. added all contacts/calendars to sync
    6. connected over my vpn with openvpn
    7. enabled miui sync button
    8. pushed "sync now", just to force)
    9. google & aCalDav sync, DavDroid not. Even after hours...

    log is in the first post.

    debug info ("ip" is my numerical ip, "my_username" is my name):

    SOFTWARE INFORMATION
    DAVdroid version: 1.2.3-ose (112) Fri Aug 12 08:14:08 CEST 2016
    Installed from: org.fdroid.fdroid
    JB Workaround installed: no
    
    CONFIGURATION
    System-wide synchronization: manually
    Account: my_username.owncloud
    Address book sync. interval: 240 min
    Calendar sync. interval: 240 min
    OpenTasks sync. interval: —
    WiFi only: false
    [CardDAV] Contact group method: GROUP_VCARDS
    RFC 6868 encoding: true
    [CalDAV] Time range (past days): 90
    Manage calendar colors: true
    
    SQLITE DUMP
    android_metadata
    | locale |
    | it_IT |
    ----------
    settings
    | setting | value |
    | hint_OpenTasksNotInstalled | 0 |
    | logToExternalStorage | 1 |
    ----------
    services
    | _id | accountName | service | principal |
    | 1 | my_username.owncloud | carddav | https://ip/remote.php/dav/principals/users/my_username/ |
    | 2 | my_username.owncloud | caldav | https://ip/remote.php/dav/principals/users/my_username/ |
    ----------
    sqlite_sequence
    | name | seq |
    | services | 2 |
    | homesets | 3 |
    | collections | 7 |
    ----------
    homesets
    | _id | serviceID | url |
    | 1 | 2 | https://ip/remote.php/dav/calendars/my_username/ |
    | 3 | 1 | https://ip/remote.php/dav/addressbooks/users/my_username/ |
    ----------
    collections
    | _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
    | 1 | 2 | https://ip/remote.php/dav/calendars/my_username/contact_birthdays/ | 1 | Contact birthdays | <null> | -54 | <null> | 1 | 1 | 1 |
    | 2 | 2 | https://ip/remote.php/dav/calendars/my_username/i/ | 0 | i | i | -4989844 | <null> | 1 | 1 | 1 |
    | 3 | 2 | https://ip/remote.php/dav/calendars/my_username/d/ | 0 | d | d | -32944 | <null> | 1 | 1 | 1 |
    | 4 | 2 | https://ip/remote.php/dav/calendars/my_username/work/ | 0 | work | <null> | -8638004 | <null> | 1 | 1 | 1 |
    | 5 | 2 | https://ip/remote.php/dav/calendars/my_username/defaultcalendar/ | 0 | calendario | calendario | -6306073 | <null> | 1 | 1 | 1 |
    | 7 | 1 | https://ip/remote.php/dav/addressbooks/users/my_username/contacts/ | 0 | Contacts | <null> | <null> | <null> | <null> | <null> | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 5.1.1 (LMY47V)
    Device: Xiaomi Mi-4c (libra)
    

  • developer

    System-wide synchronization: manually

    Auto-sync is disabled for the whole system. Don't know where the option is for your device. Often there's a Sync on/off button in the top system bar, and it should be in Android Settings / Accounts / Synchronize data automatically or something like that.

    Please try with enabled sync for your device.



  • Of course. As you can read at step 7 of previous post I enabled the auto-sync android button. In fact everything syncs except DavDroid


  • developer

    @fastidio Then I don't have any idea. Synchronization is not triggered by DAVdroid, but DAVdroid is only called by the system. What happens if you go into the DAVdroid account in Android settings / Accounts? Can you force synchronization there?

    Maybe some of Miui's privacy settings, see no calendars visible, no bugs, no notifications?



  • I solved.
    DavDroid must be enabled as startup app under

    security>permissions>autostart


  • developer

    @fastidio Thanks for sharing your solution. (Whatever a "startup app" is; DAVdroid doesn't require any autostart permissions because it's launched by Android for synchronization.)



  • well, I understand... you should discuss it with miui developers...



  • Just want to confirm that enabling DavDroid as autostart app resolves this problem for me as well. Prior to doing so, I saw this in the adb logs. I don't know if this is related though.

    E/SyncManager( 1056): Bind attempt failed - target: ComponentInfo{at.bitfire.davdroid/at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService}
    

  • developer

    I have created a new FAQ: How do I enable DAVdroid synchronization on Xiaomi MIUI?

    We do not have a MIUI device, so would it be possible that you post a screenshot of the Security / Permissions / Autostart activity so that we can add it to the FAQ article?



  • 0_1476463136730_Screenshot_2016-10-14-17-39-17-274_com.miui.securitycenter.png
    Open 'Security', select 'Permissions'.
    0_1476463248358_Screenshot_2016-10-14-17-39-24-167_com.miui.securitycenter.png
    Select Autostart.
    0_1476463318076_Screenshot_2016-10-14-17-41-47-193_com.miui.securitycenter.png
    Toggle autostart on for desired app(s). I found that I needed to do the same thing with OpenTasks for tasks synchronization to work.

    Battery settings:
    0_1476463509209_copyScreenshot_2016-10-14-17-43-41-701_com.android.settings.png
    Swipe down from top of screen and select cog, search for battery, select 'Manage apps battery usage'.
    0_1476463551379_Screenshot_2016-10-14-17-43-49-533_com.miui.powerkeeper.png
    Select 'choose apps'
    0_1476463613566_Screenshot_2016-10-14-17-44-12-392_com.miui.powerkeeper.png
    Select desired app(s).
    0_1476463680398_Screenshot_2016-10-14-18-47-43-538_com.miui.powerkeeper.png
    And set 'no restrictions'.


  • admin

    Thanks to a very nice person we met at Nextcloud conf 2017 we were able to personally take some important screenshots from a Xiaomi device and managed to find out what you need to do to get DAVdroid working with Xiaomi devices. Please have a look at these screenshots and on the colorized sections (stuff that belongs together is colored (orange, blue and pink) the same way).

    2_1504271485790_0.png
    1_1504271485790_1.png
    4_1504271485790_2.png
    0_1504271485790_3.png
    5_1504271485790_4.png
    9_1504271485790_5.png
    10_1504271485790_6.png
    8_1504271485790_7.png
    6_1504271485790_8.png
    3_1504271485790_9.png
    7_1504271485790_10.png

    Don't forget to also remove your battery restrictions (if you want DAVdroid to sync automatically):

    2_1504272342564_a.png
    3_1504272342564_b.png
    1_1504272342564_c.png
    0_1504272342564_d.png


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.