This project has moved. For the latest updates, please go here.

Syncing and use when no Internet available

Apr 3, 2013 at 11:52 PM
I have two questions.
  1. When using the ONLINE version of Keepass2Android, is a local copy of the database kept so that no active Internet connection is required?
  2. When using the OFFLINE version of K2A and storing the .kdbx in a Dropbox folder, does the sync require resending the entire file each time a change is made?
Coordinator
Apr 4, 2013 at 2:12 PM
1.) currently not, but I am expecting this feature to be available in a few weeks. (However, I believe that most people only require their stored passwords when being online.)
2.) I guess yes. This results from the Keepass file format. Being an encrypted file pretty much leads to complete changes of the file contents when a change is made. You might want to take a look at EncFS if you want to store different encrypted files like images.
Apr 5, 2013 at 1:01 AM
PhilippC wrote:
1.) currently not, but I am expecting this feature to be available in a few weeks. (However, I believe that most people only require their stored passwords when being online.)
Actually, I use a Palm password database right now to store logins and passwords for devices on client networks, and I need to be able to look up (for example) the admin login to a client's router or the login to their network server.

When you add this feature, will that be transparent to users, or will we have to enable it in a settings dialog somewhere?
2.) I guess yes. This results from the Keepass file format. Being an encrypted file pretty much leads to complete changes of the file contents when a change is made. You might want to take a look at EncFS if you want to store different encrypted files like images.
Ok, thanks.

I see that Keepass2 for Windows supports multiple simultaneous users.
Synchronization - KeePass: http://keepass.info/help/v2/sync.html
KeePass 2.x features a powerful, built-in synchronization mechanism. Changes made in multiple copies of a database file can be merged safely.
After synchronizing two files A and B, both A and B are up-to-date (i.e. KeePass saves the merged data to both locations when performing a synchronization).

Requirements.
If the files to be synchronized are accessible via a protocol that KeePass supports by default (e.g. files on a local hard disk or a network share,
FTP, HTTP/WebDAV, ..., see the page Loading/Saving From/To URL for details), then no plugins/extensions are required.
Is this also true of Keepass2Android Online? Will it synch automagically with an FTP location the same way Keepass2 Windows does?
Coordinator
Apr 5, 2013 at 6:51 AM
yeah, I know there are some cases where it makes sense (which is why I am planning to have offline copies).

The sync feature is currently not implemented. I might take a look at it when I add the offline cache (but maybe the first version has read-only access at the files when being offline).
Apr 5, 2013 at 4:58 PM
PhilippC wrote:
yeah, I know there are some cases where it makes sense (which is why I am planning to have offline copies).
Great. Now here's an idea which might or might not make sense: allow users to load DIFFERENT kdbx files at different times. For example, when I'm at client X I would be able to load ClientX.kdbx, and when I'm at my office I could load MyCompany.kdbx. This would be very useful in that clients would have access to the same password database I use, yet I would be able to segregate my own passwords. Or is this already possible?
The sync feature is currently not implemented. I might take a look at it when I add the offline cache (but maybe the first version has read-only access at the files when being offline).
Sync is essential IMHO.
Coordinator
Apr 7, 2013 at 4:41 AM
Now here's an idea which might or might not make sense: allow users to load DIFFERENT kdbx files at different times. For example, when I'm at client X I would be able to load ClientX.kdbx, and when I'm at my office I could load MyCompany.kdbx. This would be very useful in that clients would have access to the same password database I use, yet I would be able to segregate my own passwords. Or is this already possible?
loading different files is already possible: after fully locking your database (red button on QuickUnlock screen) you are in the file select screen where you can select previously opened files or other files!
Apr 30, 2013 at 7:40 AM
Edited Apr 30, 2013 at 7:41 AM
CodeGApps wrote:
When using the OFFLINE version of K2A and storing the .kdbx in a Dropbox folder, does the sync require resending the entire file each time a change is made?
The Windows version of Dropbox uses a feature called delta sync (http://serverfault.com/questions/52861/how-does-dropbox-version-upload-large-files).
I don't know if the Android version also supports this. If yes then not the whole file is reuploaded but only the small changed part(s). But maybe for this to work the file must exceed a certain size and the keepass files may be too small.
Aug 3, 2013 at 8:51 PM
I'm extremely interested in the feature that would cache the file for offline use (and I'd be perfectly happy for it to be read-only when offline).

I would be very happy to donate some money for that feature - especially if it's implemented during august... (going away for all of September, and would really like to be able to access my passwords while offline...)

You said "I am expecting this feature to be available in a few weeks." in early April. Did you get any problems implementing it?

Anyways, thanks a lot for your work on this application! :)

