Search code examples
android-management-apiandroid-managed-profile

Performing enterprise wipe on devices using Work Profile?


I wish to perform Enterprise Wipe on devices with Work Profiles. Essentially, this would enable admins from my company to remove all corporate-related information from a device without disturbing the individual's personal data.

I am aware a topic exists on this already: Wiping data on Android: Device Admin versus Profile Owner

However, the topic talks about factory wipe and I certainly don't wish to do that. Any hints on how to accomplish this task?

Performed research on android forums + documentation and could not find the solution.


Solution

  • You can call enterprises.devices.delete on a work profile. It will wipe and remove the work profile without touching the personal data. Which seems to be what you're looking for.

    It's actually the only wipe possible for a work profile, it's not possible for the admin to wipe the entire device when it's set up with a work profile.