wso2 / cdmf-agent-android

84 stars 97 forks source link

Using agent as device owner #181

Open sasamad2004 opened 6 years ago

sasamad2004 commented 6 years ago

Description: I am failing to install agent as device owner as described in https://docs.wso2.com/display/EMM330/Device+Ownership+Application

Device management shows device as "Removed". I am unable to login to agent again.

Affected Product Version: 3.2.0.

OS, DB, other environment details and versions:
Server side Ubuntu, Agent on Android 5.1.1

Might be relevant: This Android doesn't have micro USB port so I issued adb through TCP/IP.

Steps to reproduce: As described in https://docs.wso2.com/display/EMM330/Device+Ownership+Application using "A command issued through the Android Debug Bridge (adb)."

I had agent running, removed Google account and then issued adb to get ownership.

...\AppData\Local\Android\Sdk\platform-tools>adb shell dpm set-device-owner org.wso2.iot.agent/.services.AgentDeviceAdminReceiver
Success: Device owner set to package org.wso2.iot.agent
Active admin set to component {org.wso2.iot.agent/org.wso2.iot.agent.services.Ag
entDeviceAdminReceiver}
sasamad2004 commented 6 years ago

I am unable to uninstall agent now (probably because it is device owner).

Any help appreciated!

rgmalagon commented 6 years ago

the device must enrolled first, and later install the device ownership application

sasamad2004 commented 6 years ago

Thanks. I'll try that way and report here. Might take a while due to other tasks. :(

sasamad2004 commented 5 years ago

Finally some update. Regarding uninstalling the agent after it becomes device owner as explained previously, the only way out is factory reset. I missed that part in the documentation. https://docs.wso2.com/display/IOTS330/Device+Ownership+Application "If you wish to remove the device ownership from the application, you need to factory reset the device."

Now I have to try what rgmalagon suggested. :)