擦除并取消配置设备
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
取消预配是指从管理中移除设备的过程。当设备被处置或员工离职时,需要从个人自有设备中移除公司数据,这时就需要执行此操作。
您可以通过以下四种方法取消配置设备并清除公司数据:
- WIPE 命令
- RELINQUISH_OWNERSHIP 命令
enterprises.devices.delete
方法
enterprises.delete
方法
WIPE 命令
此方法会触发公司自有设备恢复出厂设置,并触发个人自有设备删除工作资料。使用 type = WIPE
调用 enterprises.devices.issueCommand
,或提供 wipeParams
对象。wipeParams
对象可以指定在擦除期间如何处理恢复出厂设置保护 (FRP) 数据、外部存储空间和 eSIM 卡。您可以提供一组本地化消息,以向个人自有设备的用户说明如何使用 wipeParams.wipeReason
删除工作资料。
在命令被设备确认或过期之前,可以跟踪和取消该命令。设备向服务器确认已完成 WIPE 命令后,系统会删除设备记录。
RELINQUISH_OWNERSHIP 命令
当公司自有、个人启用的设备转换为个人自有设备时,会使用此方法。系统会从设备中删除工作资料,并从管理中移除该设备。设备个人资料中的所有数据或应用都会保留。由 EMM 设置的所有 PersonalUsagePolicies
都会被移除。
执行此操作后,设备记录将被删除。
调用 enterprises.devices.delete
会立即删除设备记录。
服务器向设备发送清空指令。对于公司自有设备,此操作会触发恢复出厂设置。对于个人拥有的设备,此操作会删除工作资料。不过,如果设备在调用 enterprises.devices.delete
时处于离线状态,并且离线时间超过 30 天,那么擦除指令将无法到达设备,公司数据将保留在设备上。
由于此方法无法保证数据清空,因此仅建议在必须在特定时间范围内从 Google 服务器中移除数据时使用,例如当公司要求 EMM 立即删除所有公司数据时。
对于 EMM 管理的企业,EMM 可以调用 enterprises.delete
,该方法会删除企业记录和所有关联的设备记录。这与在企业中的每台设备上调用 enterprises.devices.delete
的效果相同。
对于客户管理的组织,不支持此方法。IT 管理员可以使用 Google 管理控制台或 Google Play 管理中心删除企业。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# Wipe and deprovision a device\n\nDeprovisioning is the process of removing a device from management. This is\nnecessary when a device is disposed of or when an employee leaves a company and\ncompany data needs to be removed from a personally-owned device.\n\nThere are four methods for deprovisioning a device and wiping company data:\n\n1. WIPE command\n2. RELINQUISH_OWNERSHIP command\n3. [`enterprises.devices.delete`](/android/management/reference/rest/v1/enterprises.devices/delete) method\n4. [`enterprises.delete`](/android/management/reference/rest/v1/enterprises/delete) method\n\nWIPE command\n------------\n\nThis method triggers company-owned devices to factory reset and personally-owned\ndevices to delete the work profile. Call [`enterprises.devices.issueCommand`](/android/management/reference/rest/v1/enterprises.devices/issueCommand)\nwith `type = WIPE`, or provide a [`wipeParams`](/android/management/reference/rest/v1/enterprises.devices/issueCommand#wipeparams)\nobject. The `wipeParams` object can specify how to treat Factory Reset\nProtection (FRP) data, external storage and eSIMs during the wipe. You can\nprovide a set of localized messages to display to users of personally-owned\ndevices to explain the work profile deletion using `wipeParams.wipeReason`.\nThe command can be [tracked](/android/management/reference/rest/v1/enterprises.devices.operations/get)\nand [cancelled](/android/management/reference/rest/v1/enterprises.devices.operations/cancel)\nuntil it is acknowledged by the device or it expires.\nAfter the device confirms the completion of the WIPE command to the server, the\ndevice record is deleted.\n| **Note:** A deleted device record is no longer returned in calls to [`enterprises.devices.list`](/android/management/reference/rest/v1/enterprises.devices/list). Any further API calls the EMM makes using the device ID result in a 404 error. The device is no longer manageable and must be reprovisioned to be managed again.\n\nRELINQUISH_OWNERSHIP command\n----------------------------\n\nThis method is used when a company-owned, personally-enabled device is converted\nto a personally-owned device. It deletes the work profile from the device and\nremoves the device from management. Any data or apps in the personal profile of\nthe device are preserved. Any [`PersonalUsagePolicies`](/android/management/reference/rest/v1/enterprises.policies#personalusagepolicies)\nthat were set by the EMM are removed.\nThe device record is deleted after this action.\n\n[`enterprises.devices.delete`](/android/management/reference/rest/v1/enterprises.devices/delete) method\n-------------------------------------------------------------------------------------------------------\n\nCalling [`enterprises.devices.delete`](/android/management/reference/rest/v1/enterprises.devices/delete)\nimmediately deletes the device record.\n\nThe server sends a wipe instruction to the device. For company-owned devices,\nthis triggers a factory reset. For personally-owned devices, this deletes the\nwork profile. However, if the device is offline when `enterprises.devices.delete`\nis called and remains offline for more than 30 days, the wipe instruction won't\nreach the device, and company data will remain.\n\nBecause data wiping is not guaranteed with this method, it is recommended only\nwhen data must be removed from Google servers within a specific timeframe,\nsuch as when a company requests the EMM to immediately delete all company data.\n\n[`enterprises.delete`](/android/management/reference/rest/v1/enterprises/delete) method\n---------------------------------------------------------------------------------------\n\nFor EMM-managed enterprises, the EMM can call [`enterprises.delete`](/android/management/reference/rest/v1/enterprises/delete),\nwhich deletes the enterprise record and all associated device records. This has\nthe same effect as calling [`enterprises.devices.delete`](/android/management/reference/rest/v1/enterprises.devices/delete)\non each device within the enterprise.\n\nFor customer-managed enterprises, this method is not supported. Instead, the IT\nadmin can delete the enterprise using the [Google Admin console](http://admin.google.com)\nor the [Google Play Console](https://play.google.com/work)."]]