Regards,
Stian
Coordinator
Aug 4, 2013 at 5:09 AM
Sorry for the delay in implementing the feature. I have given higher priority to many other features which have been implemented in the last months. I have started to work on the feature and hope to publish a preview in the next two weeks (but I won't promise :-))
Aug 4, 2013 at 11:17 AM
No need to be sorry - I was just curious what was the state. To keep you motivated, I just donated you a beer ;) (Pity for you that you don't live in Norway - then the beer-donation would be almost four times as big :P)
Aug 9, 2013 at 3:11 AM
I have been using windows for years, but I have never used a password safe. Having lately gotten an android tablet I have recognized the need for password management. I need to set up the password data base on my windows desktop and transfer a copy to the tablet. Then, if I make changes on the tablet, I will need to send the update to the desktop. After some research, it seemed to me the Keepass was the answer as there existed versions for both windows and android. However, I have been unable to figure out how to set up synchronization. I don't want to have the only copy of the data base in the cloud. For security's sake, I want any copy in the cloud to be only temporary during sync. I thought from descriptions that your product would serve for the android client. Now, having loaded it and the Windows version, I just can't figure out how to make it work. It looks like I need something called Dropbox (Google drive will not work?), but none of the information I can find says how. Every one just assumes the the set up is obvious. Well it isn't. Help.
Coordinator
Aug 9, 2013 at 6:27 AM
Not sure if I understand correctly what you want: Where do you want " any copy in the cloud to be only temporary during sync."?
There's no security benefit of having the file only temporarily in the cloud. If you have it in the cloud for 1sec, it can be stolen. I don't care, because I trust the kdbx format and my master key.
I personally use Dropbox with FolderSync on Android. See https://keepass2android.codeplex.com/documentation.
Does that help?
Coordinator
Aug 14, 2013 at 8:33 AM
please test https://keepass2android.codeplex.com/releases/view/110780: it has offline caching implemented (see question 1 of OP)
Aug 14, 2013 at 8:57 AM
Seems to work perfect! Thank you so much! I just bought you another beer, btw ;)
Oct 1, 2013 at 8:12 PM
Hello,
Thank you for the great app.
I was testing, how well does the sync works, and I faced a problem with offline editing. After modifying both databases: local copy in an android device and synced copy on the server (via desktop sync), synchronisation fails: Object reference not set to an instance of an object.
Hope this helps to make the application better!
Coordinator
Oct 2, 2013 at 4:34 AM
Hi Krom_,
do you experience this problem with the context menu "Synchronize database..." only? Or does it even occur when you add another entry with KP2A? If it's "only" in the first case, this seems to be same as https://keepass2android.codeplex.com/workitem/80?
Are you using FTP as well? Maybe you can create an error log as well so I can check if it's the same place where it fails?

Thanks a lot!
Philipp
Oct 2, 2013 at 7:02 AM
Philipp,
I've posted the detailed information in the issue discussion thread.
Jan 22, 2014 at 8:59 PM
Hi Philipp,

I started using keepass2android on my Samsung Galay Note 10.1 Ed2014 in November 2013.
I could update keepass db without any problem... Well at least the local DB, as I realized at some point that the datatabase on google drive was never updated, ie local copy of the db and cloud db are not synced.

When using the "Synchronize database..." menu, I got the following error message:
couldn't find id 0B1-tmcSybDuZTFhlY2VGZQWtanM being part of ass-KP2A-0B1-tmcSybDuZTFhlY2VGZQWtanM/database.kdbx-KP2A-0B1-tmcSybDuZbQWzand4aG8zZlk in GDrive account xxx@gmail.com.

What I tried:
A-Locating the cache file
I understand that K2A is using a cached file. Unfortunately I found no file under the following directory: Storage/emulated/0/Android/data/com.google.android.apps.docs/cache (hidden files option is enabled). And I was not able to find the local db through tablet directories (attempting to copy it on a desktop and open it).

B-Exporting the database
No existing export function in K2A found (would be a nice feature to add).

C-Updating manually the google drive database on a desktop
Hard work, since I have many groups and entries and it is not easy to find recenty updated entries : no sorting criteria on the modified date exists (would be a nice feature to have also, yes I know I am a bit demanding in a single thread!)

Once I will have restored my database, I will have a try using dropbox instead of google drive as described in http://keepass.info/help/kb/trigger_examples.html#dbsync
For the time being I have not updated the google drive db using standard keepass on my desktop, since I am a bit afraid of mixing / loosing more data.

I am kindly requesting your advice on updating the database on google drive or restoring a copy somewhere in order not to loose all updates made so far. Any workaround will be welcome. Features mentioned in B and C would also do the thing, I believe.

Thank you for your feedback,

Best Regards,
Frederic
Coordinator
Jan 27, 2014 at 10:28 AM
@flarvor: I have seen this and will try to provide a solution, just give me a few more days!
Feb 23, 2014 at 8:35 AM
I use K2A with a read only database on the web and when I sync the local database is not updated initially. It takes several attempts before the enter password prompt is displayed, it's OK if I close the database and then re-open it. Not sure what version I'm using - can't find a version number - it's not the latest but does have database caching.

cheers, Paul
Coordinator
Feb 23, 2014 at 7:16 PM
@flarvr: Sorry that I didn't inform you, I had forgotten about that thread. Just saw it because of Paul's post. You can use the latest version of KP2A to export your database (under database settings) to SD card and use that kdbx to import your changes to another database.

@Paul_cp: does it say "Files are in sync"? Or what's the message if you sync?
Feb 23, 2014 at 8:36 PM
Thanks a lot Philipp: I managed to export the database, so I can now move to a stable setup using dropbox instead of google drive.
Thanks again,
Fred
Feb 24, 2014 at 5:37 PM
It says something like "the file has been modified by another program, do you wish to re-load it". I say OK and things seem to happen, but no change is made to the data. I'll fire it up again tomorrow and get the exact sequence and messages.

cheers, Paul
Feb 25, 2014 at 7:10 AM
The sequence is as described., but the issue only occurs when in a group. e.g. view a group or entry and select sync from the menu, no sync occurs. Return to the root view and select sync, sync happens and you are asked for the password, which is already entered, click OK and your latest data is available.

cheers, Paul
Coordinator
Feb 26, 2014 at 6:46 AM
you're correct, this is a bug (described somewhere at the issues as well). That's one of the things I'm going to fix in the next release.