I'm trying to get a Wear 2.0 (stand-alone) app to run in kiosk mode, but when I try
adb shell dpm set-device-owner <myComponent>
I get:
java.lang.IllegalStateException: Not allowed to set the device owner because this device has already paired
at android.os.Parcel.readException(Parcel.java:1692)
at android.os.Parcel.readException(Parcel.java:1637)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setDeviceOwner(IDevicePolicyManager.java:4707)
at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:148)
at com.android.commands.dpm.Dpm.onRun(Dpm.java:96)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:51)
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:262)
I also tried by copying a file to /data/system/device_owner.xml
as described here, but also without success.
Note: on a mobile I have successfully entered kiosk mode using adb shell dpm set-device-owner <myComponent>
.
Anyone knows a way to enter kiosk mode using Wear 2.0?