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

kdbx size changed tremendously after editing with Keepass2Android

Jun 6, 2013 at 8:07 PM
Hello!
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 :)
Coordinator
Jun 7, 2013 at 3:07 AM
Hi!
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!
Thanks,
Philipp
Jun 8, 2013 at 8: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 8:10 AM
Edited Jun 8, 2013 at 8:11 AM
This post here https://groups.google.com/forum/?fromgroups#!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!
Coordinator
Jun 8, 2013 at 10: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 11:38 AM
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 :-(
Coordinator
Jun 8, 2013 at 3: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 10:41 AM
Edited Jun 9, 2013 at 10: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 10: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?
Coordinator
Jun 9, 2013 at 5: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 google.com is ok so you can use the search from accounts.google.com 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 1: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?
Coordinator
Jun 10, 2013 at 5: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 8:03 PM
Just to make sure - didn't use KeePassDroid for editing yet :-)
Jun 11, 2013 at 10: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. facebook.com on android will more look like m.facebook.com 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 :-) ]
Coordinator
Jun 12, 2013 at 6:36 AM
I have "facebook.com" in the URL field of the Facebook entry which works for both www.facebook.com and m.facebook.com!
Jun 12, 2013 at 2:36 PM
Great tip - will try this :)
Jun 12, 2013 at 7:20 PM
I fI put 'facebook.com' 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 :-)
Coordinator
Jun 12, 2013 at 7: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 12, 2013 at 11:27 PM
another good idea :)
Jun 20, 2013 at 4: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.: m.facebook.com) via 'share' from my android browser.

Thanks so much :-)