Yesterday we told you that MuscleNerd pointed out a Chinese hacker Loktar_Sun managed to manipulate SAM (Subscriber Artificial Module) to unlock any model of the iPhone on any baseband. This is some very big news because we have not seen a new software unlocking solution that adds support for all basebands and all models of the iPhone for a very long time. For those of you who are interested in unlocking your iPhone 3GS, iPhone 4 or iPhone 4S (CDMA + GSM) on any firmware above iOS 5.0 and also any baseband version you will be glad to know in this how to guide you will learn how to do just this.

Before you start however, there are a few things you need to keep in mind. First of all you need to make sure that you have Jailbroken iPhone that has not been listed on any  IMEI blacklists. Secondly, you will need to ensure you have the latest version of iTunes and also know which carrier your iPhone is locked to. Finally, please keep in mind that this process only applies to the SIM card you carry it out on. This means if you have another SIM card you wish to use on your unlocked iPhone you will need to repeat this process.

Unlock Jailbroken iPhone On Any Baseband

Step 1) – The first thing you will need to do is open up Cydia on your iPhone and add a 3rd party repository from the developer who created SAM. With Cydia open go into the Manage tab, followed by the Sources section, and then tap the Edit button proceeded by the Add button and type in the following URL:

Unlock iPhone With SAM

Note: Be patient when adding the repo shown above. It is currently under a lot of stress, and it took me about 10 minutes before Cydia was able to process the repo properly.

Step 2) – Once the repo shown above has been added you will need to go into the sources page by simply tapping on it from the list of installed source and then find the SAM package.

Unlock iPhone With SAM

When you see SAM you will need to install it to your iPhone.

Unlock iPhone With SAM

WARNING: Make sure the SIM card you would like to use on your unlocked iPhone is inserted before moving on.

Step 3) – With SAM installed you will now need to open the utility by tapping the SAMPrefs icon on your SpringBoard (homescreen).

Unlock iPhone With SAM

Step 4) – Go into the Utilities tab and then tap on the De-Activate iPhone option. In order to double check that your iPhone is truly de-activated return to the main settings menu and go into the More Information tab. Look at the ActivationState label and it should display as Unactivated.

Step 5) - Now go back to the main settings pane once again, and then into the Method tab where you will need to select the By Country and Carrier option. You will then need to select the Country you are going to be using your iPhone in and then your actual Carrier. Please keep in mind that for some carriers with more than one network ID you will need to select the SIM ID option instead of selecting your carrier’s name.

Step 6) – After you have selected your carrier that you wish to use your unlocked iPhone with go into the More Information tab once again and copy the IMSI number that is present in the SAM Details section

Step 7) – With the IMSI number copied down somewhere safe you will need to click the Spoof Real SIM to SAM button.

Step 8 ) – When you have pushed the Spoof Real SIM to SAM button you will need to once again go back to the main screen, find your way to the Method tab and select the Manual option. Upon selecting the Manual option and returning to the main screen you will notice an IMSI input field. Paste the IMSI number you copied in step 6 now.

Step 9) – Grab your iPhone’s USB cable and connect it to your computer so that you can use iTunes to re-activate your iPhone. When iTunes has finished re-activating your iPhone you will need to double click the Phone Number label found in the details pane and ensure the ICCID matches that found on the SIM Card. Unfortunately if the numbers do not match you will need to restart the process from the beginning.

Unlock iPhone With SAM

Step 10) – As long as the ICCID numbers do match you will need to unplug your iPhone, go back into SAMPrefs and disable SAM by sliding the Enabled button to the off position. Finally re-connect your iPhone to iTunes and do not be worried if any error messages pop up alerting you that your iPhone cannot be activated. Simply ignore these messages and restart iTunes a few times.

Step 11) – After a few minutes you should notice signal bars on your iPhone. This means the process has been successful and you now have an unlocked iPhone with the SIM card of your choice. One last thing to keep in mind however, is that if you notice push notifications are not working you can simply select the Clear Push option found in SAM, followed by once again re-connecting your iPhone to iTunes.

For all of those that have successfully unlocked their iPhone following this How To guide please keep in mind that this process only works with the SIM card used during the unlocking process. If you would like to use multiple SIM cards on your unlocked iPhone then you will need to repeat the process on the other SIM cards. Additionally, it is also recommended that you manually save the activation ticket generated that allows you to use your iPhone unlocked as it could be crucial in the future to preserve your unlock.

Manually Save Activation Ticket

Step 1) – An unlock ticket will be generated after you successfully follow steps 1 – 10 outlined previously.

Step 2) – Use an SSH program to access your iPhone’s filesystem (WinSCP Windows or Cyberduck Mac OS X). You can of course also use something like iFile on your actual iPhone.

Step 3) – Navigate to the following directory:

/var/Root/ibrary/Lockdown

Once you are in the directory shown above you will need to copy the contents of the directory for each SIM card you unlock your iPhone with.

Congratulations! You should now have an unlocked iPhone with the SIM card of your choice, with its activation ticket backed up. Please leave any additional questions or thoughts in the comments section below….

Update #1: For a more detailed guide on backing up your iPhone’s unlocked activation ticket please click here.