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

kdbx size changed tremendously after editing with Keepass2Android

Jun 6, 2013 at 9:07 PM
Using Keepass2Android in combination with dropsync I today started editing
my kdbx-file for the first time and realised a tremendous change in the filesize
after Keepass2Android had saved the changes (1.1MB -> 341KB) !!!
On my Win7 Desktop I am syncing a local version of the database with the dropbox version of the database so after dropbox has finished downloading, the sync-process manages to just take over the changes in the smaller file and so I hope I didn't lose any data so far!

desktop kdbx = 1.1MB
android kdbx = 341 KB

All I can imagine is that Keepass2Android isn't capable to save embedded jpg's or similar attachements which kinda had bloated the database . . .
  1. Why do I experience such a huge change regarding the database size after Keepass2Android has finished saving it?
  2. Will I be save when it comes to loss of data as long as I use the following scenario? :
  3. saving changes of the database on android with Keepass2Android
  4. syncing a local version of the database on different desktop machines with the freshly downloaded dropbox file
  5. using other android devices that are capable of changing the database with Keepass2Android 'simultanioulsy' (not precisely :-) )
Regards - Happy to find some solution to this :-)
Can communicate in German also :)
Jun 7, 2013 at 4:07 AM
This behaviour sounds unexpected: Keepass2Android uses exactly the same code as Keepass on the desktop (both are open source), only compiled for different platforms. The only thing that comes to my mind as an explanation is the maintenance of entries (which could have happened with Keepass as well): There are several settings regarding your history: max age, max size, max number of history entries. If an old backup of your entry was deleted because of these settings, maybe a big attachment backup was deleted as well.
But to find out what really happened, please do the following:
  • export both kdbx-files (with 1.1MB and 0.3MB) to "Keepass XML (2.x)" using Keepass desktop (Using dropbox you can get the 1.1MB file back through the history if you don't have any other backup)
  • compare the files using a text diff program (e.g. the Compare plugin in Notepad++)
  • -> see what was changed!
  • please report here!
Jun 8, 2013 at 9:01 AM
When saving the 1.12MB file to Keepass XML (2.x) the size decreases to 6.337KB.
The small file from the dropbox folder is 6.352KB.

Changes with Beyond Compare are:
  • Modification Date
  • the last entry I created
  • last access time
Jun 8, 2013 at 9:10 AM
Edited Jun 8, 2013 at 9:11 AM
This post here!topic/keepassdroid-discuss/_Jnd78zd1t4
says it could be the different gzip behaviour on differrent platforms . . .

I don't really believe it because the change in size is so big!
Jun 8, 2013 at 11:20 AM
thanks for reporting your results! From the comparison, I'd say this looks really good. You might try to compress the xml with different compression levels yourself to see how big the difference can be?
Jun 8, 2013 at 12:38 PM
You mean the exported xml with something like 7-zip ???
In KeePass I cannot change the compression level afaik . . . only GZIP available . . .

Do you think that there is a chance that no data is lost?
Right now I am quite unsure to use KeePass2Android for editing :-(
Jun 8, 2013 at 4:12 PM
Yes, I meant 7 zip or so.
I'm pretty sure that no data is lost because the XML says it's all there!
And by the way nobody of the 20000+ users ever reported a problem with data loss!
Jun 9, 2013 at 11:41 AM
Edited Jun 9, 2013 at 11:43 AM
Thanks so far!!! :-)
I'll go through it once more and will report if some weird thing happens . . . :)

Another thing:
  • I haven't been successful so far with the entry search via the share menu (e.g. trying to log into a website via browser or so).
    Is it true that I would need to have parts of the domain in the entry title for this to work?
    I still take the 'old-fashioned way' to pick my entry in KeePass2Android and copy it . . .
    On Win Desktop I mostly use 'Auto-Type' to get the correct entry for my page.
    This is why I am not having lots of URL's in the titles.
  • I am tending to use the KeePass2Android keyboard but I am not sure enough about its benefits.
    It shall be save against keyloggers (. . . on Android . . . ? ).
    I could find the fitting entry by using a button (which one?).
Would be great to be able to use these functions with more understanding :-))
Jun 9, 2013 at 11:57 AM
I just tested the compression levels of GZIP exporting the 1.164KB kdbx to xml:

