简体   繁体   中英

Using DPM to set Device owner

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.

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 :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM