DavDroid ( 195 ose) does not sync on Xiaomi4 Android7



  • I have new mobile Xiaomi 4, android 7, and ( mostly dead but still working ) old one, THL5000 Android4.4

    Davdroid ( 173 ose ) on old mobile works ... it crashes during sync, but sync working ( Owncloud 7 on http and OC 8 on https( self signed cetrificate ) , both are my servers, Opensuse, Apache ). I never start to found why sync crashes, because .. it works.

    On new mobile, DD connect, show me addressbooks on both servers, ask me if I prove cert, then does sync - no error reported, but no contacts synced.

    Also there are no created account in mobile ( if I try add contact, I can select if that contact wanna place to google account or xiaomi, no davdroid account appears. At new mobile I try current version 192 ose, and because described problem I try uninstall and install older, 172 ose, but problem remains.

    I am sorry, my English is not best. I Believe you understand my "English" 🙂

    DD has in new mobile all authorisations, I can see it in log .. all.
    This debug log is from connection to only LAN https OC8.

    --- BEGIN DEBUG INFO ---
    
    SOFTWARE INFORMATION
    Package: at.bitfire.davdroid
    Version: 1.7.3-ose (167) from 12. 9. 2017
    Installed from: com.google.android.packageinstaller
    JB Workaround installed: no
    
    CONNECTIVITY (at the moment)
    Active connection: WiFi, CONNECTED
    
    CONFIGURATION
    Power saving disabled: no
    android.permission.READ_CONTACTS permission: granted
    android.permission.WRITE_CONTACTS permission: granted
    android.permission.READ_CALENDAR permission: granted
    android.permission.WRITE_CALENDAR permission: granted
    org.dmfs.permission.READ_TASKS permission: granted
    org.dmfs.permission.WRITE_TASKS permission: granted
    System-wide synchronization: manually
    Account: contacts@server.doma
      Address book sync. interval: manually
      Calendar     sync. interval: —
      OpenTasks    sync. interval: —
      WiFi only: false
      [CardDAV] Contact group method: GROUP_VCARDS
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
    
    SQLITE DUMP
    android_metadata
        |  locale |
        |  cs_CZ |
    ----------
    settings
        |  setting | value |
        |  hint_BatteryOptimizations | 0 |
        |  logToExternalStorage | 1 |
        |  time_nextDonationPopup | 1515964437744 |
    ----------
    services
        |  _id | accountName | service | principal |
        |  3 | contacts@server.doma | carddav | https://server.doma/cloudik/remote.php/carddav/principals/milan/ |
    ----------
    sqlite_sequence
        |  name | seq |
        |  services | 3 |
        |  homesets | 7 |
        |  collections | 15 |
    ----------
    homesets
        |  _id | serviceID | url |
        |  7 | 3 | https://server.doma/cloudik/remote.php/carddav/addressbooks/milan/ |
    ----------
    collections
        |  _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
        |  14 | 3 | https://server.doma/cloudik/remote.php/carddav/addressbooks/milan/contacts/ | 0 | Contacts | <null> | <null> | <null> | 0 | 0 | 0 |
        |  15 | 3 | https://server.doma/cloudik/remote.php/carddav/addressbooks/milan/soukrome/ | 0 | soukrome | <null> | <null> | <null> | 0 | 0 | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 7.0 (AL1512-mido-build-20171113213139)
    Device: Xiaomi Redmi Note 4 (mido)
    
    --- END DEBUG INFO ---
    

    Today I uninstall and install new ( 195 ose ), first turn on debug and then try to create account. Same behavior.

    --- BEGIN DEBUG INFO ---
    
    SOFTWARE INFORMATION
    Package: at.bitfire.davdroid
    Version: 1.9.7-ose (195) from 24. 12. 2017
    Installed from: com.google.android.packageinstaller
    JB Workaround installed: no
    
    CONNECTIVITY (at the moment)
    Active connection: WiFi, CONNECTED
    
    CONFIGURATION
    Power saving disabled: no
    android.permission.READ_CONTACTS permission: granted
    android.permission.WRITE_CONTACTS permission: granted
    android.permission.READ_CALENDAR permission: denied
    android.permission.WRITE_CALENDAR permission: denied
    org.dmfs.permission.READ_TASKS permission: denied
    org.dmfs.permission.WRITE_TASKS permission: denied
    System-wide synchronization: manually
    Account: milan
      Address book sync. interval: 240 min
      Calendar     sync. interval: —
      OpenTasks    sync. interval: —
      WiFi only: false
      [CardDAV] Contact group method: CATEGORIES
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  cs_CZ |
    ----------
    services
    	|  _id | accountName | service | principal |
    	|  1 | milan | carddav | https://server.doma/cloudik/remote.php/carddav/principals/milan/ |
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  services | 1 |
    	|  homesets | 1 |
    	|  collections | 2 |
    ----------
    homesets
    	|  _id | serviceID | url |
    	|  1 | 1 | https://server.doma/cloudik/remote.php/carddav/addressbooks/milan/ |
    ----------
    collections
    	|  _id | serviceID | type | url | readOnly | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | source | sync |
    	|  1 | 1 | ADDRESS_BOOK | https://server.doma/cloudik/remote.php/carddav/addressbooks/milan/contacts/ | 0 | 0 | Contacts | <null> | <null> | <null> | 0 | 0 | <null> | 0 |
    	|  2 | 1 | ADDRESS_BOOK | https://server.doma/cloudik/remote.php/carddav/addressbooks/milan/soukrome/ | 0 | 0 | soukrome | <null> | <null> | <null> | 0 | 0 | <null> | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 7.0 (AL1512-mido-build-20171113213139)
    Device: Xiaomi Redmi Note 4 (mido)
    
    --- END DEBUG INFO ---
    

  • developer

    Hello,

    Did you try https://www.davdroid.com/faq/automatic-synchronization-is-not-run-as-expected/, especially the Autostart things?



  • Hi,
    Thanks for your reply ... is your hint valid if I decide only manual sync ? I have about 400 contacts and these are changing maybe one-two of them per month.

    In log is also visible automatic sync is off..



  • ehm ... it is really iteresting ... I turn on these permissions (as you wrote), and now contacts are really synced ... ( now I'm on other server than I wrote topic, but sync does not work on both of them ).

    Thanks ....


  • developer

    @uhrak said in DavDroid ( 195 ose) does not sync on Xiaomi4 Android7:

    ehm ... it is really iteresting ... I turn on these permissions (as you wrote), and now contacts are really synced ... ( now I'm on other server than I wrote topic, but sync does not work on both of them ).

    When I look at the sync column:

    collections
    	|  _id | serviceID | type | url | readOnly | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | source | sync |
    	|  1 | 1 | ADDRESS_BOOK | https://server.doma/cloudik/remote.php/carddav/addressbooks/milan/contacts/ | 0 | 0 | Contacts | <null> | <null> | <null> | 0 | 0 | <null> | 0 |
    	|  2 | 1 | ADDRESS_BOOK | https://server.doma/cloudik/remote.php/carddav/addressbooks/milan/soukrome/ | 0 | 0 | soukrome | <null> | <null> | <null> | 0 | 0 | <null> | 1 |
    

    it seems that only one address book ("Contacts") is selected in the DAVdroid account, so only this one will be synchronized. If you want "soukrome" to be synchronized, too, you have to select it in the DAVdroid account.



  • Hi,
    yes, this is understandable ... ( although contacts are OFF and Soukrome ( i.e. 'private' at English ) is ON ) ... But I have two separate servers 'in my hands' as I mentioned in topic ... and topic was opened with logs only from one of them.

    Because that server is LAN only ( at my home ) and I'm at my office now ( where is second server) , I was tried to create another account now ( which was also many times created when I try other versions DavDroid without success ) .

    With auto-start ( and other things from your hint ) creating addressbook and sync them with server was successfully.

    I am convinced that with this setting, my home server will also sync.

    Thank you very much. Now I must activate my PayPal ..

    Milan