My friend has this iPhone and she wanted it to be unlocked so that she could use the phone for another service provider. I don't have my own iPhone but I have my classmate who has it. So I ask for instructions and here it is.
1. go to http://blackra1n.com/
2. choose your OS (windows or mac) to download the software
3. install blackra1n
4. check your iphone's firmware/model (in your iphone settings/general/about)
5. connect your iphone to the pc and run blackra1n
6. just follow the instructions after runningcl blackra1n
According to my classmate, the data won't be deleted when you run blackra1n to unlock your iPhone. However, after unlocking it, you must sync it to only one iTunes because connecting it to another iTunes will delete everything in your phone. But i suggest, always backup your data everytime you change your iPhone's software.