This project has moved and is read-only. For the latest updates, please go here.

Local files treated as remote

Oct 10, 2016 at 8:16 PM
Edited Nov 18, 2016 at 10:34 AM
Hello. I've previously used Keepass2Android on an Android 2.3 phone and have recently made the leap to Android 6.0 (quite a jump) on a new phone. I've noticed a change in how local databases are handled.

Previously, if I opened a kdbx file on my old phone from SD card, I could see from the filename it was using, for example, /mnt/sdcard/Passwords/Passwords.kdbx.

Now, on my new phone, I open the database using Open File, System File Picker, Internal storage (I'm using internal storage rather than a real SD card, but I assume that would be the same) and pick the file. It opens OK, but it looks as if KP2A is treating it as a remote file.

For example, a toast appears saying the "Remote file and cache are synchronised", the filename appears as content://Passwords.kdbx, there are Synchronize Database and Work Offline menu entries, and in Database Settings the entry "Import database to internal folder" (which says it is "Only available for local files") is greyed out. I'm assuming all of these things are what would be the case if I had opened the file from Dropbox or whatever, although I don't use that.

I know that file handling in Android has changed a lot in recent versions, so is this just one of those things, and can't be changed?
Oct 15, 2016 at 5:58 PM
I have got the same problem, I just opened the file from /storage/emulated/0/. Is there any possibility to sync the changes back? I don't want to use any proprietary cloud provider wuth limited storage quota, I prefer to use local files (or Syncthing). At the moment, you can't sync changes to the database back on Android, all changes are only saved in the (normally) inaccessible temporary file. Thank you for your wonderful work!
Nov 7, 2016 at 10:02 AM
@JohnVeness: KP2A does not see if you selected a local file or a file from Google Drive (or any other Cloud provider available in the system file picker). If it's the only file you are opening, you can disable caching of database files in the app settings.
@conrad_heimbold: did you use system file picker. it should then automatically write to that file.
Nov 18, 2016 at 10:37 AM
I actually have three password databases that I open regularly (personal one, one for work, and one shared with my wife). Does that mean I cannot disable caching? Is there no way to open a local file directly in Syncthing rather than using the System File Picker? I think the main things I'm worried about is whether changes to the database are written back to the "normal" file, and the confusion in the user interface.

Like conrad_heimbold I also want to use Syncthing to synchronise my password databases. I haven't actually tested to see how Keepass2Android deals with writing back to the file when the database closes.
Sep 5 at 10:07 PM
I'm trying to use Keepass2Android
K2A can only see the download folder - surely I'm doing something wrong.

Is there a comprehensive guide to saving and syncing files?