sun*_*ain 2 android nfc android-5.0-lollipop device-owner
我想在不使用NFC的情况下将我的应用设为设备所有者.在开发者博客上,提到要让设备所有者必须使用NFC,但我发现在没有NFC的情况下也可能会在本评论中提到alex_au .
我试过这个,但没有成功.有人能够做到这一点吗?
您可以使用adb shell中的命令行工具dpm.
用法:
usage: dpm [subcommand] [options]
usage: dpm set-device-owner <COMPONENT>
usage: dpm set-profile-owner <COMPONENT> <USER_ID>
dpm set-device-owner: Sets the given component as active admin, and its package as device owner.
dpm set-profile-owner: Sets the given component as active admin and profile owner for an existing user.
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请检查:dpm shell命令
注意:在使用此命令之前,请确保未配置设备.如果设置了设备并且您收到"设备已配置"之类的消息,请在从设备中删除所有帐户后尝试该命令,或在出厂时重置设备后尝试.
| 归档时间: |
|
| 查看次数: |
1883 次 |
| 最近记录: |