I am trying to enable Task locking by setting up a device owner. This is the guide by Google.
Full instructions and commands below:
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 "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>"
>> /tmp/device_owner.xml
$ echo "<device-owner package=\"<your_device_owner_package>\"
name=\"*<your_organization_name>\" />" >> /tmp/device_owner.xml
$ adb push /tmp/device_owner.xml /data/system/device_owner.xml
$ adb reboot
I have a problem. I tried to do the commands using GitBash on Windows but that fails when I try to do adb push
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 adb push
it says I don't have permission. Then I tried to do adb shell
+ su
but then that leads my device to stop being mounted.