Enable debug mode.
Do a fresh start cleaning all.
Restart phone but remove sim card.
Before connect on wifi, plug the phone on USB and type this lines of code via fastboot mode:
adb devices
adb shell
pm list packages | grep ‘google’
pm list packages | grep ‘work’
pm uninstall -k --user 0 com.google.android.apps.work.oobconfig
Give me a reply if it works for you!
Thanks!
These cmds didn't help, but looks like this one helps (found it with logcat):
pm uninstall -k --user 0 com.google.android.gms
However, if do uninstall "com.google.android.gms", then no google play anymore (and other problems with login to google account).
So the problem inside Google Play (inside com.google.android.gms) that it does some checking if phone connected to the Google LLC or other business account (e.g. saying "This device is managed", "Your device at work", "Your device will automatically reset in 1 hour 40 minutes").
Someone told me the solution (that actually works and simple setup):
1. Do factory reset (could be from general settings menu or from fastboot menu that is recovery/factory-reset).
2. Setup phone without access to internet and without SIM card (like press "do it offline", "will add network connection later").
3. Go to settings / applications
4. Find Google Play services, open it
5. Find list of permissions, click on it (that non obvious that can click it)
6. Find "Phone" in the list of permissions for the Google Play services and disable it (so now "Google Play services" has no access to "Phone").
7. That's all. Connect to Wifi, insert SIM, login to google account. Use your phone. Everything works and no more of this struggling message (with auto reset every 2 hours).
I used it for Google Pixel 3 locked phone (attached to Google LLC), so I don't know if it works for other cases.