I have a Samsung Galaxy S4 running Jelly Bean (Android 4.2.2). In July 2013 I took it to the UK, where I installed a UK SIM card with pay-as-you-go credit.
Here’s what I did.
1. Request a SIM Unlock
A few days before you leave the US, call T-Mobile and tell them you intend to use the phone with a non-US SIM chip, and ask them to file a “Sim Unlock Request”. You will need the phone’s IMEI, a 15-digit number most likely found in Settings under “My Device”. On my S4 it’s under Settings > More > About Device > Status.
The SIM Unlock Request takes 24 hours to process. You’ll receive an email with instructions on how to enter the SIM unlock code once you have your foreign SIM card. Print out the email! You won’t be able to access your email on your phone 🙂
2. Buy and install a UK SIM card
T-Mobile is branded as EE in the UK, so find an EE store, and get a £10 pay-as-you-go SIM card. This will get you 1GB data, 400 texts and 100 minutes for for 30 days. You can top up your SIM card at any shop where you see the “top up” logo.
Remove your US SIM card and install the new one. Your phone will prompt you to enter the SIM unlock code from step 1, which you’ve printed out for offline reference.
3. Restart your phone
When I took my phone to the UK in 2011 I had to do a lot of manual configuring on the phone: How I got my US T-Mobile phone to work in the UK. Now, all you do is restart your phone and it figures out the network by itself. And that’s it! Ask the store personnel to double-check your settings, and make sure you can get on their wi-fi, and you’re good to go!