title: dpm set-device-owner not working in redmi note 4
body: <p>I am trying to make an application device-admin, for that I'm following <a href="https://developer.android.com/guide/topics/admin/device-admin.html#developing" rel="nofollow noreferrer">Developing a Device Administration Application</a><br>
  And when I try to run below command<br>
  <code>./adb shell dpm set-device-owner com.example.app/.receiver.AdminReceiver</code> </p>
  
  <p>it gives SecurityException  </p>
  
  <pre><code>java.lang.SecurityException: Neither user 2000 nor current process has android.permission.MANAGE_DEVICE_ADMINS.
      at android.os.Parcel.readException(Parcel.java:1683)
      at android.os.Parcel.readException(Parcel.java:1636)
      at android.app.admin.IDevicePolicyManager$Stub$Proxy.setActiveAdmin(IDevicePolicyManager.java:4278)
      at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:145)
      at com.android.commands.dpm.Dpm.onRun(Dpm.java:96)
      at com.android.internal.os.BaseCommand.run(BaseCommand.java:51)
      at com.android.commands.dpm.Dpm.main(Dpm.java:41)
      at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
      at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:343)
  </code></pre>
  
  <p>Can anybody please help to get out of this problem, I have removed all the accounts from mobile. I'm using redmi note 4 mobile</p>