DPC - How to test code paths for QR/Zero Touch Device Owner setup?
See original GitHub issueSorry to any googlers as this likely isn’t the right venue.
Can anyone explain exactly how the app is launched in Zero Touch and Device Owner QR Code enrollment? I understand that an intent is sent, and will contain the PROVISIONING_ADMIN_EXTRAS_BUNDLE
- that’s all quite straightforward, but I’m not sure exactly where the intent should be handled, given that provisioning happens immediately upon device startup and it’s not feasible to debug.
Any advice - intent filter, class, etc. would be helpful.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Testing Device Management | Android Open Source Project
To verify the device owner was correctly setup, go to Settings > Security > Device Administrators and confirm TestDPC is in the list....
Read more >Zero-touch enrollment for IT admins - Android Enterprise Help
On first boot, devices check to see if they've been assigned an enterprise configuration. If so, the device initiates the fully managed device...
Read more >Device Owner with Zero Touch Enrollment Checklist - IBM
Content · Select Android in Setup > Settings> Enrollment Settings > Enrollment Programs · Configure Android Zero Touch Enrollment configuration(s) ...
Read more >EMM integration guide | Google device provisioning services
Because zero-touch enrollment automatically downloads and installs a DPC, your DPC must be available from Google Play. We maintain a list of compatible...
Read more >Enroll your Android Enterprise dedicated, fully managed, or ...
If device users setting up fully managed devices or corporate-owned devices with a ... Create a zero-touch configuration in the admin center ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Back in Android 10, TestDPC was updated in accordance to this guide. In summary, there are 2 entry points to TestDPC: the
android.app.action.GET_PROVISIONING_MODE
, which requests the DPC to return the desired provisioning mode (work profile or device owner), andandroid.app.action.ADMIN_POLICY_COMPLIANCE
, which allows the DPC to set itself up after it has been made a profile owner/device owner. This is the case for ZeroTouch and QR enrollment, and we’re migrating all of the other flows to follow this pattern as well. For managed account provisioning, pre-Android 12 it’s only launched after provisioning it’s launched via theandroid.app.action.PROVISIONING_SUCCESSFUL
intent, and from Android 12 onward it’s started just like ZeroTouch and QR enrollment. For NFC provisioning it’s also only started viaandroid.app.action.PROVISIONING_SUCCESSFUL
, which will also be updated in the upcoming Android release to be like ZeroTouch and QR enrollment.Create a local server that serves your custom TestDPC or upload it somewhere publicly Make sure you can actually access the TestDPC apk from the phone Get the SHA-256 checksum of the apk; on Linux you can use sha256sum path/to/TestDPC.apk Create a QR code with the following content: { “android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME”: “com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver”, “android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM”: “apk checksum from step 3”, “android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION”: “url that serves your TestDPC” } From the SetupWizard Welcome screen tap 6 times to launch the QR code scanner Scan QR code