Prevent work profiles being removed after wipe or factory reset using Android Management API

100 Views Asked by At

I'm developing a EMM solution to control the device of my organisation using Android Management API.

After provisioning a device using QR Code, the policy is installed a "DApp" by default which can't be uninstalled.

My intention is this "DApp" can't be removed by the at any time. So in the policy Factory Reset is disabled.

{
  "frpAdminEmails" : ["[email protected]"],
  "factoryResetDisabled": true
   .....
}

This policy is disabled the Factory Reset in "Device settings" also asking for Device Owner email (Admin Email Configured) after doing "Wipe Data" from "Boot options".

But after authenticating with "Owner Email" mobile got installed freshly as new mobile.

My policy is wiped from the device and "DApp" also not installing, since policy is removed.

I've verified the device status after provisioning. The devices is configured with following flags

 { 
   "managementMode": "DEVICE_OWNER",
   "ownership": "COMPANY_OWNED"
   .....
 }

Kindly help me to persist the Policy and DApp after factory reset or wipe data.

Policy JSON, Device details after provisioning the device

1

There are 1 best solutions below

0
Anup On

The "frpAdminEmails" is use to unlock the device for normal use. If you want to reapply the policy you have to reenroll the device. Or if you want the device to automatically take the policy after reset use Zero touch enrollment.