Forum Discussion
Intermittent QR Code Provisioning Failures with Identical Source Code
I am experiencing inconsistent behavior with QR code provisioning for Android Enterprise and am seeking guidance from the community.
The Issue:
QR code provisioning works intermittently, but the failure pattern is inconsistent. A provisioning QR code generated from a specific APK build will work reliably. However, subsequent builds of the exact same source code from the same Android Studio project will sometimes fail. The device displays a generic "Contact your IT admin" error.
What I've Verified:
- The APK is properly signed and the checksum in the QR code is correct.
- The server delivers the APK with the correct application/vnd.android.package-archive MIME type.
- The DeviceAdminReceiver is correctly declared in the manifest and the associated XML resource exists.
- The package name and component name in the QR code are 100% accurate.
- Comparing a "working" APK and a "failing" APK in APK Analyzer shows no differences in the core components (package name, receivers, resources).
Question:
Has anyone else encountered this? Are there known issues with Android's provisioning service being sensitive to certain aspects of the APK build output that are not related to the core functionality or signature?
Any insight into how to achieve consistent, reproducible builds for provisioning would be greatly appreciated.
1 Reply
- jasonbaytonLevel 4.1: Jelly Bean2 months ago
It's a bit of a slog, because Google choose to make it as difficult as possible, but on a failure there's an option in the Wizard (menu overflow) to send feedback. In that UI, the option to send system logs is available, and if you tap on the system logs link that shows it will take you to a window where you can scroll through the thousands of lines of logs the device generates. You may catch the issue there.
Simplistic question, but are you using admin_signature_checksum or package_checksum in your QR payload? I'd assume admin as this is sporadic rather than guaranteed after any update.
Do you have server logs from the host of the APK file? Is there any chance the network could be temperamental or inconsistently throwing a 4xx/5xx error?
If you were to host the file elsewhere, like S3, R2, or some other public CDN, can you replicate the issue?
Related Content
- 3 years ago
- 5 months ago
- 2 years ago