Android 11 Api 30 抛出 java.lang.SecurityException

问题描述 投票:0回答:1

我的 Android 身份验证器应用程序有一个小问题...该应用程序在 Android 8.1 上运行没有任何问题,但自 Android 11 开始它抛出此异常:

java.lang.SecurityException: Permission Denial: package=android does not belong to uid=1010197
    at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1072)
    at com.android.server.wm.ActivityTaskManagerService.assertPackageMatchesCallingUid(ActivityTaskManagerService.java:2598)
    at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1081)
    at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1072)
    at android.app.ContextImpl.startActivityAsUser(ContextImpl.java:1032)
    at android.app.ContextImpl.startActivityAsUser(ContextImpl.java:1000)
    at com.android.server.accounts.AccountManagerService.startChooseAccountActivityWithAccounts(AccountManagerService.java:4503)
    at android.app.ContextImpl.startActivityAsUser(ContextImpl.java:1000)
    at com.android.server.accounts.AccountManagerService.startChooseAccountActivityWithAccounts(AccountManagerService.java:4503)
    at com.android.server.accounts.AccountManagerService.handleGetAccountsResult(AccountManagerService.java:4512)
    at com.android.server.accounts.AccountManagerService.handleGetAccountsResult(AccountManagerService.java:4512)
    at com.android.server.accounts.AccountManagerService.access$2700(AccountManagerService.java:145)
    at com.android.server.accounts.AccountManagerService.access$2700(AccountManagerService.java:145)
    at com.android.server.accounts.AccountManagerService$19.onResult(AccountManagerService.java:4569)
    at com.android.server.accounts.AccountManagerService$GetAccountsByTypeAndFeatureSession.sendResult(AccountManagerService.java:4187)
    at com.android.server.accounts.AccountManagerService$GetAccountsByTypeAndFeatureSession.sendResult(AccountManagerService.java:4187)
    at com.android.server.accounts.AccountManagerService$GetAccountsByTypeAndFeatureSession.checkAccount(AccountManagerService.java:4135)
    at com.android.server.accounts.AccountManagerService$GetAccountsByTypeAndFeatureSession.checkAccount(AccountManagerService.java:4135)
    at com.android.server.accounts.AccountManagerService$GetAccountsByTypeAndFeatureSession.onResult(AccountManagerService.java:4170)
    at android.accounts.IAccountAuthenticatorResponse$Stub.onTransact(IAccountAuthenticatorResponse.java:104)
    at android.os.Binder.execTransactInternal(Binder.java:1159)
    at android.os.Binder.execTransact(Binder.java:1123)
    at android.accounts.IAccountAuthenticatorResponse$Stub.onTransact(IAccountAuthenticatorResponse.java:104)
    at android.os.Binder.execTransactInternal(Binder.java:1159)
    at android.os.Binder.execTransact(Binder.java:1123)

这是我的清单文件的简短视图:

<activity
    android:name="com.google.android.apps.work.kerberosauthenticator.AuthenticatorStatusActivity"
    android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
<activity android:name=".DeclineAddingAccountActivity" android:exported="true"/>
<activity android:name=".ServiceTicketActivity" android:exported="true"/>
<activity android:name=".LoginActivity" android:exported="true"/>

Targetsdkversion设置为30,这个startChooseAccountActivity需要添加什么Activity/Permission?

谢谢并致以最诚挚的问候,

安德烈

android mobile permissions accountmanager securityexception
1个回答
0
投票

尝试运行 Kerberos Authenticator 时仍然遇到此问题。顺便说一句:“协商”应该在新版本的“AuthSchemes”chrome 限制中明确设置。

© www.soinside.com 2019 - 2024. All rights reserved.