I'm trying to implement an MDM client app for Android, known in the Android For Work world as a Device Policy Controller or DPC. Google's documentation for building a DPC is here.
The documented process begins with downloading the DPC Support Library. Unfortunately, the download link they provide (to the "EMM Community's Technical Integration" section) doesn't work: you're prompted to log in with a Google account, but after doing so I see this:
We’re sorry...
...but it looks like you don’t have access to this place or content. If you think you should have access to this space, try logging out and back in again using your account menu accessible by clicking your avatar in the top right corner of this page. If this issue persists, please notify your Support Representative and we will troubleshoot further.
Others have had the same problem: there's an issue ticket raised here which is only 2 months old, has no answer but for some reason has been marked Assumed Answered and then ignored.
The steps documented here make it very clear that the DPC Support Library is a required part of the process, and don't describe any alternatives to using it.
So, how do I get hold of the DPC Support Library? Can it be obtained anywhere else? Or failing that, how do I find out what it does so I can reproduce those steps manually in my own code?
Some steps I've already tried:
- I have successfully registered for the EMM Community and have access to the EMM API. (i.e. I get a valid response now from Enterprises.generateSignupUrl, and no longer the dreaded "The caller is not registered as an MDM".) That in itself was a long and frustratingly opaque process.
- I have built and run the googlesamples/android-testdpc app and looked through the source code. Unfortunately this is a client-only demo: it doesn't communicate with an EMM server and doesn't use the DPC Support Library. Specifically, it doesn't obtain an authorisation token in order to provision a work profile on the device, as documented here.
- I have played with the public EMM demo system and its DPC app. That seems to be doing things properly, but as it's closed-source I can't look at the code for either client or server.
DevicePolicyManager
class to create a device administrator app but I don't think that will help with COSU at all - it's more for remote admin (device lock, wipe, password policy, etc.). – Quiescent