I have a device running Android 7.1.1 and I am building sample DPC app in preparation for making a COSU kiosk app but I keep running into an error in the provisioning setup.
Steps I take:
- Factory reset the device
- Successfully scan the code from the QR provisioning screen
- App downloads successfully and checksum check passes. I know this because at first it kept failing at wrongly generated checksum.
- Installing app message passes without error.
- The message changes to "Setting the device owner..." and immediately fails with the generic message "Oops! Couldn't set up your device..."
I've put simple Toast
in DeviceAdminReceiver
subclass into onEnabled
and onProvisioningComplete
functions. The Toast in onEnabled
is displayed, the one in onProvisioningComplete
is unsuprisingly not.
The app is signed with proper release certificate, setting the device owner through adb works fine as well which also leads me to belief that component name and manifest is ok otherwise adb command would fail as well.
QR code text:
{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "component name",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM": "the checksum",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "the link",
"android.app.extra.PROVISIONING_SKIP_ENCRYPTION" : "True",
"android.app.extra.PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED" : "True"
}
Any ideas what might be wrong ? I've run out of mine. Thanks for any input !