title: Setting Device Owner app problem "Workspace has been locked" Android Oreo 8.1
body: <p>0</p>
  
  <p>I've been using my app as a deviceOwner App since lollipop. I have a new device here which I want to be DeviceOwner too.</p>
  
  <p>It is a Samsung galaxy Tab A 10.5(2018) SM-T590.</p>
  
  <p>I am currently running this Version of the rom: T590XXU2ASC1.</p>
  
  <p>I am not using NFC method. I usualy create the /data/system/device_owner.xml file by myself. But since it is not working I tryed this method:</p>
  
  <p>1-Factory reset the tablet in recovery mode</p>
  
  <p>2-Pass through the annoying startup menus</p>
  
  <p>3-Set lock screen to none</p>
  
  <p>4-Enable Usb Debugging</p>
  
  <p>5-Install my app adb install MyApplicaton.apk</p>
  
  <p>6-adb shell dpm set-device-owner com.example.myapplication/.MyApplicationReceiver It always says success when i execute the command.</p>
  
  <p>7-Start my app, i can pin/unpin my app without problem.</p>
  
  <p>8-Reboot, and then the famous message appears everytime: Workspace has been locked Unauthorized software has been installed on your device.Workspace has been locked to prevent any unauthorized access. Contact your admin.</p>
  
  <p>Then if i press on the FACTORY DATA RESET button the workspace app crashes then pops back.</p>
  
  <p>I tryed the kioskModeDemo app and the androidDeviceOwner sample app and they all do the same problem.</p>
  
  <p>Anybody have any hints of why this is not working anymore on Android 8(oreo)?</p>
  
  <p>Thanks
  <a href="https://i.stack.imgur.com/yj7Fo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yj7Fo.jpg" alt="enter image description here"></a></p>