清除裝置資料及取消佈建
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
取消佈建是指從管理系統中移除裝置的程序。如果裝置要報廢,或是員工離職時需要從個人裝置移除公司資料,就必須執行這項操作。
您可以使用下列四種方法取消佈建裝置並清除公司資料:
- WIPE 指令
- RELINQUISH_OWNERSHIP 指令
enterprises.devices.delete
方法
enterprises.delete
方法
WIPE 指令
這個方法會觸發公司裝置恢復原廠設定,並刪除個人裝置的工作資料夾。呼叫 enterprises.devices.issueCommand
並傳入 type = WIPE
,或提供 wipeParams
物件。wipeParams
物件可指定在清除資料期間如何處理恢復原廠設定保護機制 (FRP) 資料、外部儲存空間和 eSIM 卡。您可以提供一組本地化訊息,向個人裝置使用者說明工作資料夾刪除作業,方法是使用 wipeParams.wipeReason
。在裝置確認或逾期前,您可以追蹤及取消指令。裝置向伺服器確認已完成抹除指令後,裝置記錄就會遭到刪除。
RELINQUISH_OWNERSHIP 指令
當公司擁有的個人啟用裝置轉換為個人擁有的裝置時,系統會使用這個方法。系統會從裝置中刪除工作設定檔,並將裝置從管理服務中移除。裝置個人設定檔中的所有資料或應用程式都會保留。系統會移除 EMM 設定的任何 PersonalUsagePolicies
。這項操作完成後,裝置記錄就會遭到刪除。
呼叫 enterprises.devices.delete
會立即刪除裝置記錄。
伺服器會將清除指令傳送至裝置。如果裝置為公司所擁有,系統會將裝置恢復原廠設定。如果是個人裝置,系統會刪除工作資料夾。不過,如果裝置在呼叫 enterprises.devices.delete
時處於離線狀態,且離線時間超過 30 天,系統就無法將清除指令傳送至裝置,公司資料也會保留在裝置上。
由於這個方法無法保證資料會完全清除,因此建議僅在特定時間內必須從 Google 伺服器移除資料時使用,例如公司要求 EMM 立即刪除所有公司資料。
如果是 EMM 管理的企業,EMM 可以呼叫 enterprises.delete
,刪除企業記錄和所有相關聯的裝置記錄。這與在企業中的每部裝置上呼叫 enterprises.devices.delete
的效果相同。
如果是客戶管理的企業,則不支援這個方法。IT 管理員可以改用 Google 管理控制台或 Google Play 管理中心刪除企業。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間: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)."]]