title: How to properly setup a device owner for Task Locking
body: <p>I am trying to enable Task locking by setting up a device owner. This is the <a href="http://developer.android.com/preview/api-overview.html" rel="nofollow">guide</a> by Google.</p>
  
  <p>Full instructions and commands below:</p>
  
  <pre><code>1. Attach a device running an Android userdebug build to your development machine.
  2. Install your device owner app.
  3. Create a device_owner.xml file and save it to the /data/system directory on the device.
  
  $ adb root
  $ adb shell stop
  $ rm /tmp/device_owner.xml
  $ echo "&lt;?xml version='1.0' encoding='utf-8' standalone='yes' ?&gt;"
  &gt;&gt; /tmp/device_owner.xml
  $ echo "&lt;device-owner package=\"&lt;your_device_owner_package&gt;\"
  name=\"*&lt;your_organization_name&gt;\" /&gt;" &gt;&gt; /tmp/device_owner.xml
  $ adb push /tmp/device_owner.xml /data/system/device_owner.xml
  $ adb reboot
  </code></pre>
  
  <p>I have a problem. I tried to do the commands using GitBash on Windows but that fails when I try to do <code>adb push</code> because it can't find the right path to the xml, I found out that I need to do them through a Linux Terminal. So I got Virtual Machine and when I try to do <code>adb push</code> it says I don't have permission. Then I tried to do <code>adb shell</code> + <code>su</code> but then that leads my device to stop being mounted.</p>