I installed the Android System Application and made the agent application device owner. I am adding a new policy and selecting restrictions. When I select Disallow configuring Wifi restriction and publish the policy, it does not effect the device. I try on different device and enroll as new user who is affected by the policy. The result is same. It can be bug or I do not understand the restriction's function. What does ' Disallow configuring Wifi ' restriction do ?
2 Answers
The function of the restriction 'Disallow configuring WiFi' is disallowing user changing the WiFi access points. As described in the policy, this restriction will only work if the agent is working as the device-owner. That means to the generic agent will have this capability. Once the agent is installed you have to set it as the 'device-owner'. You can use the following adb command to set the device-owner.
dpm set-device-owner org.wso2.iot.agent/.services.AgentDeviceAdminReceiver
You may get the latest release (IoT 3.1.0) or get the agent source from https://github.com/wso2/cdmf-agent-android and build yourself as there were some important fixes done recently in android device-owner scenario.
Be careful when you are setting the agent as 'device-owner' as there is no way to undo that expect resetting the device.

- 487
- 5
- 17
-
I am still confused about whether I make the system app as device-owner or agent app as device-owner. – İlknur YILDIRIM Aug 20 '17 at 18:02
-
In the latest version, the agent itself has the capability to server device owner features once you set it as the device owner. Therefore setting the agent app as device owner will be the best option. Get the latest agent from the source in order to make this effective. – PasinduJay Aug 21 '17 at 04:48
-
Then, system-application is useless and I don't need to install it. – İlknur YILDIRIM Aug 21 '17 at 06:14
-
Yes. If the operations that you need can be covered from device-owner scope, there you don't need to install the system-app, installing the agent app and setting it as device owner is enough. – PasinduJay Aug 21 '17 at 07:04
-
When I use COPE as DEFAULT_OWNERSHIP, agent application gives error such that please install the wso2 system app to continue enrollment as a COPE user. – İlknur YILDIRIM Aug 21 '17 at 11:07
-
Keep DEFAULT_OWNERSHIP as BYOD and build. Set it as device-owner once you installed the app. Then you can get the privileges. – PasinduJay Aug 21 '17 at 11:12
At first I am confused whether I make the system app as device-owner or agent app as device-owner.Then I use three command;
- dpm set-active-admin org.wso2.iot.system.service/org.wso2.iot.system.service.ServiceDeviceAdminReceiver
- dpm set-active-admin org.wso2.iot.agent/.services.AgentDeviceAdminReceiver
- dpm set-device-owner org.wso2.iot.system.service/org.wso2.iot.system.service.ServiceDeviceAdminReceiver
It worked. But when I did them before register, agent app did not respond.

- 47,830
- 31
- 106
- 135

- 11
- 4