Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android no longer lets me open .kdb files with KeePassDroid #75

Closed
taylormarshall opened this issue Feb 4, 2016 · 24 comments
Closed

Android no longer lets me open .kdb files with KeePassDroid #75

taylormarshall opened this issue Feb 4, 2016 · 24 comments

Comments

@taylormarshall
Copy link

Sometime in the past week or so, Android has broken my ability to use my KeePass database. I have a Drive shortcut to the file on my homescreen which would get the latest version of the file from Drive and then launch my KeePassDroid application. I used to just tap it, then KeePassDroid would launch, then I could enter my credentials and everything would work fine.

Now it just opens Drive and says 'file not supported'.

When I try to send/share the file, the Android share menu only shows me Inbox, Gmail, Beam, and Drive (and not KeePassDroid).

When I open KeePassDroid directly and select a file, Google Drive shows me the list of all files but they are all grayed out and I cannot select any of them.

When I download the file in drive (so now it's just in the 'downloads' directory on my phone), I still can't do anything with the file. When I try to use the share intent, it only shows me Inbox, Gmail, Beam, and Drive. Using the file picker from KeePassDroid also shows a gray filename and doesn't let me select it.

Anyone have any idea what happened here? I've been using this for years on many phones and I really love the app, but now it seems broken. Oddly, the list of recent files in KeePassDroid works (they are old Google Drive directories, pointing to older versions of my database). However, I assume those will eventually be garbage collected (and I can't get any new version of my database).

Any help/advice would be appreciated!

@taylormarshall
Copy link
Author

After digging around this for half a day, and trying lots of different stuff (new database files, keepass 2.x, etc), with no success, I finally gave up and just cleared all the app data for my Google Drive app on my phone. Once I did that and signed back in everything worked again. So I guess my local Google Drive cache got corrupted somehow (maybe the Feb 1 update they released?). Hopefully anyone else who has this problem will find this info useful.

@aurmil
Copy link

aurmil commented Feb 8, 2016

@taylormarshall great, I had the same issue, this solved it, thanks for sharing the fix

@DragonDon
Copy link

Argh, just tired this.....still can't open the greyed-out file sitting on my Google Drive. I've set the file to be available offline even.

Can't browse for it manually as Drive files are stored in a protected folder (Android/data/...) and without a rooted phone, you can't see that partition.

I cleared the cache and app data for both drive and keepass, changed nothing.

Any other suggestions? Not a big fan of having to download the file each time....and also makes for syncing impossible if I need to add a login on the mobile device.

@taylormarshall
Copy link
Author

Looks like my fix doesn't really fix it.

