Uncategorized (2)


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




Welcome

Welcome to cout<<blog.  I am a 22 year old Computer Science Major at Texas A&M University focusing on high level development.  This blog is meant to be everything geek.  I will be posting interesting stuff, tutorials, pictures, and pretty much anything else that I find relevant in the Geek world today.

If you like what you see, please don’t forget to submit to the social network buttons on the top right.