1. Remove Google account and any kind of screen lock (fingerprint, PIN, pattern, etc.) from your device.
2. Eject sim card from your device.
3. Reset your device. In setup wizard, skip everything, don't connect to WiFi, don't add fingerprint or any kind of screen lock.
4. Go to Developer Options and enable USB debugging.
5. Connect your phone to PC.
6. Open CMD in adb directory and type
Code:
adb shell pm uninstall --user 0 com.android.phone
7. Restart your device.
8. Connect to WiFi, open Chrome and go to google.com (or any website really).
9. Go to Developer Options and enable OEM unlocking.
10. Reboot into bootloader and via CMD run
Code:
fastboot oem unlock
or
Code:
fastboot flashing unlock