Apparently what happens is that this was some change in Google Drive. It's using a content:// URI rather than file:// now. Previously you could fix it temporarily because Drive didn't download the config from the server right away (some config enabled the content:// behavior).

Apparently file:// URI is discouraged in Android and has been for some time, and more and more things will stop using it.

So I think KeePassDroid really needs to support the content:// URI and this bug is still valid.

@aurmil
Copy link

aurmil commented Mar 1, 2016

agree, since like 2 weeks, can't open a kdb file anymore
nevermind I flush cache or not, on my phone keepassdroid is now useless :(

@esmsesms
Copy link

esmsesms commented Mar 1, 2016

I noticed this issue first time yesterday. Here is a workaround:

  1. Download your keepass database file from Google Drive to ~/Downloads directory on the phone.
  2. Have some File manager installed (e.g. ASTRO. Once you hit OPEN at KeepassDroid, on left side you will see the option to open up using ASTRO.
  3. At ASTRO, browse your internal Storage and go to ~/Downloads where you should see your kdb file.

No ideal, but it worked for me. You might need to run ASTRO by itself for some initialization.
I have NOT cleared any Google Drive cache on my phone.

Phone: Nexus 6p
OS: Android 6.0.1
KeepassDroid 2.0.4
Astro 4.6.2
Google Drive 2.3.583.20.40 (Feb 22nd, 2016) <-- it might vary depending on device

@bpellin
Copy link
Owner

bpellin commented Mar 3, 2016

I'm working on a fix for this. Unfortunately the app is a little dependent on normal file reading and writing, so I have to rewrite a little more than I expected to make this work again.

@taylormarshall
Copy link
Author

Thanks for the update!

@bpellin
Copy link
Owner

bpellin commented Mar 4, 2016

I'm looking for beta testers to try out the new version and help see if I've introduced any problems. This version should work correctly with recent versions of Google drive.

https://play.google.com/apps/testing/com.android.keepass

@taylormarshall
Copy link
Author

I get this message when trying to visit that page:

If you've been invited to become a tester, make sure you're signed in to the account that was invited to the testing program. If you've been invited to a Google Group or Google+ Community as part of the program, make sure you've joined the Group or Community.

@bpellin
Copy link
Owner

bpellin commented Mar 4, 2016

I switched it over to open beta testing, but I think there is a delay for it to take effect. Try again in a couple hours.

@taylormarshall
Copy link
Author

The testing version seems to work for me, but is a bit slow to launch. I am opening it by clicking the file from a Google Drive shortcut on my home screen, not sure which app is slow.

@acatuttle
Copy link

I can also confirm that opening database via Google Drive shortcut works. If I check "Available offline" for the database file in Google Drive it opens just as fast as it used to.
Great work guys, I really appreciate it!

@esmsesms
Copy link

esmsesms commented Mar 4, 2016

it worked for me:

Phone: Nexus 6p
OS: Android 6.0.1
KeepassDroid 2.0.5beta1

@DragonDon
Copy link

Still unable to open database from Google Drive with straightup-update to
2.0.5beta1.

Moto G (1st Gen)
Android 5.1

Cleared app data and cache for Drive and Keepass. Opened Drive, attempted
to launch KP from there, KeepPass loaded. Would not recognize Keyfile from
Google Drive.

Setup keyfile to 'offline'. No change.

I suspect that if I manually typed out the Drive URL (like the database,
i.e. 'content://.....") this would work. But man is that ever going to be
hard because I can't following the whole URL format to be able to copy it.

Now I'm back to downloading the key locally...which is to optimal and seems
to only solve half the issues so far but better than having to download the
DB AND key file I suppose.

On Fri, Mar 4, 2016 at 3:57 PM Eduardo Silva notifications@github.com
wrote:

it worked for me:

Phone: Nexus 6p
OS: Android 6.0.1
KeepassDroid 2.0.5beta1


Reply to this email directly or view it on GitHub
#75 (comment)
.

DragonDon
Web: http://bluejeanstech.com
LinkedIn: https://ca.linkedin.com/in/dragondonbelmore
Google+: http://google.com/+Bluejeanstech
Skype: dragndon

@taylormarshall
Copy link
Author

Could be that the keyfile doesn't work with content:// yet? I only use a db + password, so I did not test that part.

@aurmil
Copy link

aurmil commented Mar 6, 2016

test version of the app works for me
can open kdb file directly from Drive
no keyfile, only password
thanks :)

OnePlus X
Android 5.1.1
app 2.0.5 beta 1

@bpellin
Copy link
Owner

bpellin commented Mar 8, 2016

2.0.5 is rolling out now. The new version will handle content links for the database and key files. Although the inn app browse folders still don't really work correct with those yet. You can type them in though.

@SaemiVald
Copy link

Test version of the app worked for me.
Samsung Galaxy S5 (SM-G900F)
Android version 5.0
KeePassDroid 2.0.6

@webb78
Copy link

webb78 commented Jun 2, 2016

I've worked and worked on mine I can't even get browser to come up, I heard if you unhook your battery from device and hook it back it will fix? Has anyone else heard that? I'm having to use my phone

@prometheosgh
Copy link

I could open my well experimented kdbx database only after i had copyed it to the exact path and file name KeePassDroid was expecting it: /home/nemo/android_storage/keepass/keepass.kdbx

Actually my case is a little more special:

  • I am on a Jollaphone1 with SailfishOS, using the Android compatibility layer for Android apps.
  • I use KeepassX on my Ubuntu as a Password Manager, with a local kdbx database, which I want to clone, use with KeePassDroid and keep synchronized between my Jolla1 and Ubuntu.
  • My next problem comes now with the optional KeyFile: "Not valid" until I tried with chmod 777, of course NOT ACCEPTABLE for a Master Key to a password manager... But that is probably for another call.
  • I am using KeePassDroid_v2.0.6.4_apkpure.com.apk

@panzd
Copy link

panzd commented Apr 4, 2018

Has some log to see on it?

@blakjaknz
Copy link

I recently decided to migrate from Keepass v1 (.kdb) to Keepass v2 (.kdbx). With a kdb file stored on Google Drive and accessed via the Android app, KeePassDroid works well. For a .kdbx it tries to open in another app (PDF reader) and 'open with' within Google Drive app never prompts me to choose an app, it just tries to use Google native PDF reader and fails. Looks like much like #424 my work-around is to choose another app. I realise this may not be a problem with this app (which i've come to rely on extensively, and recommend elsewhere) but I havn't found another straightforward fix yet.

@taylormarshall
Copy link
Author

@blakjaknz I am still not sure what the exact cause of this problem, but I was able to resolve it for myself by using the "export" option in KeePass to make a copy of my .kdbx db, and then saving it to Google Drive as a new file (NOT updating the existing file in Google Drive). After I did that, it seems to properly launch KeePassDroid. The original entry in Drive seems to be forever cursed to not open in the correct app, even if I overwrite it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests