Google devices cannot be unlocked locally. My USA spec Pixel 5, purchased unlocked from Best Buy, had to be connected to the internet - and I don't remember, but I may have also had to put a SIM card in - before it could be unlocked. Apparently a background service automatically checks with Google's servers whether the device is eligible for unlock (is it paid off or still under financing, and which carrier is it from?) and then automatically fetches the unlock code if Google decides to allow it. But the default state until that happens is locked with no possibility of unlocking.
So it's very unlikely that you'll be refused the unlock on a device you just purchased, and if you are then you can just return the device, but I don't like the internet requirement since that means Google's unlock code service and all the other Google applications on the phone sent out a bunch of information about my device to Google.
When I tried initially unlocking the option was grayed out and unusable. I had to find information about the internet connection requirement online.
I don't know whether OnePlus does something like that - my OnePlus 7 Pro was connected to the internet before I attempted to unlock it, but I'm receiving a OP 9 Pro today and would like to unlock it as soon as I get it without connecting to the internet or putting in a SIM card. Will see how that goes.
The OnePlus 9 Pro also required an internet connection, and I had to enable Google Play Services for the OEM unlock option to be enabled. I bought this phone unlocked directly from OnePlus.
Interesting, I can't find any such requirement online about OnePlus devices, but I did come across this mentioning that a law passed in California forced Google to do this on some devices:
Yes. That's what I'm talking about. Not carrier unlock. Bootloader unlock is blocked until the phone is fully paid off (if purchased under loan), and I believe T-Mobile requires a 40 day wait before bootloader unlock is allowed even if you pay in full upfront, and I think Verizon prohibits it completely. Google enforces these rules on their devices and requires the phone to connect to Google to authorize bootloader unlocking. It's an automated version of the manual bootloader unlock codes that some manufacturers do.
So it's very unlikely that you'll be refused the unlock on a device you just purchased, and if you are then you can just return the device, but I don't like the internet requirement since that means Google's unlock code service and all the other Google applications on the phone sent out a bunch of information about my device to Google.
When I tried initially unlocking the option was grayed out and unusable. I had to find information about the internet connection requirement online.
I don't know whether OnePlus does something like that - my OnePlus 7 Pro was connected to the internet before I attempted to unlock it, but I'm receiving a OP 9 Pro today and would like to unlock it as soon as I get it without connecting to the internet or putting in a SIM card. Will see how that goes.