Cannot sync with local server without internet connection



  • Hello,

    I am temporily running a Nextcloud server in a network without internet connection. (Had some security concerns that I am investigating right now)
    I am accessing that server through an URL that is resolved inside the hosts file.
    I can access the Nextcloud server using a browser or the nextcloud app from my phone.
    I can access the calendars and contacts as soon as i activate internet connection for that network.
    DAVx5 tells me without internet connection it will not even try to sync.
    I can tell that the hosts entry is correctly resolved to a local IP with working internet connection from the logs.
    Screenshot no connection

    Is there a way to force DAVx5 to sync anyway?

    Thanks in advance for your kind help!
    Best regards!


  • developer

    Hi,

    @igordashaar said in Cannot sync with local server without internet connection:

    DAVx5 tells me without internet connection it will not even try to sync.

    Synchronization is not managed by DAVx⁵, but by the Android sync framework. Android won’t start synchronization (= call the DAVx⁵ sync adapter) without Internet access.

    Is there a way to force DAVx5 to sync anyway?

    As far as I know – no.

    Maybe it’s a solution to provide Internet access, but restrict it with a firewall (if you had security concerns)?



  • Hi,

    thanks for your answer.
    As discussed here there seems no easy way to force sync (without modifications in android itself).
    I will try your suggestion regarding the firewall rule.



  • @rfc2822 said in Cannot sync with local server without internet connection:

    Android won’t start synchronization (= call the DAVx⁵ sync adapter) without Internet access.

    OH COME ON!!! why is it so bloody hard to do ANYTHING with a properly air gaped device? There has to be a way around this! I should NOT need to connect to the internet at large in order to sync my tablet to a nextcloud hosted on a LAN.

    Is there a way I can trick my tablet into thinking its connecting to the internet? Is there a way I can use another caldav app that does not rely on andoirds sync service? there has to be a way around this without me rooting my tablet.```
    Insert Code Here



  • @rfc2822 I’m not a developer but wouldn’t this be a possible way to go:

    https://stackoverflow.com/questions/9044279/syncadapter-without-internet-connection



  • @j-ed the only solution I see in that stackoverflow post involves modyfiying AOSP. I am a script kiddy, not a developer. I should not have to build my own custom version of android to sync calendar events locally.


  • developer

    @jekoven464 said in Cannot sync with local server without internet connection:

    @j-ed the only solution I see in that stackoverflow post involves modyfiying AOSP. I am a script kiddy, not a developer. I should not have to build my own custom version of android to sync calendar events locally.

    What about giving Internet access to your device and using a firewall to restrict traffic?

    DAVx⁵ is designed for the Android sync framework, which requires an Internet connection. Synchronizing without ever having Internet access is a special requirement, which is covered by the design goal of DAVx⁵ . Note that you can of course synchronize in the local network, but you need “Internet” to make the Android sync framework work.

    By the way, this does not only affect DAVx5, but all apps which use the sync framework, including the Android email app, Firefox (Firefox Sync uses the sync framework), messengers (contact lists are synced over the sync framework) and probably much more.


Log in to reply
 

Similar topics