Activating Device Owner in Android 16
I’m building a parental control app that relies on Device Owner mode. This worked fine on older devices (e.g. Samsung Galaxy S8 running Android 8/9), but it fails on a Pixel 10 Pro running Android 16.
Process:
- I factory reset the Pixel.
- At the welcome screen, I scan a QR provisioning code.
- The QR downloads my signed APK, installs it, and should activate it as the Device Owner.
Problem:
- On Android 16, the app is installed but Device Owner is not activated.
- In Settings > Device Admin, my app is listed, but the toggle is off.
- My MyDeviceAdminReceiver never fires — I see no provisioning broadcast (PROVISIONING_COMPLETE or PROVISIONING_SUCCESSFUL) and no debug logs.
Here is my provisioning json as a starter - juyst in case I am doing something stupid!!
{ "android.app.extra.PROVISIONING_MODE": "device_owner", "android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "com.xxxx.yyyy/.MyDeviceAdminReceiver", "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "https://test.app.com/app-release.apk", "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM": "rePWsxWwsW2wycUDiE_hVHSczS3qaJIdk7fnzDMPDV0", "android.app.extra.PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED": false, "android.app.extra.PROVISIONING_SHOULD_LAUNCH_RESULT_INTENT": true, "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE": { "provision_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx......." } }