Search code examples
androidadbandroid-5.0-lollipopdevice-owner

Device owner issue using adb method with LG devices only


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.enter image description here

I have tried contacting LG but havent heard back anything.

Any help is greatly appreciated.


Solution

  • 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.