PhilippC / PhilippC/keepass2android

[BUG] Grant permission error when use ADB shell to change stat of KeyboardSwap Plugin on Android 14

Open
#2,935 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.2k
Forks
478
Avg merge
1h 4m
Merged PRs (30d)
2

Description

Checks
  • I have read the FAQ section, searched the open issues, and still think this is a new bug.
Describe the bug you encountered:

Hi, POCO X5 PRO with Android 14 UKQ1 and Xiaomi HyperOS 2.0.4.0 when enter ADB command "adb shell pm grant keepass2android.plugin.keyboardswap2 android.permission.WRITE_SECURE_SETTINGS" have error

Exception occurred while executing 'grant': java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS. at android.app.ContextImpl.enforce(ContextImpl.java:2343) at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2371) at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1360) at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1342) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:570) at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:615) at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2692) at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:291) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6599) at android.os.Binder.shellCommand(Binder.java:1075) at android.os.Binder.onTransact(Binder.java:895) at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4352) at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6583) at android.os.Binder.execTransactInternal(Binder.java:1351) at android.os.Binder.execTransact(Binder.java:1282)

Testing same command on Android 12 and work great.

Thank for your attention.
Best
Yves

Describe what you expected to happen:

No response

What version of Keepass2Android are you using?

1.12-r5

Which version of Android are you on?

14 UKQ1.240624.001

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the ADB grant command for keepass2android.plugin.keyboardswap2 on Android 14 and compare it with Android 12, using the reported SecurityException as the failure signal. Determine whether the permission-grant behavior is app-controlled or Android-version specific; done means the issue has a confirmed cause and a documented or tested resolution path.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.