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

Location of local keepassdroid db in Android 9 (Pie) #382

Open
ghost opened this issue Dec 13, 2019 · 2 comments
Open

Location of local keepassdroid db in Android 9 (Pie) #382

ghost opened this issue Dec 13, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 13, 2019

Specifications:
I am using the kbx version 2 db.
Keepassdroid version 2.4.1
Android version 9 (Pie)
Phone: Motorola One (MotoX4)

Phone: there is no SD card, but the OS emulates one to save files for KeepassDroid.
Link: https://stackoverflow.com/questions/31399122/how-to-access-storage-emulated-0

I have discovered that the most up-to-date copy of my db is a local version on my phone, instead of google drive. (Ugh.) There is no option to export or save the file currently in use, so I'll have to browse to find it and upload it back to my google drive.

If I use file explorer to find the file, where is the keepassdroid local db path in Android 9 (Pie)?

I've looked on the path to the current db when you open keepassdroid, but the path is cut off instead of word-wrapped....
KeePass database filename:
content://com.google.android.apps.do...

If I go to "Open recent database (click to open)" if the first one in the list is the last one I used, the address should be:
content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D5869

However, if I try to browse to this using file explorer, I can't find it.

At the bottom, on the same screen it shows "Enter Database Filename" and has prefilled:
/storage/emulated/0/keepass/keepass.kdbx (icon to browse folders)

This is the type of path I'm used to seeing, and can use file explorer to open and upload to google drive. However, if I try to open this file, keepassdroid says:
File not found.

If I try to open the path mentioned earlier with no *.kbdx filename at the end, it opens.

Your help is greatly appreciated.

@kanytu
Copy link

kanytu commented Jan 24, 2020

Hi,

I would say this is intended. You have to start the picker every time you want to import the DB from a content provider URI. I might be wrong, but the app is not taking persistent permissions over the URI, which means that, for security reasons, the app has access to the content of that file for a limite amount of time.

So, when using content URIS (content://) such as Drive, you will have to manually pick the file again every time you need to change it.

@mikejholmes93
Copy link

@Matilda71 I had the same issue (/ for anyone else who may need to do this), not sure how google's contentprovider interface is setup but I've been able to pull my local stream from the keepassdroid copy stuck on my phone:

  1. Install adb on a device (windows/mac whatever)
  2. Enable developer options / put your phone in USB Debugging mode
  3. Open an adb shell to your phone (adb start-server, adb shell)
  4. Dump the content stream from keepassdroid to a pullable file on the phone (content read --uri content://com.microsoft.skydrive.content.external/Drive/ID/1/Item/RID/..../Passwords.kdbx?externalUriType=GetContent > sdcard/mystuckfile.kdbx)
    the URI there is basically whatever you see in "Open Recent Database" in the app, ie. content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D5869 whatever
  5. Pull the stored file back to windows/mac whatever, open it in the desktop version / resave it in the drive, whatever (exit shell, adb pull /sdcard/mystuckfile.kdbx C:\some\local\path\mystuckfile.kdbx

Good luck, beats copying out your new secrets by hand

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

2 participants