Accounts may disappear with DAVdroid on mountable storage



  • On my Fairphone (Android 4.2.2), storage space is split into a smaller "Internal" and larger "Phone" section. The content of "Phone" storage is mountable as a USB drive.

    The issue is that all accounts disappear when DAVdroid is kept on "Phone" storage and I mount the phone as a USB disk. This does not happen if DAVdroid is kept on "Internal" storage.



  • This is bug in Android, and it is not DAVdroid specific.

    You have to install DAVdroid into the internal memory. DAVdroid should not allow installation anywhere else (if it does, it is a bug).

    It also happens when you reboot into "rescue" mode, where all user-installed apps are ignored. You loose all account data instantly. If you have your device rooted, put DAVdroid APK into /system/app. Android will handle newer versions correctly (just like any other upgrade), but it will prevent accounts from disappearing (you will only use older version for a while).

    Note that this means user will loose all data created since last sync. It happened to me when we were traveling around the Corsica (with Cal/CardDAV-Sync, not DAVdroid, but it does not matter) and I lost calendar entries created in last 3 days, including some bus schedules and planned routes for next week. It also meant I could not access my addressbook for next two days until I found some cafe with wifi hotspot and synced old data back. And what was the trigger? We were in hurry to catch a bus in the morning, so I let my phone to boot up in my pocket and menu key got pressed in bad moment, which made my phone to boot into rescue mode... Awsome experience.



  • This should probably be mentioned on the website somewhere.


  • developer

    You have to install DAVdroid into the internal memory. DAVdroid should not allow installation anywhere else (if it does, it is a bug).

    http://developer.android.com/guide/topics/data/install-location.html#ShouldNot
    »If your application uses any of the features [including Sync Adapters] listed above, you should not allow your application to install on external storage. By default, the system will not allow your application to install on the external storage, so you don't need to worry about your existing applications. However, if you're certain that your application should never be installed on the external storage, then you should make this clear by declaring android:installLocation with a value of "internalOnly". Though this does not change the default behavior, it explicitly states that your application should only be installed on the internal storage and serves as a reminder to you and other developers that this decision has been made.«

    DAVdroid doesn't set anything, so at the moment, it's not allowed to be installed on the external storage (the button for it is disabled on my device as it should be). @7adietri How could you move the app to the external storage?

    @jkufner Indeed a strange experience, but I guess it's not an application problem but an Android problem. So I'll label this issue as "third-party bug".



  • I was able to move it in "Settings > Apps" previously, but now the button is disabled. Strange.


Log in to reply
 

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