keepass2android icon indicating copy to clipboard operation
keepass2android copied to clipboard

Android Pie (9.0) crash when accessing entries from keyboard

Open apocalyptech opened this issue 7 years ago • 7 comments

This is pretty similar to both #743 and #712, but the error I get is different than #712's, and I'm reporting a slightly more general case than #743. Anyway, when I switch to the keepass2android keyboard, and select the "choose an entry" option, I can unlock the database and browse around the folder structure, but if I actually choose a password entry, or hit the "search" button, the app crashes and I end up back on the Unlock screen. I get an error which pops up very briefly which says:

Could not access source file: Permission Denial: opening provider androidx.core.content.FileProvider
from ProcessRecord{3f9d636d0 17010:keepass2android.keepass2android_nonet/u0a243}
(pid=17010, uid=10243) that is not exported from UID 10208.
Loaded file from internal cache.  You can still make changes
in the database and synchronize them later.

When I launch the app just by itself, I can interact with entries as I'd hope, and if I go in ahead of time and choose the proper entry, when I then go in to an app to use the keyboard to fill in a password, I can use the User/Pass buttons to fill in the information properly.

Let me know if I can provide any more info!

apocalyptech avatar Mar 11 '19 01:03 apocalyptech

Huh, weird, I'd gotten an email response on this Issue which asked if I'd done the following:

1.) Install ADB on your computer. ADB is the Android Debug Bridge, you find instructions how to do this on the web
2.) Open a command prompt and change to the directory where the adb executable is located (e.g Android SDK location] platform-tools)
3.) Launch an adb shell. Therefore, type adb shell
4.) In the adb shell, enter pm grant keepass2android.plugin.keyboardswap2 android.permission.WRITE_SECURE_SETTINGS and hit the Enter key
5.) Type exit to leave the adb shell

... but that (and another) response doesn't seem to show up in the web UI here? Weird. Anyway, I did try that just now, but got an exception:

star2qlteue:/ $ pm grant keepass2android.plugin.keyboardswap2 android.permission.WRITE_SECURE_SETTINGS

Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: keepass2android.plugin.keyboardswap2
        at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:2361)
        at com.android.server.pm.permission.PermissionManagerService.access$1100(PermissionManagerService.java:131)
        at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.grantRuntimePermission(PermissionManagerService.java:3240)
        at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:6402)
        at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1730)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:217)
        at android.os.ShellCommand.exec(ShellCommand.java:103)
        at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:25694)
        at android.os.Binder.shellCommand(Binder.java:642)
        at android.os.Binder.onTransact(Binder.java:540)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3315)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4732)
        at android.os.Binder.execTransact(Binder.java:739)

After a bit of Googling, though, it seems that those instructions came from a "keyboard swap" plugin? https://github.com/PhilippC/kp2a_keyboardswap

I definitely don't have any plugins installed; I was just using the default keyboard that comes with the app.

apocalyptech avatar Mar 11 '19 16:03 apocalyptech

Oh, one other thing that I'd meant to mention in the original post was that this happened after an upgrade to 9.0, on a Samsung S9+. This had been working fine before the upgrade, when the phone was still running 8.whatever.

apocalyptech avatar Mar 11 '19 17:03 apocalyptech

could you please test if this is fixed in 1.07-pre6 which I have just published on https://play.google.com/apps/testing/keepass2android.keepass2android?

PhilippC avatar Mar 18 '19 04:03 PhilippC

I just tested 1.07-pre6 and crashing is still happening on my note8 on pie. I have cleared cache and data too. However the behaviour is strange:

  1. default keyboard (Gboard) - unlock database, tap on search, no issues, need to copy and paste password - not ideal
  2. keepass4android keyboard - unlock database, tap on search button, crash
  3. keepass4android keyboard - unlock database, search via advanced search, then successfully able to tap on the username and password icons to enter details.

so almost there for me. Cheers

rex993 avatar Mar 18 '19 12:03 rex993

ok, next attempt... Could you please test again with 1.07-pre7? Thanks for your patience :-)

PhilippC avatar Mar 19 '19 20:03 PhilippC

bingo! it's all working nicely now. Thanks for the speedy fix.

I'm not sure if it's me imagining things but I recall there was an option to change the keyboard to always show the the numbers row? Can't find that option anywhere now.

rex993 avatar Mar 19 '19 23:03 rex993

closing this for now. If the error re-occurs, please comment/reopen. @rexii2300 I don't think this option ever existed.

PhilippC avatar Mar 20 '19 03:03 PhilippC