Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.51k stars 267 forks source link

Intent to trigger a merge #1569

Open Offerel opened 1 year ago

Offerel commented 1 year ago

I have some questions which came up lastly. Hopefully someone can explain it better to me. First I sync my database via FoldeSync app with a WebDAV share. This works fine so far. But i sync the db and the file will be overwrite, when the online version is newer. This is fine for most cases. But what is, when there is a unsynced local change? I fear that this is lost. I have seen that Keepassdx can merge a db. Can I trigger a merge, instead of overwrite the file? Maybe with Tasker? Im using Tasker already to detect app start and trigger a sync at this.

J-Jamet commented 1 year ago

I'm not familiar with the FoldeSync app so I can't help on this point, but the KeePassDX triggers are very simple: If the metadata of the URI used to open the file is updated while a file is open in KeePassDX, a window is displayed indicating that a merge can be performed. Alternatively, you can select another file to merge manually into the open database if your synchronization application creates another file. Unfortunately, you can't perform an automatic merge for now, but it's a feature worth considering.

Offerel commented 1 year ago

Maybe we can solve this by sending an INTENT action to KeePassDX, which merges file a) with file b) (assuming they have the same credentials, keyfile and so on). On the other hand, in KeePassXC, a separate command-line application can be used for this. I don't know, if a similar approach is possible on Android. If yes, this could be a good alternative instead of sending an INTENT. Maybe together with some sort of File Watcher. But I'm not a Android Coder, this is completely up to you.

If you need someone to test some approaches, feel free to ask...

J-Jamet commented 1 year ago

Yes, it's a good approach but I won't be able to test it right now by lack of time. It's the idea I also had in mind for creating the separate file manager and managing external synchronization.

Offerel commented 1 year ago

If you want, you can send me a test apk file, so I can do the testing part. Before I worked as a sysadmin, I was a Software tester, so this should be a simple task. If you have some standard regression testcases, I can do them to.