[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-26。"],[],[],null,["# Implement device management\n\nThis page describes guidelines for device manufacturers to enable device\nmanagement on Android. To support device management, devices must meet all the\nsoftware compatibility requirements defined under section **3.9. Device Administration**\nin the [Android Compatibility Definition document (CDD)](/docs/compatibility/cdd).\nThe implementation guidelines provided here aren't exhaustive and serve only as\na starting point for implementing Android device management.\n\nEnable device management\n------------------------\n\nTo enable device management on Android, enable these features:\n\n- `android.software.device_admin`\n- `android.software.managed_users`\n\nTo confirm that a device supports device management, run the following adb\ncommand on a device and verify that those features are present: `adb shell pm\nlist features`.\n\nSetup requirements\n------------------\n\nDevices that implement device owner or profile owner provisioning must present\nappropriate disclosures to end users during setup (out-of-box experience or work\nprofile setup). AOSP provides a\n[reference implementation](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/apps/ManagedProvisioning/).\nManaged provisioning is the Android framework UI flow invoked during fully\nmanaged-device or work profile setup to ensure that device users are adequately\ninformed of the implications of setting a device owner or managed profile on the\ndevice. Managed provisioning performs the following activities or delegates them\nto a device policy management role holder during provisioning:\n\n- Encrypts the device (if encryption is enabled).\n- Establishes a managed user.\n- Disables optional apps.\n- Sets the Enterprise Mobility Management (EMM) Device Policy Controller (DPC) app as [device owner](https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)) or [profile owner](https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)).\n\nIn turn, the DPC app performs the following activities:\n\n- Adds user accounts.\n- Enforces device policy compliance.\n- Enables any additional system apps.\n\nAfter provisioning completes, the DPC app's `ADMIN_POLICY_COMPLIANCE` intent\nhandler runs in the fully managed device user (for\n[device owner provisioning](/docs/devices/admin#fully-managed))\nor in the work profile user (for\n[profile owner provisioning](/docs/devices/admin#work-profile)).\nThen the DPC app adds accounts and enforces policies.\n\nLauncher requirements\n---------------------\n\nTo support device management, the Launcher must support badging apps\nwith work icon badges (provided in AOSP to represent managed applications).\nOther user interface elements on managed devices or profiles, such as\nnotifications, must use work badged assets. Launcher3 in AOSP already supports\nthese badging features.\n\nDefault work apps\n-----------------\n\nBy default, only applications essential for correct operation of a managed\ndevice or work profile are enabled as part of Android enterprise provisioning.\nDevice manufacturers can specify a list of default apps using these XML files:\n\n- `vendor_required_apps_managed_profile.xml`\n- `vendor_required_apps_managed_device.xml`\n- `vendor_required_apps_managed_user.xml`\n\nAfter device provisioning, IT admins can use the EMM console or\n[Managed Google Play](https://support.google.com/googleplay/work/answer/6137711)\nto push any additional apps deemed necessary by an organization.\n\nIn both device owner (fully managed device) and profile owner (work profile)\nmodes:\n\n- Apps without launcher icons are considered vital system components and are enabled automatically by Android.\n- Apps with launcher icons can be enabled by default during device provisioning by allowlisting their package names in `vendor_required_apps_managed_[device|profile|user].xml files`.\n- All other apps are disabled automatically during device provisioning.\n\nDevice owner implementation in devices configured with headless system user\n---------------------------------------------------------------------------\n\nAndroid 14 (API level 34) introduces the\n[headless system user mode](https://developer.android.com/reference/android/os/UserManager#isHeadlessSystemUserMode())\nconfiguration where the system user is a background user and the foreground\nusers are secondary users. Because\n[device owner](/docs/compatibility/13/android-13-cdd#3911_device_owner_provisioning)\nfunctionality traditionally relies on the system user also being in the\nforeground, the headless system user configuration brings certain unique\nchallenges to fully managed devices\n[(device owner provisioning)](/docs/devices/admin#fully-managed).\n\n**Figure 1.** Headless system user mode.\n| **Important:** For Android 14 (API level 34), it's we recommend that device manufacturers not configure headless system users on handheld and tablet devices that could be used for enterprise applications, because device owner functionality won't work optimally with any existing in-market EMM solutions at the time of the Android 14 release. This might change in the future.\n\nOn a headless system user mode device, a\n[device policy controller (DPC)](https://developer.android.com/work/dpc/build-dpc#about_dpcs)\napplication can be set as device owner only if it supports affiliated mode\n([`HEADLESS_DEVICE_OWNER_MODE_AFFILIATED`](https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#HEADLESS_DEVICE_OWNER_MODE_AFFILIATED)).\nThe system checks if affiliated mode is supported by calling\n[`getHeadlessDeviceOwnerMode()`](https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getHeadlessDeviceOwnerMode()).\nDevice provisioning is handled accordingly depending on if the DPC application\nsupports affiliated mode provisioning."]]