I've been trying to create a work profile for a while, following the directions of my employer I start by installing Android Policy Device and then adding the corporate Google account. At the end of process normally GPlay Services crashes and the process ends, but sometimes I just see the "can't add work profile to this device" screen.

I've also tried adding the corporate account without Android Policy Device installed and the crash is the same.

Here is the log:

`type: crash
osVersion: google/husky/husky:14/AP2A.240705.005/2024080200:user/release-keys
package: com.google.android.gms:242835039
process: com.google.android.gms.ui
processUptime: 222817 + 217 ms
installer: com.android.vending
GmsCompatConfig version: 127

java.lang.SecurityException: Permission Denial: starting Intent { act=android.app.action.PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE cmp=com.android.managedprovisioning/.PreProvisioningActivityViaTrustedApp (has extras) } from ProcessRecord{98e066c 3879:com.google.android.gms.ui/u12a149} (pid=3879, uid=1210149) requires android.permission.DISPATCH_PROVISIONING_MESSAGE
at android.os.Parcel.createExceptionOrNull(Parcel.java:3192)
at android.os.Parcel.createException(Parcel.java:3176)
at android.os.Parcel.readException(Parcel.java:3152)
at android.os.Parcel.readException(Parcel.java:3094)
at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2087)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:2006)
at android.app.Activity.startActivityForResult(Activity.java:5886)
at qhz.platform_startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at akjk.platform_startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):4)
at qhy.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at com.google.android.chimera.android.Activity.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at qlz.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at qhw.support_startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at qib.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at qmw.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):4)
at qib.public_startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at qhz.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):3)
at android.app.Activity.startActivityForResult(Activity.java:5806)
at qhz.platform_startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):1)
at akjk.platform_startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at qhy.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):1)
at com.google.android.chimera.android.Activity.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):1)
at qlz.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):1)
at qhw.support_startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):1)
at qib.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):1)
at qmw.startActivityForResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):2)
at abdm.x(:com.google.android.gms@242835039@24.28.35 (190408-657754416):832)
at abdm.b(:com.google.android.gms@242835039@24.28.35 (190408-657754416):28)
at izw.eE(:com.google.android.gms@242835039@24.28.35 (190408-657754416):25)
at ivq.jG(:com.google.android.gms@242835039@24.28.35 (190408-657754416):29)
at ivq.f(:com.google.android.gms@242835039@24.28.35 (190408-657754416):42)
at ivq.l(:com.google.android.gms@242835039@24.28.35 (190408-657754416):15)
at izv.l(:com.google.android.gms@242835039@24.28.35 (190408-657754416):1)
at izv.onLoadComplete(:com.google.android.gms@242835039@24.28.35 (190408-657754416):21)
at jag.deliverResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):5)
at anmz.deliverResult(:com.google.android.gms@242835039@24.28.35 (190408-657754416):9)
at jaa.c(:com.google.android.gms@242835039@24.28.35 (190408-657754416):33)
at jaj.run(:com.google.android.gms@242835039@24.28.35 (190408-657754416):15)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8623)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ExecInit.main(ExecInit.java:50)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission(ActivityTaskSupervisor.java:1155)
at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1128)
at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:780)
at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1306)
at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1251)`