我需要将 google Pixel watch-1 设置为设备所有者模式。我有以下问题。
提前谢谢您。
https://github.com/mrugacz95/kiosk/blob/master/README.md#locktask-mode
根据上面的链接,我通过执行以下步骤实现了 WearOS 示例应用程序。
使用adb命令将apk安装到wearOS设备后,我尝试运行以下命令来设置设备所有者模式。
adb shell dpm set-device-owner app-package/.presentation.MyDeviceAdminReceiver
但是我在终端中遇到以下异常。
Exception occurred while executing 'set-device-owner':
java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device.
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:9573)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:8406)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:259)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:89)
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:9913)
at android.os.Binder.shellCommand(Binder.java:1049)
at android.os.Binder.onTransact(Binder.java:877)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6054)
at android.os.Binder.execTransactInternal(Binder.java:1285)
at android.os.Binder.execTransact(Binder.java:1244)
我认为我将 google Pixel Watch-1 设置为设备所有者模式的过程是错误的。
因此,我正在网上寻求一些帮助并撰写此查询帖子。预先感谢您。
您的问题解决了吗? 我正在寻找与您相同的解决方案。