Skip to content

Commit

Permalink
perf: format
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Oct 31, 2024
1 parent d5465e8 commit c00860c
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions docs/guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,30 @@

## 手动写入安全设置权限失败 {#fail_setting_secure_settings}

在使用adb手动写入安全设置时可能会提示权限不够,具体报错如下:
在使用 adb 手动写入安全设置时可能会提示权限不够,具体报错如下:

```
```text
adb shell pm grant li.songe.gkd android.permission.WRITE_SECURE_SETTINGS
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:2384)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2412)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1383)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1365)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:573)
at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:610)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2717)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:301)
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:6840)
at android.os.Binder.shellCommand(Binder.java:1092)
at android.os.Binder.onTransact(Binder.java:912)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4352)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6824)
at android.os.Binder.execTransactInternal(Binder.java:1392)
at android.os.Binder.execTransact(Binder.java:1299)
at android.app.ContextImpl.enforce(ContextImpl.java:2384)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2412)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1383)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1365)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:573)
at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:610)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2717)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:301)
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:6840)
at android.os.Binder.shellCommand(Binder.java:1092)
at android.os.Binder.onTransact(Binder.java:912)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4352)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6824)
at android.os.Binder.execTransactInternal(Binder.java:1392)
at android.os.Binder.execTransact(Binder.java:1299)
```
在开发者选项中找到“禁止权限监控”,打开后重新运行adb指令即可。

在开发者选项中找到 `禁止权限监控`,打开后重新运行adb指令即可。

0 comments on commit c00860c

Please sign in to comment.