This question already has an answer here:

My phone is Docomo Samsung Galaxy S2. The default network is Docomo but I unlocked it by giving it to a shop I want to upgrade it to Jelly Bean will it be lock again? How can I upgrade it ?

marked as duplicate by Izzy, geffchang, roxan, Dan Hulme, ce4 Jul 15 '13 at 5:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.