title: How do I set device owner to a priv-app as factory defaults?
body: <p>I know you can run an adb command to make an app to be a device owner:</p>
  
  <pre><code>adb shell dpm set-device-owner com.example.app/.AdminReceiver
  </code></pre>
  
  <p>I have made com.example.app a privileged app. Is there a way that I can set this app up as a device owner <strong>in the ASOP ROM</strong>? So that when the device boots up for the first time or after a factory reset, the app will be automatically provisioned as the device owner.</p>
  
  <p>Due to some limitations, I cannot modify this privileged app. So I'm looking for solutions that can be done outside the app.</p>