简体   繁体   English

使用DPM设置设备所有者

[英]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? 我知道您可以通过运行时exec命令使用dpm将应用程序设置为设备所有者,但是我的大问题是您是否还可以使用dpm删除应用程序作为设备所有者? 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. 我是android开发的新手,我正在学习尽可能多的东西。 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. 否,您无法使用adb命令删除设备管理员。 You can remove the device owner programmatically see this How to remove set-device-owner in Android DPM? 您可以通过编程方式删除设备所有者,请参阅此如何在Android DPM中删除set-device-owner?

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. Google的这个示例项目可能会有所帮助。

For more detailed study you can refer to this documentation . 有关更详细的研究,请参考此文档

I Hope this helps :) 我希望这有帮助 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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