Skip to content

Instantly share code, notes, and snippets.

@bashenk
Last active June 20, 2024 03:59
Show Gist options
  • Save bashenk/58c6dd883b177ee6e6ed1c533f3e8066 to your computer and use it in GitHub Desktop.
Save bashenk/58c6dd883b177ee6e6ed1c533f3e8066 to your computer and use it in GitHub Desktop.
Creating a QR Code for Android Device Enrollment

Create a QR code

Android Enterprise Documentation: Create a QR code

Always required

Required if a DPC isn't already installed on the device

Required: Either one of the two checksums below (URL-safe base64 encoded SHA-256 checksum).

Note: For devices running Build.VERSION_CODES.LOLLIPOP and Build.VERSION_CODES.LOLLIPOP_MR1, only SHA-1 hash is supported. Starting from Build.VERSION_CODES.M, this parameter accepts SHA-256 in addition to SHA-1. From Build.VERSION_CODES.Q, only SHA-256 hash is supported.

Recommended if the device isn't already connected to Wi-Fi

Optional


EMM Provisioning

Android Zero-Touch Enrollment EMM Provisioning Guide

๐Ÿ‘ EMM Recommended

Use the following intent extras to set up your DPC

๐Ÿ‘Ž EMM Not recommended

Don't include the following extras that you might use in other enrollment methods

Additional references

@bashenk
Copy link
Author

bashenk commented Mar 12, 2024

@rekire I updated the gist to include checksum calculation for the v2 signing scheme, which has a small chance of being one of the issues you could've encountered. To be clear, I was unable to get your sha256sum version to produce the proper checksum, but I also don't have a spare device to test with a factory reset these days, so I was just checking it against one of my known-working QR codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment