Device Policy Management on Android with ADB
Prints the help text
Checks if the given operation is safe
dpm is-operation-safe <OPERATION_ID>
Checks if the operations are safe for the given reason
dpm is-operation-safe-by-reason <REASON_ID>
Emulates the result of the next call to check if the given operation is safe
dpm set-operation-safe <OPERATION_ID> <REASON_ID>
Lists the device / profile owners per user
Lists the apps that are exempt from policies
dpm list-policy-exempt-apps
Sets the given component as active admin for an existing user
dpm set-active-admin [ --user <USER_ID> | current ] <COMPONENT>
Sets the given component as active admin, and its package as device owner
dpm set-device-owner [ --user <USER_ID> | current *EXPERIMENTAL* ] [ --device-owner-only ] <COMPONENT>
Sets the given component as active admin and profile owner for an existing user
dpm set-profile-owner [ --user <USER_ID> | current ] <COMPONENT>
Disables an active admin, the admin must have declared android:testOnly in the application in its manifest
dpm remove-active-admin [ --user <USER_ID> | current ] <COMPONENT>
Clears framework-maintained record of past freeze periods that the device went through
dpm clear-freeze-period-record
Makes all network logs available to the DPC and triggers DeviceAdminReceiver.onNetworkLogsAvailable()
Makes all security logs available to the DPC and triggers DeviceAdminReceiver.onSecurityLogsAvailable() if needed
Marks the profile owner of the given user as managing an organization-owned device
dpm mark-profile-owner-on-organization-owned-device [ --user <USER_ID> | current ] <COMPONENT>