Tuesday, June 8, 2010

Dropbox and KeePassDroid

The new Dropbox Android app plays nicely with KeePassDroid. I use Dropbox to synchronize my keepass database, because it is available on all of the platforms I use daily: Linux, Windows, and Android.

It's very easy to use. I install it on my desktop first, and move my keepass database into my dropbox. Then, fire up the Dropbox Android app, and log in:



Navigate to your database and click on it:

It will jump to the password screen in KeePassDroid:






In the background the Dropbox app will be waiting to see if you make changes to the database.  If you do, it will upload your changes back to your Dropbox.

38 comments:

  1. Brian, Thank you! This is super fantastic. I tried it out this morning and it works like a charm. The read-only for kdbx is a nice bonus, too!

    ReplyDelete
  2. I have a Motorola Droid, and keep getting an error when I try to do this: Java IO exception, invalid stream or encoding. I'm using Keypass with Firefox without a problem. My .kdbx file is in Dropbox (shared on my desktop and Droid). My setup appears to be exactly the same as yours, but I get this error every time I've successfully entered my password to access the database. Any ideas?

    ReplyDelete
    Replies
    1. There is A bug in Motorola phones that break Androids backup system.

      Delete
  3. I only get this error when I set the database to no compression.
    Setting it to gzippped gets rid of the error.

    ReplyDelete
  4. I downloaded keepass 2.12 destop and dropbox fro desktop as weel.. When I open the file from dropbox droid and then open it on my keepass droid- I cant' edit any iformation or add passwords at all- is this a simple fix?
    please help

    ReplyDelete
  5. Problem is when you use a key file also stored on dropbox: you have to input the whole path :-( Any ideas? File browsing in keepassdroid?

    ReplyDelete
  6. Thank you for this excellent application. I just found that the Android Market has it now.

    @slx69 Rather than opening KeePassDroid first, open Dropbox and navigate to your database file. Then open it, and KeePassDroid will be launched with that database file.

    ReplyDelete
  7. I tried doing this, but when I click the file within my Dropbox, I get an Android prompt saying "No viewer available" and it gives me the choice to view as text or download. If I view as text, it gives me jumbled characters. If I download, it prompts me to save the .kdb file locally -- which obviously defeats the purpose of using Dropbox in the first place. What am I doing wrong?

    ReplyDelete
  8. Hi Michael. I also had the same issue when trying to open the .kdbx password database from KeePassDroid. In order to let KeePassDroid open the .kdbx file, I changed the name of the .kdbx source file on my Windows machine to eliminate any space in the file name, then added the .kdbx file to DropBox on my Windows machine, then on my Android device I opened DropBox, hit download file, switched to KeePassDroid, and finally browsed to the dropbox directory on my SD card. The same process did NOT work when I had spaces in the name.

    BTW, the dropbox directory is /mnt/sdcard/dropbox/file.kdbx. Hope that helps!

    -Kris

    ReplyDelete
  9. Thanks Kris, this worked perfectly! It must have been the space in the filename.

    ReplyDelete
  10. Hi,

    it would be great if you could add an option that when opening any database in a Dropbox folder, before actually opening it, KeePass would make Dropbox look whether there is a fresher version on the Dropbox servers.

    This way one could place a link to KeePass directly on the home screen and would not always have to open the database through Dropbox.

    Thanks!

    ReplyDelete
  11. Nice app. I agree with Jimmy that it would be great to be able to edit info or add passwords using KeePassDroid.

    ReplyDelete
  12. Hi Brian. Thanks for all your great work! I'd like to second the motion to be able to open the database directly from the app instead of having to go through dropbox. Excellent App!

    ReplyDelete
  13. Thanks! I struggled a bit. I thought no one would click on the file.

    ReplyDelete
  14. I just watched a tutorial that explained that you can only edit keepass files on Android with Keepass 1.x. Not with 2.x

    ReplyDelete
  15. Like Michael and Kris above I got "No viewer available". I didn't have any spaces in my file name either. I eventually found that it wouldn't open because it was in a folder that had numbers and non alphanumeric characters in it. Once I moved it to root directory of my Dropbox then it worked fine. Hope this helps someone.

    ReplyDelete
  16. I would like to add and modify entries. Why is this not possible?
    It makes no difference if I open the database by clicking it in my dropbox folder or using keepass directly.

    ReplyDelete
  17. When I go to select the key file, even though I can see my key file "abc.key" when I use the dropbox app, it only lists the .kdbx file.

    ReplyDelete
  18. Owen Corpening: In Android, run Dropbox, browse to the file you want to use (like the key file), then touch the file until a pop-up menu gives you action choices. Press "Download".

    This copies the file to folder on the SDCARD. The Android Dropbox program does not actually copy files into the Android until you take this step. The reason is probably that many of us have Dropboxes that are much larger than our smart phones can handle.

    ReplyDelete
  19. I downloaded Keepass and Dropbox. Everything worked well yesterday. Today when I try and modify the database from my phone, it says it is read only file? I can write to it when opened from my PC/Dropbox folder.

    Any help appreciated. Thanks

    ReplyDelete
  20. Is there a limit on the number of entries in a 2.x database that KeePassDroid can see? I'm using the Dropbox sharing, and all my computers can see the latest entries, but my phone can't at all. I tried moving some things into subfolders, which helped a little...but it only accepts one subfolder per folder, too (those folders that have more than one only show the oldest). Rather frustrating!

    ReplyDelete
  21. Actually, after doing some major cleanup - what the _heck_ is going on? The database is shrunken, and saved in Dropbox. When I close and reopen on my computer, what shows is the new, clean database. But when I open it (direct from Dropbox, which says it was modified only minutes ago), the stuff that was deleted is still there! I even tried deleting and reinstalling KeePassDroid, and the old stuff still shows (and the newer entries don't). How is KeePassDroid still seeing these older entries? They're no longer in the database!

    ReplyDelete
  22. I tried explicitly downloading it into Dropbox before opening it, too. No joy.

    ReplyDelete
  23. syn to dropbox goes well but I cant open it on my andriod phone

    Invaled pasword or file. I saw that the problem is known but jet no answers
    Does annybody have a sugestion ?

    ReplyDelete
  24. Apparently, Dropbox on Android does not function the same as on windows, macosx, linux, etc.

    First it doesn't update files automatically -- you have to tap on a file and it will re-download it (whether or not it's been updated on the server) and then open it with the associated app (KeePassDroid).

    Second, if you update a file in a Dropbox folder Dropbox on Android won't automatically upload it, but will allow you to upload it manually. If you do this, it will warn you that the file already exists and ask whether you want to replace it.

    Finally, KeePassDroid version is able to update 1.x .kdb files by adding, deleting or editing password entries. Version 2.x files are read-only (at the time of this writing).

    So until KeePassDroid can write 2.x database files, I'm using the 1.x version.

    ReplyDelete
  25. I'm still not understanding why I can't use a .key file. It is just not showing up in my dropbox/private folder where the database is. If I touch the file in dropbox I get "Please download an app that can open this file". If I browse to that folder in keepass, it's just not there. Any ideas?

    ReplyDelete
  26. I just figured it out. In dropbox, long press the .key file and save to SD card. Navigate to your dropbox folder and press export.

    ReplyDelete
  27. Only just trying out Keepass.
    I've not had a chance to install the Android app, or try Cloud Pipes, but I thought I'd post this while I'm here-

    We should be able to use Cloud Pipes to automate some of the KeePassDroid functionality. I've used it to auto copy exported files from the app's export directory into my Dropbox. It seems a well engineered and documented app.

    More info here:
    http://howto.cnet.com/8301-11310_39-57472193-285/automate-file-transfers-between-dropbox-and-android-devices/

    ReplyDelete
  28. Regarding Dropbox automatically updating files edited on Android, I am happy to say that I stand corrected:

    Local changes to any file marked as a "Favorite" in Android Dropbox *WILL* be synchronized, same as with Dropbox on desktop operating systems (such as the .kdb file).

    To toggle Favorite status, either press and hold the .kdb file entry until a menu pops up or tap the drop-down triangle to the right of the filename, then tap "Favorite".

    Note that version 2.x .kdbx files still cannot be edited in KeePassDroid (hint, hint, Brian Pellin).

    ReplyDelete
  29. Trying to use key file doesn't seem to work in KeePassDroid.

    I used KeePass 1.24 to save a .kdb file that uses BOTH password and key file, having selected an existing (.jpg) file as the key file; KeePass has no problem opening the .kdb file with the right password and key file.

    Same thing happens when I let KeePass GENERATE a key file: it opens the .kdb file with no problem as long as I enter the right password and point it to the right key file.

    However, whenever I try to open these .kdb files in KeePassDroid, it always says, "Invalid password and/or key file" despite entering the right password and pointing it to the same key file.

    Does this feature work? What am I doing wrong?

    ReplyDelete
    Replies
    1. I was having the same issue. First, I could not see the key file, as I had saved it as "Password.key". Since Android did not recognize "*.key" as a valid file extension associated with an application, it was not being displayed. This was resolved by going into drop box and "Exporting" the file to the same directory as my DB file. After doing so, I was able to now view the file, but started receiving the message you're seeing. It seems that Kepass requires R/W access to the files in order. I did not research why, but by going back into drop box and marking both the DB and the password file as a Favorite, it suddenly worked. Hope it helps.

      Delete
  30. DropBox does not download the key file unless forced to. One way to force this is to star the key file as a favorite.

    ReplyDelete
  31. Is it possible to set the path to Dropbox directly in Keypass please anyone?

    ReplyDelete
  32. Works great except I cannot work out how to restore FROM dropbox to keepassdroid ..if I ever need to.

    ReplyDelete
  33. I just installed this but I cannot open a database saved on Dropbox. It says "invalid password or key file". This is a Samsung Galaxy Avant with Android 4.4.2 and Dropbox 2.4.6.8. I tried exporting the database to my phone but now KeePassDroid opens in Dropbox and I don't know how to back out of it. drat. I was so hopeful this would solve my password woes and contribute to world peace. Anyone have any ideas?

    ReplyDelete
    Replies
    1. Oh. I see above it doesn't work with version 2.x files. double drat.

      Delete
  34. Help! My son wiped my phone out and I am trying to reconstruct. I had backed up to Dropbox but there is no .kdb file listed. Only .ini .exe and..chdm

    ReplyDelete