'"Can't set up device" It's missing components or corrupted
I'm trying to enroll device with device owner app. I've tried to edit the QR code. Also I calculated the checksum using
apksigner verify --print-certs C:\Users\Mert\Desktop\myapp.apk
but I got the corrupted error.
Here my QR,
{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME":"**com.test.testapp/.KioskAdminReceiver**",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM":"**Njc4YTFhYWI4ZTE4OWNkNWNhODhlMzJiYmQ1YmQ3MzUxZDE2MjhiZg==**",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION":"**https location**",
"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE": {"com.google.android.apps.work.clouddpc.EXTRA_ENROLLMENT_TOKEN": "**TOKEN**"}
}
Besides that, I've tried to add download link of my app that in play store(close test). This also fails.
How can I make my app device owner during the device provision?
Solution 1:[1]
There are number of reasons why you may be getting this error:
If you are integrating with AMAPI SDK | Android Management API
The QR code bundle includes the download location of Android Device Policy and an enrollment token.
{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "com.google.android.apps.work.clouddpc/.receivers.CloudDeviceAdminReceiver",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM": "I5YvS0O5hXY46mb01BlRjq4oJJGs2kuUcHvVkAPEXlg",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "https://play.google.com/managed/downloadManagingApp?identifier=setup",
"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE":{
"com.google.android.apps.work.clouddpc.EXTRA_ENROLLMENT_TOKEN": "{enrollment-token}"
}
}
“Note: The values in QR code configuration do not require the *.”
These fields are used to download the ADP (Android Device Policy) which is used by AMAPI.
However, you can use the AMAPI extensibility SDK. This enables an EMM-specific extension app to communicate directly with ADP (Android Device Policy).
Please refer to this links for more information https://developers.google.com/android/management/provision-device#about_qr_codes https://developers.google.com/android/management/extensibility-sdk-integration#policy_configuration
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rey V. Aquino |
