Hi, you will have to get the unlock code from the Telco. tmn Portugal?
I recently purchased a U8150 from Ebay Au. and the phone had been dropped (broken screen). I purchased both digitizer and LCD screens and renewed them. I did a forced upgrade (previous owner had used screen lock) and I got the phone to work but it had SIM lock.
I contacted the previous owner and they got the unlock code from Virgin Mobile Au. (Virgin would not supply me with the code as I was not their customer!)
As soon as the first owner sent me the code, I was able to unlock and use the phone with 2 Degrees NZ.
The unlock codes are dedicated to the phones IMEI and can't be used on any other phone.
Some Telcos will unlock the phone if the contract period has expired or they may charge a Fee (usually around $80.00)
Best of luck Neil.