Using DPM to set Device owner

1.2k Views Asked by At

I know you can use dpm to set an app as a device owner via a runtime exec command, but my big question is can you also use the dpm to remove an app as device owner? Such as with a password run the code to remove the app from device ownership?

I am new to android development and I am learning as much as possible. The company I work for owns the devices and wants to keep employees from removing the app. For security reasons, rooting is not feasible. However at the same time they would like to be able to remove the app at a future date if necessary.

At least point me in the right direction for further research.

1

There are 1 best solutions below

0
On

No, you can not remove device admin with an adb command. You can remove the device owner programmatically see this How to remove set-device-owner in Android DPM?

You can also refer to this link

In order to enforce the policies needed by your company device owner privilege is enough.

This sample project by Google might help.

For more detailed study you can refer to this documentation.

I Hope this helps :)