bpellin / keepassdroid

KeePass implementation for android
http://www.keepassdroid.com
Other
1.38k stars 346 forks source link

unable to open last opened file #164

Open Thomas-W72 opened 7 years ago

Thomas-W72 commented 7 years ago

After starting keepassdroid i see the last opened file and touch the filename. After entering the password and OK i get the message "File not found. Try to...". So i have to choose the file again and open it. The file was not moved or renamed. I stored the file in separate folder under rootdirectory of smartphone. Please solve this, that the file can be opened direct from the last used file list.

kaischwarze commented 7 years ago

i have The same problem- please find out, what is wrong. It occures after last Android Update on my Samsung S5neo, it is now 6.0.1, . Before i never had any trouble,

zOSguy commented 7 years ago

Same issue with me, already since I started working on Android 6.0.1 (on Motorola). Also our other Android 6.0.1 devices (a.o. Samsung) have the same issue. I'm using Keepassdroid for quite some years, never ever had this before. This is what's happening: Open Keepassdroid (2.0.6.4). Try to open my standard database (or a recently used file) with the correct password, it always responds with "File not found. Try reopening from your content provider.". I have to press Back, then the Folder icon, select the same .kdb file as always, I press Open, enter the same password, press OK, and I'm in. Having to reopen the .kdb file after a timeout just works fine, only at a new start of Keepassdroid it always fails. Please have a look. It shouldn't be too hard to solve, it will be a great relief for us. keepassdroid

onedude commented 7 years ago

Hello, can someone enlighten me where this ACTION_OPEN_DOCUMENT command is and how to implement it?

Thanks!

zOSguy commented 7 years ago

@maikalms: Your solution sounds promising! "to avoid file not found error on android > 4.4" => My previous (with correctly working Keepassdroid) Android versions were up to 4.3.

kaischwarze commented 7 years ago

... but it is not good solution. Its not clever using old versions with security problems - one version back may be acceptable - but what after a year has passed? I still wait for a statemend from the developer! I think there should be an answer from the respnonsible peaple - what is going to be with this problem - will ther be a solution with next keepass update - ore ist no solution to be expected!?

maikalms commented 7 years ago

You can use it with Android 6 or whatever, just use the patch from my fork of the project. The updated code just uses a different method to get access to the file, which is available in 4.4 an later. You may have to select the file once to update the stored URI.

onedude commented 7 years ago

Thanks, but how do I install the patch? It's not an app file?

Thanks!

maikalms commented 7 years ago

Hi, you can either wait for the change to be merged into the official app (if it will be) or I can send you an apk, so you can test it on your device. Or you install Android studio and Compile it yourself

onedude commented 7 years ago

An apk would be great as I am a total layman at software compilation! I'll test and report back my result. Thanks in advance for taking time to help!

maikalms commented 7 years ago

Hi, i reviewed the code again and found a setting in the app to enable more or less the same functionality, So my 'fix' is redundant. You can find the setting under Settings (top right corner) -> Application -> Storage Access Framework (at the bottom of the list). For me, this was disabled by default (Android 6.0). When you enable this setting, it shoud do the same thing as the patched version. After eableing the settnig, you have to open the file dialog and select your database again. The displayed 'file path' should begin with content:// and not file://. I still get the 'file not found' mesage after rebooting the device but not after closing and reopening the app.

zOSguy commented 7 years ago

Hi maikalms, thanks again for your explanations. In my app-settings I see that I already had that Storage Access Framework enabled, and as you can see in my screenshot I also do have "content://" specified. Still I had all of those problems as reported above (when the app really has finished, not just when I reboot; indeed closing and reopening the app is no problem). Therefor I'm still very happy about your contributions and I don't think your solution is redundant at all. If it really works like you have explained (I haven't tested it), it would be a great relief. And so ( @bpellin ) I would really like this fix to be included in the official app a.s.a.p., it would improve the usage and the quality in these situations. For an average user (under Android 4.4 and above) it's not easy to understand why your previously selected default database can't be found (or how to get it working again)!

maikalms commented 7 years ago

hi, i have uploaded an APK for testing http://compilenix.org/cdn/app-flavor1-debug.apk in this versoin, the persistend access should work as expected (the apk contains https://github.com/maikalms/keepassdroid/commit/e92df8796d8b04a7e090fb05ee4aecc5d7634b02). Please backup your files before testing! Also make sure the "Storage Access Framework" setting is ebabled (it will fallback to default when installing the APK). You will have to select the db file again, after that it should be accessible after restarting the app AND also after reboots. Let me know if this fixes the problem.

cloudhub commented 6 years ago

Hi guys! I have the same issue (the same repro steps as well) on Samsung Galaxy S8 (Android 8.0.0) as @zOSguy described above. KeePassDroid 2.2.0.9, using *.kdb DB.

zOSguy commented 6 years ago

Hi cloudhub, I'm sorry to hear that. They solved my issue a couple of months ago, so I'm happy, so far. I'm also using KeePassDroid 2.2.0.9, using *.kdb DB, but I'm still on Android 7.0.

cloudhub commented 6 years ago

I guess not too much users faced with the issue for now due to using previous android versions. @bpellin could you please take a look at it? I'll be very greatful. Thanks in advance!

cloudhub commented 6 years ago

FYI: after I've made a reset of all phone settings to defaults the issue disappeared. Thanks a lot!

Samuring commented 5 years ago

Hi I still have this issue, on android 5.1.1, I tried all the methods and got the older version of the apk and still can't login, Keeps saying "Could not find file try reopening it from file browser" I'm sort of getting really paranoid because I couldn't find any of the file/folder structures from my file browser I'm thinking my database has been wiped after I recently did some cleaning some cache and stuff on my phone. Any help?

Bubu commented 5 years ago

This is also still happening to me, on various phones and various android versions. (6.0, 7.1, 8.1) with nextcloud content provider. I can always open it again from nextcloud but never more than once from keepass. This is with version 2.3.4 which should have the fix for this included.

gopipal commented 5 years ago

I am seeing this issue on my OnePlus 6T running version 2.4.1. I use Dropbox as my content provider.