Page 1 of 1

Device Owner Error

Posted: Tue Jun 29, 2021 2:15 am
by triplec87
I was facing an error when I am trying to set device owner. I already removed all my accounts that tied to my phone but ADB still detect I have some accounts in the device. FYI. I am using the second method which uses ADB and PC to set device owner. Please help.

PS C:\Users\user\Downloads\platform-tools_r31.0.2-windows\platform-tools> ./adb shell dpm set-device-owner com.rrivenllc.shieldx/.receivers.DeviceAdmin
java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device
at android.os.Parcel.createException(Parcel.java:2096)
at android.os.Parcel.readException(Parcel.java:2056)
at android.os.Parcel.readException(Parcel.java:2004)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setDeviceOwner(IDevicePolicyManager.java:9419)
at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:203)
at com.android.commands.dpm.Dpm.onRun(Dpm.java:115)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:56)
at com.android.commands.dpm.Dpm.main(Dpm.java:41)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:342)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:9754)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:8764)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:4071)
at android.os.Binder.execTransactInternal(Binder.java:1056)
at android.os.Binder.execTransact(Binder.java:1029)

Re: Device Owner Error

Posted: Tue Jun 29, 2021 5:34 am
by beowulf381
You can execute the command: 'adb shell pm list users' to see which users you have left.
Secure folder counts as user account too. So you may try to remove secure folder first. You can do this in the settings of secure folder (select the 3 dots in the upper right, select settings, select more settings, at the bottom you'll find uninstall).
Sometimes it helps to restart the device after removing all accounts.

Re: Device Owner Error

Posted: Tue Jun 29, 2021 11:13 pm
by triplec87
After using your command I only saw my name in the userinfo. I never set any secure folder in my phone so this is not the concern. After I restarted my phone, now I get this.

PS C:\Users\user\Downloads\platform-tools_r31.0.2-windows\platform-tools> ./adb shell dpm set-device-owner com.rrivenllc.shieldx/.receivers.DeviceAdmin
usage: dpm [subcommand] [options]
usage: dpm set-active-admin [ --user <USER_ID> | current ] <COMPONENT>
usage: dpm set-device-owner [ --user <USER_ID> | current *EXPERIMENTAL* ] [ --name <NAME> ] <COMPONENT>
usage: dpm set-profile-owner [ --user <USER_ID> | current ] [ --name <NAME> ] <COMPONENT>
usage: dpm remove-active-admin [ --user <USER_ID> | current ] [ --name <NAME> ] <COMPONENT>

dpm set-active-admin: Sets the given component as active admin for an existing user.

dpm set-device-owner: Sets the given component as active admin, and its package as device owner.

dpm set-profile-owner: Sets the given component as active admin and profile owner for an existing user.

dpm remove-active-admin: Disables an active admin, the admin must have declared android:testOnly in the application in its manifest. This will also remove device and profile owners.

dpm clear-freeze-period-record: clears framework-maintained record of past freeze periods that the device went through. For use during feature development to prevent triggering restriction on setting freeze periods.

dpm force-network-logs: makes all network logs available to the DPC and triggers DeviceAdminReceiver.onNetworkLogsAvailable() if needed.

dpm force-security-logs: makes all security logs available to the DPC and triggers DeviceAdminReceiver.onSecurityLogsAvailable() if needed.
usage: dpm grant-profile-owner-device-ids-access: [ --user <USER_ID> | current ] <COMPONENT>


Error: Trying to set an admin which is being removed

Re: Device Owner Error

Posted: Wed Jun 30, 2021 8:30 am
by beowulf381
Looks like there's an issue with the device policy.
Some questions:
Is the shield app still set as device admin?
Is or was the device managed by some third-party MDM (mobile device management)?

Would suggest you open a support-ticket in our discord-server.
https://discord.com/invite/YzYfgWP
Accept invite, then navigate to #support-ticket

Re: Device Owner Error

Posted: Thu Jul 01, 2021 11:21 am
by triplec87
When I first install the shield app I just follow the wizard to setup. I remember I set Device Admin and Knox inside the wizard. When I go to my phone settings -> Apps -> Special access -> Device admin apps, I saw Alliance Shield X is not turned on and Enable Device Admin is turned on.

I am not sure my device is managed by third party MDM apps. How can I check it?

Re: Device Owner Error

Posted: Thu Jul 01, 2021 4:23 pm
by beowulf381
The settings you mentined above are correct. You can check if there are some other apps (other than Alliance Shield X and Enable Device Admin) listed in device admin apps. Is this would trhe case, which other app are listed there, and are they enabled?

Re: Device Owner Error

Posted: Thu Jul 01, 2021 9:57 pm
by triplec87
There are 3 apps listed inside Device admin apps. The first two were Alliance apps and lastly is Find My Device which is not enable. That's all.

Re: Device Owner Error

Posted: Sat Jul 10, 2021 5:51 pm
by Isaiasa71
Não tô conseguindo acessar minha conta

Re: Device Owner Error

Posted: Sun Jul 11, 2021 10:06 am
by beowulf381
se receber a mensagem Too may devices, você pode remover os não utilizados aqui. Faça login e exclua os antigos.

https://shieldx.alliancex.org/account

Re: Device Owner Error

Posted: Thu Oct 28, 2021 3:57 pm
by Isamar
Como saber minha conta

Re: Device Owner Error

Posted: Thu Oct 28, 2021 5:24 pm
by ixsystem
Hi