4

i want to set device owner and active on my application using adb and dpm . i want to use startlocktask(). for creating kiosk application. but when i run this line in my commandline:

./adb shell dpm set-device-owner com.pakban.mobile.pinningtest/.AdminReceiver 

i recived an error like this :

Error: Bad admin: ComponentInfo{com.pakban.mobile.pinningtest/com.pakban.mobile.pinningtest.AdminReceiver}

thanks for your answers

iman kazemayni
  • 1,255
  • 1
  • 19
  • 20

2 Answers2

2

in my case, i used tutorial on net like this link

http://florent-dupont.blogspot.fr/2015/01/android-shell-command-dpm-device-policy.html

at this time, non of example and tutorial not mentioned how to create device_admin xml file(or i couldn't find it). so you need create a folder under res with "xml" name. and then, you must create a xml file with "device_admin" name. in this xml file just add this tag:

<device-admin>
</device-admin> 
iman kazemayni
  • 1,255
  • 1
  • 19
  • 20
1

Just check your "AndroidManifest.xml" once and make sure you have mentioned receiver's attributes value properly.