diff --git a/File-Manager-and-Sync.md b/File-Manager-and-Sync.md index 4701b8a..2393f48 100644 --- a/File-Manager-and-Sync.md +++ b/File-Manager-and-Sync.md @@ -4,6 +4,33 @@ The **KeePassDX** app uses your device's external file managers and the [*storag You should see KeePassDX as a file editor and not a file manager. Links in the list of recent databases are only quick references to access historic links provides by the external file app used to open your database file. +# Native synchronization + +Native synchronization of KeePass files makes it possible to update the data of the same file opened and modified from two places at the same time. +Synchronization can therefore be seen as a two-step action: + - **Data recovery from a predefined shared location.** It is not up to KeePassDX to handle this step, because the architecture of the Android system is built in such a way that a dedicated application manages to send and receive the files and then propose them through a [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier). Here, KeePassDX is only an editor and many people blame it when most of the file synchronization problems are caused by the cloud application used because it doesn't handle file conflicts or has caching problems. See the [table below](https://github.com/Kunzisoft/KeePassDX/wiki/File-Manager-and-Sync#compatibility) for more explanations. **_The creation of a new file app fully compatible with open protocols and cloud clients is under study. (Dedicated app sync project : https://github.com/Kunzisoft/FileSync)_** + - **The merge of the updated data.** When the URI provides new data, KeePassDX will be able to merge with the currently open data and the retrieved data. _(from version 3.2.0)_ + +For more information on data merge: https://github.com/Kunzisoft/KeePassDX/issues/840 +For more information on why not to integrate directly the Cloud APIs: https://github.com/Kunzisoft/KeePassDX/issues/342 + +## Save, Merge and Reload + +There are 3 commands in KeePassDX to manage the synchronization : + - **Save data** : As the name suggests, it allows you to save the local data of the open database in the open data stream from its URI. This is the conventional method used to update the data on the reference medium. + - **Merge data** : Retrieves the data from the URI and merges it with the local data. _Please note that this method does not automatically save the database even if the automatic database save setting is enabled. You will have to save the database manually after a merge if that is what you want._ + - **Reload data** : Retrieves data from the URI and deletes local data. Use this method if you want to reset the data in your database with the data in the storage medium. + +*If external modifications are made to the data linked to the URI, a warning message will alert you. But it is possible that this warning message is not displayed because the event has not been correctly sent, in this case, you just have to make a merge or reload the data.* + +## Synchronization application + +In addition, there are applications that synchronize files on a continuous basis. This allows you to retrieve and send files transparently in the background when a file is updated. Very useful if your file manager does not have this feature. + +| Sync app | Pros | Cons | Officially tested +| --- | --- | --- | --- | +| [Syncthing](https://play.google.com/store/apps/details?id=com.nutomic.syncthingandroid) | Widely used open source application that allows decentralized synchronization. _Warning: some users have noticed corruptions when Syncthing was synchronized at the same time as a data save because the URI stream is cuts by the sync. Please make sure that the two actions are not done at the same time, you can disable the automatic save and remember to make regular manual backups._ Tutorial : https://peterbabic.dev/blog/sync-keepass-passwords-between-computer-phone/ | - | No + # Compatibility KeePassDX communicates with a separate file manager, or cloud clients that can be online or offline, the goal is to encapsulate the components, in the philosophy of Open Source software with the best security possible. @@ -68,29 +95,3 @@ By making a simple click on the `OPEN EXISTING DATABASE` button, you make a requ By making a long click on the `OPEN EXISTING DATABASE` button, you are requesting an `ACTION_GET_CONTENT` intent. **Important : Since Android 11, third-party apps can no longer be the client for requests to open and create files, so only the default "Files" app is usable and the "Intent action" section with [ACTION_OPEN_DOCUMENT](https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT) and [ACTION_CREATE_DOCUMENT](https://developer.android.com/reference/android/content/Intent#ACTION_CREATE_DOCUMENT) is no longer relevant. You will have to either go through the third party app directly, or go through its implementation in "Files" already integrated in your device. https://developer.android.com/about/versions/11/privacy/storage** - -# Native synchronization - -Native synchronization of KeePass files makes it possible to update the data of the same file opened and modified from two places at the same time. -Synchronization can therefore be seen as a two-step action: - - **Data recovery from a predefined shared location.** It is not up to KeePassDX to handle this step, because the architecture of the Android system is built in such a way that a dedicated application manages to send and receive the files and then propose them through a URI. Here, KeePassDX is only an editor compared to its computer counterpart. *The creation of a new file app fully compatible with open protocols and cloud clients is under study.* - - **The merge of the updated data.** When the URI provides new data, KeePassDX will be able to merge with the currently open data and the retrieved data. - -For more information on data merge: https://github.com/Kunzisoft/KeePassDX/issues/840 - -## Save, Merge and Reload - -There are 3 commands in KeePassDX to manage the synchronization : - - **Save data** : As the name suggests, it allows you to save the local data of the open database in the open data stream from its URI. This is the conventional method used to update the data on the reference medium. - - **Merge data** : Retrieves the data from the URI and merges it with the local data. _Please note that this method does not automatically save the database even if the automatic database save setting is enabled. You will have to save the database manually after a merge if that is what you want._ - - **Reload data** : Retrieves data from the URI and deletes local data. Use this method if you want to reset the data in your database with the data in the storage medium. - -*If external modifications are made to the data linked to the URI, a warning message will alert you. But it is possible that this warning message is not displayed because the event has not been correctly sent, in this case, you just have to make a merge or reload the data.* - -## Synchronization application - -In addition, there are applications that synchronize files on a continuous basis. This allows you to retrieve and send files transparently in the background when a file is updated. Very useful if your file manager does not have this feature. - -| Sync app | Pros | Cons | Officially tested -| --- | --- | --- | --- | -| [Syncthing](https://play.google.com/store/apps/details?id=com.nutomic.syncthingandroid) | Widely used open source application that allows decentralized synchronization. _Warning: some users have noticed corruptions when Syncthing was synchronized at the same time as a data save because the URI stream is cuts by the sync. Please make sure that the two actions are not done at the same time, you can disable the automatic save and remember to make regular manual backups._ Tutorial : https://peterbabic.dev/blog/sync-keepass-passwords-between-computer-phone/ | - | No \ No newline at end of file