just the export: 6.27MB
fast gzip: 339KB
normal: 320KB
max: 285KB
ultra: 278KB

What I don't understand is why I should do this with the xml export!
Isn't it a kdbx on Android too?

What does the result say now?
Jun 9, 2013 at 6:34 PM
kdbx is an encrypted, gzip compressed version of the xml! That's why you can be sure that if the xmls are equal, you haven't lost any information. And that's why fast gzip and the KPA file have roughly the same size, I guess. I can't tell what's wrong with the compression of Keepass here, however.
Regarding your other requests:
  • You need to have the URL field filled out (not the title!) Something like is ok so you can use the search from or so
  • Keyloggers don't exist on Android, but every app might be a potential Clipboard sniffer. This is why I wouldn't suggest to use the clipboard based approach (which is used by most password managers on Android). To use it, I usually use Share URL to select the entry which opens a dialog to enable the keyboard directly. You can - as an alternative - switch to the KP2A keyboard and the press the KP2A symbol (robot with lock) and press "select entry".
Jun 10, 2013 at 2:55 PM
Would you expect any issues when using KeePass2Android on one device and KeePassDroid on another and all this combined with the same database on different Windows machines?
Jun 10, 2013 at 6:50 PM
Not sure if keepassdroid has fixed its problems with kdbx write support. If they have, this should work fine!
Jun 10, 2013 at 9:03 PM
Just to make sure - didn't use KeePassDroid for editing yet :-)
Jun 11, 2013 at 11:08 AM
I double checked everything now and it definitely looks good! :-)
I can use both apps for editing at the same time:
  • KeePass2Android (saver with extra keyboard avoiding the use of the clipboard)
  • KeePassDroid (smaller in size but no attachement support)
. . . and after a while I figured out how to use the extra keyboard.
Please correct me if I'm wrong but I do always have to enable the keyboard to avoid using the clipboard, right?!
Unfortunately the URL of e.g. on android will more look like so K2A doesn't find the appropriate entry (have to search for it).
How do you cope with that? Two entries, one mobile, one desktop version? Or does it work to use the 'Override URL' - feature from KeePass???

Thank you so much for your fast and friendly support and all the great work in this project !!!!
Your client has some fantastic features (e.g. Quick Unlock) - I do not want to miss anymore!

[A black theme would still be much appreciated though :-) ]
Jun 12, 2013 at 7:36 AM
I have "" in the URL field of the Facebook entry which works for both and!
Jun 12, 2013 at 3:36 PM
Great tip - will try this :)
Jun 12, 2013 at 8:20 PM
I fI put '' in the URL field it work nicely on Android.

With KeePass on Desktop it doesn't!
Using 'Crtl+U' I get a popup window 'The system cannot find the file.'
It only works when I open the URL via right click context menu and select one of the installed browsers directly.

I guess I have to decide which one should work for me:
Opening via Crtl+U from KeePass or getting the credentials through the Android share menu and the KPA keyboard.

You don't seem to use Crtl+U - do you :-)
Jun 12, 2013 at 8:34 PM
no, I use ChromeIPass which fills out any password forms when I open the page (through the browser address bar). You could use the Override URL field to fix the behavior in Keepass if you like to use Ctrl+U :-)
Jun 13, 2013 at 12:27 AM
another good idea :)
Jun 20, 2013 at 5:26 PM
I finally found time to check it and it works:

If I use the 'Override URL field' I can open the desktop version of the URL (Override URL field ) via Ctrl+U on any desktop
while I'm still able to 'find' the 'right' mobile version of the URL (e.g.: via 'share' from my android browser.

Thanks so much :-)