Closed razercrypto closed 1 year ago
This exception indicates that the application no longer has the rights to access a particular URI. What type of URI are you trying to access?
If you use a key file, reselect it from its location. Similarly for database files, just reopen them from their location. In case you use a URI link with an icon, make sure you are not in the same situation as this one : https://github.com/Kunzisoft/KeePassDX/discussions/1089#discussioncomment-1985550
I have a kdbx database with keyfile, I tried all the methods you mentioned but it doesn't work. I created a new database without keyfile (database is located in main internal storage directory) to see whether the problem is associated with a keyfile or not , Iam able to create the database but when I try to reopen I see this same error. So I created another database which is located in the downloads folder, It works fine without keyfile. When I try to add keyfile through the app settings it shows "com.android.externalstorage has no access to content://media/external_primary/file/1531" .
In this case it is because you do not have the permission to manipulate files in the folder where you want to put it. These are Android 12 restrictions (since Android 11). https://stackoverflow.com/questions/67367047/android-11-primary-directory-invalid-not-allowed-for-content-media-external If you go through Material Files, do you also have the problem?
I had no issues like this when I was using Android 11. I tried Meterial files. Iam unable to open keyfile or database with the meterial files. No external file manager app is showing when Iam trying to open from the keepass app. So I opened Meterial files and opened that kdbx database with keepass. Database without keyfile works fine(Both main internal storage and downloads folder). But when I try to open a database which has a keyfile or when I try to add the keyfile through the app settings after the initial database creation , I see the same error(error1 and error 2) I mentioned above.
In this case, it is not the location of the database file but the location of the key file that is the problem. I guess it is not stored right next to your database.
It wasn't stored right next to database. But I tried keyfile right next to database but it doesn't work.
If you tell me that it was working before the update of your phone. The most likely hypothesis is that a behavior has changed on your device. Because on KeePassDX, I haven't changed anything regarding file permissions, which still use the same SAF code.
You should do more tests to see what works and what doesn't, I know Android 12 can generate an hmac mismatch
exception if a key file is an image #1188 which is not your case so it is to be excluded.
Theorically, a security
exception only happens if the access is revoked by the system, the KeePassDX code does not generate any of this type so I don't see what to improve in KeePassDX especially since I have no problem on emulator.
Do you have new information about your problem?
Problem is related with the default file manager.
For information, I have exactly the same problem with my Sony Xperia2 and Android 9. This issue is come just after the last upgrade of KeepPassDX. My datafile is stock in main storage and it is synchronise with nextcloud. Before upgrade, it 's work normaly. After, it' s work when I pick a datafile manualy and I'm connect with my pass, biometric empreint doesn't work. I hope my message help you, thanks for your app.
@fifi634 It doesn't really help because I didn't change the file stream method in the last KeePassDX updates, so I don't see how the program can be at fault.
Yes I know, I've read all comment before. It's a mistery. If I find a clue I post her.
For information, the database works correctly now on my Xperia XA2 with a nextcloud's synchronisation (i've had this issue before). I've just check a .kdbx files in favorit (in a start page). After the update its's worked with step. Thanks for your app.
Hello @razercrypto, you should try giving all files permission to the application called "external storage".
To do this
Instructions could be different in some devices. App name should be exactly the same, at least the package name should be exactly the same.
I was having this issue recently with KeepassDX and Keepass2Android. This is how I was recently able to fix this issue on my Samsung Note 20 Ultra 5G. While investigating this issue I also found I was only able to access databases if they were created by the app, moving the file and accessing it from that new location would cause this issue to happen again. I believe this is android 12 working exactly as intended, except, "com.android.externalstorage" did not have All File Access permission for some reason on some devices. It is possible that I removed the permission during my debloat, but, why would I do that? Maybe an accident, unless more than a few people have this problem. I should also add this happened on a phone I bought very recently, no update, this is how it arrived, it was already on Android 12 and I updated for the first time after the issue happened.
Please let us know if this fixes your issue, if it doesn't I hope this information can be helpful in providing an update that will fix this issue.
(Although irrelevant, if someone has this issue on Keepass2Android, the error message should be "Could not access source file: com.android.externalstorage has no..." it cuts off on my device.)
Thank you for the information. Keepassdx is not listed in All files access and storage permission is removed from the new version. I tried the old version which has storage permission but it is also not listed in All files access. I got the Android 13 update and updated last month. So in that, it works with the ZArchiver file manager without issues.
You should not have "KeepassDX" listed under All File Access.
You should have "External Storage" listed there. It's a system app that should come preinstalled on your device.
Note: Google Play is very strict on what app is allowed to have the All File Access permission. KeepassDX and Keepass2Android could be removed if they asked for that permission.
Thank you very much. I was wondering why external storage is not showing with default file manager after the update, now it is showing and it works with android 13.
Great to know!
Wiki updated regarding new procedure
Describe the bug I cannot open the database after android 12 update in my Samsung Galaxy A52. After I entered the password and press open it shows "Could not load your database. java.lang.SecurityException: com.android.externalst..." .
KeePassDX (please complete the following information):
Android (please complete the following information):