最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Unable to Remove Accounts to set device owner in Android Device - Stack Overflow

programmeradmin2浏览0评论

enter image description here

I want to remove accounts from my Meta Quest device to set a new device owner, but I can’t do it anymore because the accounts seem to have disappeared.

When I run adb shell dumpsys accounts, I see the following:

`Accounts: 3
  Account {name=Meta, type=com.meta}
  Account {name=Horizon Worlds Platform, type=com.horizonworldsplatform}
  Account {name=Oculus, type=com.oculus}`

I tried to manually remove the accounts through the settings by running the following command:

adb shell am start -n com.android.settings/.Settings$AccountDashboardActivity Then I navigated to Settings > Password & accounts, but it didn’t display anything.

I also attempted to clear the accounts programmatically and granted the GET_ACCOUNTS permission, but nothing worked.

`        AccountManager manager = AccountManager.get(getApplicationContext());
        AuthenticatorDescription[] authTypes = manager.getAuthenticatorTypes();
        for (AuthenticatorDescription authDesc : authTypes) {
            Account[] accounts = manager.getAccountsByType(authDesc.type);
            if (accounts.length == 0) {
                continue;
            }
            for (final Account account : accounts) {
                manager.removeAccount(account, null, null, null);
            }`

How can I proceed with removing these accounts ?

发布评论

评论列表(0)

  1. 暂无评论