Android: Set App as Device Owner With Accounts Already Set

Disclaimers:

  • This procedure will delete your user accounts on your device
  • Requires Root Access

To set an app as a device owner with a use account already set you will need to delete your user then set it.

$adb shell dpm set-device-owner com.test.my_device_owner_app/.MyDeviceAdminReciever

Running this command will fail if device is already provisioned.  In shell run the following commands to set an app as the device owner for a device that is already provisioned.

*NOTE: THIS WILL DELETE YOUR USER ACCOUNTS – I have only done this on devices that I didn’t care about the user accounts at all on.

adb shell
su
rm -fr /data/system/users
dpm set-device-owner com.test.my_device_owner_app/.MyDeviceAdminReciever

Side Note: This is an awesome post with more information here




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *