... hes using it until factory setting reset...
This most likely indicates that the phone was jailbroken and hacktivated (i.e., not properly unlocked). When the phone was reset, the jailbreak (and thus the hacktivation) was lost, and your friend can no longer use the phone with a carrier other than T-Mobile.
You must be a current or former T-Mobile USA customer in order to qualify to receive an unlock code. Please review the unlock requirements. If you meet the requirements, call customer service or initiate a chat session from the contact us page to request an unlock code.
Please note that if you are not a current or former T-Mobile USA customer, you do not qualify for an unlock code, and cannot obtain one from T-Mobile. In such case, you will have to use a commercial unlocking service.
To reach T-Mobile customer care from abroad:
- From a cellular phone with a T-Mobile SIM card, dial 1-505-998-3793. You will not be charged for the call
- From a landline phone, dial the appropriate international dialing prefix, + 1-505-998-3793. Charges for this call will be assessed according to the plan you have with your landline long distance carrier.
You can also contact T-Force via social media to make your unlock request. Just make sure you meet the unlock requirements first. Otherwise, T-Force will not be able to help you.
To contact T-Force
Go to the Contact Us page and use the Facebook, Twitter or Google Plus link under in the “Social Support” section.