Skip to content

Not allowed to set the device owner because there are already several users on the device #317

Open
@spvkgn

Description

@spvkgn

Is it possible to set Hail as device owner on the device with Island installed?

~ $ adb shell dpm set-device-owner --user 0 com.aistra.hail/.receiver.DeviceAdminReceiver

Exception occurred while executing 'set-device-owner':
java.lang.IllegalStateException: Not allowed to set the device owner because there are already several users on the device.
	at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:11134)
	at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:9785)
	at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:257)
	at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:87)
	at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
	at android.os.ShellCommand.exec(ShellCommand.java:38)
	at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:11566)
	at android.os.Binder.shellCommand(Binder.java:1103)
	at android.os.Binder.onTransact(Binder.java:923)
	at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6409)
	at android.os.Binder.execTransactInternal(Binder.java:1385)
	at android.os.Binder.execTransact(Binder.java:1310)
 ~ $ adb shell pm list users
Users:
	UserInfo{0:Владелец:4c13} running
	UserInfo{10: Island :1030} running

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions