Unlocking a phone that is under contract is not technically unlawful. However, if you have an installment payment plan, many cell phone carriers will lock the device so that they can assure you that you will stay with them until the phone is paid off.