Device owner issue using adb method with LG devices only

怎甘沉沦 提交于 2019-12-30 10:38:06

问题


I have been trying to get device owner, inspired by google sample code

Using adb, I am able to get device owner on nexus 4,5,7,9 and micromax. However in LG G Pad (LG-V400) and LG G3 (LG G3 855) I get an error.

java.lang.SecurityException: Neither user 2000 nor current process has android.permission.BIND_DEVICE_ADMIN.

I noticed that the device admin is enabled on these devices, but not the device owner. I was able to capture the bug report from the device found here.

I have tried contacting LG but havent heard back anything.

Any help is greatly appreciated.


回答1:


After discussions and help from Kash, we realized that my original answer was only a portion of what needed to be done to change the device owner. The steps to set the owner are as follows:

  1. Root the LG device. Here is the tool I used: http://forum.xda-developers.com/lg-g3/general/guide-root-lg-firmwares-kitkat-lollipop-t3056951
  2. Use the command: "set Settings.Secure.USER_SETUP_COMPLETE=0" as root
  3. Install your device owner app
  4. Create xml file as per this: How to make my app a device owner?

Reboot the device and it should now work. If you have any questions feel free to send me a message.



来源:https://stackoverflow.com/questions/30163964/device-owner-issue-using-adb-method-with-lg-devices-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!