If Android is open source, why do we need to pay for an unlock code?
I had a question, if Android is open source and free, why is it still necessary to unlock an Android phone before using it with another carrier? Why is the easiest way to just spend $20 and buy an unlock code from some company, and why can't we just generate this unlock code by ourselves?
Are locked phones flashed with some kind of special firmware that checks the SIM card to make sure it's allowed? Or is the locking hardware based? I know that locking makes it so your phone only works with the carrier you bought it from, but how exactly does it work? What is stopping you from using another carrier's SIM card? The phone's software, hardware, or something controlled by the carrier? I'm curious about this because after punching in unlock codes, the phone seems to instantly recognize that the unlock code is either correct or incorrect, without a 'please wait' screen while the phone is contacting the carrier to check whether not the code is correct.
It would be great if someone could explain this to me and how it works. Thanks!
Re: If Android is open source, why do we need to pay for an unlock code?
The short answer is that Android source code (https://source.android.com/) is free, but that's not actually what you get when you buy a phone from a carrier. You get the carrier's version of that source code, which isn't free, and which is why they can implement a SIM lock.