This morning I woke up and the problem presented itself once more.
I happened on this post which describes a problem very similar to mine.
The failure to synchronise might be due to the fact that Android tries to reach Google but fails due to the fact that I am located in China behind the Great Firewall. As a consequence, it assumes I’m offline, thus killing the synchronisation.
The solution is stopping Android from trying to reach Google. To do so on an Android 9 device with SELinux set as enforcing it is needed:
- Open Termux with root access:
$ su
- Set SELinux as “permissive” for the current Termux session:
# enforcing 0
Then there are two options. First, disable the check altogether with:
# settings put global captive_portal_mode 0
The second option is to have Android ping the right servers (i.e. not blocked by the GFW):
# settings put global captive_portal_server g.cn
After a reboot, the WiFi symbol should lose the annoying “x” on it and DAVx5 should be able to sync again.
Now I’ll test again tomorrow in case I’m completely wrong.