On July 26 the US government announced new rules that make it officially legal for iPhone owners to “jailbreak” their device and run unauthorized third-party applications.
Unlocking a smartphone for use on a different carrier then you got it with has been legal in the US (thanks to a DCMA exception) as well as in Europe for some time now. The bad news for iPhone users is that Apple and AT&T do not provide any way to officially sim-unlock the devices…
Apple has an official policy about unlocking iPhones and there are authorized carriers that can execute a legal “factory unlock” without voiding your warranties around the globe. This unlock process happens through Apple’s own servers and is based on the iPhone IMEI code. There’s no way you’ll get this factory unlock in any country if the iPhone came to you through AT&T.
There is only one way to unlock your iPhone, which is to jailbreak it. Until a few days ago, the jailbreak wasn’t legal or illegal. Hackers have been hard at work on jailbreaking iOS 4 since it was released in June. With last Monday’s decision by the U.S. government, their efforts are now considered legal. The process still voids your warranty — so be sure to backup your device and restore it to a non-jailbroken state before you walk into an Apple Store to ask for help.
In addition to allowing access to legitimate third-party software, both free and paid, through services like Cydia, jailbreaking can also be used to pirate App Store software, one major reason why Apple has fought the practice. In my opinion, if Apple really wanted people not to jailbreak their iPhones and use Cydia, they should just allow people to “factory unlock” their devices after the 2 years contract with AT&T is expired. Otherwise, you’re forced to do so only to legitimately use your iPhone with an alternative carrier (be it inside or outside the US).