Enumerate and remediate non-compliant apps in an Android enterprise managed by Android Management API

domain: developers.google.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. List all devices for the enterprise via GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/devices using a service account with the androidmanagement.devices.list permission
  2. For each device, inspect the applicationReports array; each entry contains packageName, versionName, installedFrom, and applicationSource fields
  3. Cross-reference applicationReports with the policy's applications array to identify apps installed from sources other than MANAGED_GOOGLE_PLAY (installedFrom field value)
  4. Identify devices with nonComplianceDetails where the reason is APP_NOT_INSTALLED or APP_NOT_UPDATED and the packageName matches a required app
  5. Issue a reboot or start lost mode command via POST to https://androidmanagement.googleapis.com/v1/{name=enterprises/*/devices/*}:issueCommand for devices requiring intervention
  6. Update the policy to add problematic packages to the blockedApplications list and PATCH the policy to force removal on next sync

Known gotchas

Related routes

Apply and query Android Management API policy compliance enforcement rules
developers.google.com · 6 steps · unrated
Implement Google Play Integrity API classic request flow with nonce for high-value actions
developer.android.com · 6 steps · unrated
Provision Android enterprise enrollment token and generate QR code via Android Management API
developers.google.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans