Project

General

Profile

SIM Network unlock PIN

Added by Ellen Ripley over 9 years ago

Hi,

I'm completely new on all this.

I bought a second hand Galaxy S3 (I9300) to install Replicant on it. The phone was originally bought to Orange. I did the installation despite I am not really a techie so I was very happy. But my surprise was that the phone boot with Replicant but kept asking me for a "SIM Network unlock PIN". I do not have an Orange SIM card, but a SIM from a different company. That's something I thought about before installing Replicant, but did nothing about it because I thought that installing Replicant would remove that lock. Apparently I was wrong.

So then I went to the Internet and paid for one of those services where you give them the phone model and the IMEI number and they give you the unlocking code. It did not work. I contacted the company and they gave me some other alternative methods to try to unlock the phone. But none of them succeeded. Some of those alternative methods required to enter codes into the phone keypad (123456789*0#) but those codes did not work in my phone, after entering the code I always received a "Mobile network not available". Well, not always, when entering the code *#06# I do get the IMEI number.

Any suggestion?
Is there any chance I can solve this?
Or am I going to have a SIM card from Orange to make the phone work?

Thank you


Replies (19)

RE: SIM Network unlock PIN - Added by Ellen Ripley over 9 years ago

I told them I was using Replicant. And I've just received an answer saying I have to revert to the original operating system in order for the code to work : (

Do I really need to do so?
If so, how do I do that?

RE: SIM Network unlock PIN - Added by Paul Kocialkowski over 9 years ago

The easiest way to solve this is probably to install CyanogenMod, enter the code there and install Replicant back.

Replicant doesn't get rid of the SIM lock, which is something specific to the software running on the modem (not part of Replicant and proprietary).

However, the process of entering the code to remove the SIM lock is done through the RIL, the component that deals with communicating with the modem. In the case of Replicant, it is Samsung-RIL, the free version we wrote. It is not fully featured and this specific functionality is missing, mainly because I never had to unlock the device using a code.
What would really help would be the following:
  1. Get the radio buffer logs GettingLogs on Replicant when you enter the code and it fails
  2. Install CyanogenMod (10.1 is preferred) on the device, enable adb and root access for adb and get the radio buffer: make sure it is looking very complete (ask on IRC), then enter the code and make sure to save the log
  3. Send us the log (on this thread on via email) so that I can understand what is going on and implement the feature on Replicant so that it will work for other users next time!

RE: SIM Network unlock PIN - Added by Ellen Ripley over 9 years ago

Thank you very much for your help.

But I am sorry to say that trying to get the logs may be a bit too much for my ignorance. I am not used to GNU/Linux and I feel overwhelmed trying to configure these things all by myself. However, I like so much the idea of contributing that I have tried to follow your instructions. I thought that if I was able to install Replicant maybe I would also be able to follow your instructions, but maybe I was wrong.

I connected the phone to the computer through the USB cable and entered
adb logcat -b [BUFFER]
It said daemon started on port 5037 and "waiting on device"
Then I started the phone and entered the unlocking code when I was asked for it. As expected, I did not succeed.
But nothing happened on the computer, it remained saying "waiting on device".
And I saw no log. Or are they being stored somewhere?

I am not sure if it is worth it to keep trying to get the logs or if I should directly go to solve my problem following your instructions but without contributing with the logs. I see step 2 of your instructions look even harder. Unfortunately I am a person with little free time.

RE: SIM Network unlock PIN - Added by Paul Kocialkowski about 9 years ago

I am not sure if it is worth it to keep trying to get the logs or if I should directly go to solve my problem following your instructions but without contributing with the logs. I see step 2 of your instructions look even harder. Unfortunately I am a person with little free time.

It would be greatly appreciated, but I understand that you feel this is too much for you and prefer to just have it work as soon as possible. Eventually, it is up to you to decide. I can try to provide help to guide you through the process, but I cannot guarantee that you will succeed in a reasonable amount of time.

So I think that the first thing to do here is to setup USB correctly on Replicant. Start by booting the device with no sim card, plug USB in and once it is started (homescreen is shown), plug the USB cable. On the host computer, start adb with sufficient rights. That is, you certainly have to start it as root first like this:

sudo adb start-server

This will start the adb server with sufficient rights to access the device. Subsequent calls to adb can be done as regular user.
You can then contact the device, for instance to get the radio logs:
adb logcat -b radio

If this is the first time you are contacting the device, it will ask you to confirm on the device. There is a tick box to check so that it doesn't bother you next time. Once that is done, you should see the logs on the terminal (on the host). If all of that works out, power off the device, put the SIM card in, boot it and grab the logs again:
adb logcat -b radio

While you enter the code (it will fail but you can then send the log here, which contains a trace of what happened).

When that step is completed, you should install CyanogenMod (version 10.1): (you can simply reboot to recovery and follow the same instructions as for Replicant, except that you'd be selecting the CyanogenMod zip). When CyanogenMod is up and running (do it without the SIM card), you'll have to enable ADB, grab the logs, then reboot with the SIM card, get the logs and type the code in. That's the log that is really important for us to get. That step can only be made once, so make sure that the logs are shown on the terminal!

I can provide you further help on installing CyanogenMod and enabling adb in due time!

RE: SIM Network unlock PIN - Added by Ellen Ripley about 9 years ago

Hey Paul, thank you for guiding me. I'm happy to contribute with custom step-by-step guides!

The bad news is that I got the same results: - waiting for device -

I followed your instructions. The phone asked me permission when connecting it to the computer for debugging. I was happy, it seemed to work. But that's all I got.

The computer showed - waiting for device -, nothing else.

Are the logs supposed to be seen on the computer screen? Or are they stored somewhere else?
What can I do with the phone to make sure logs are sent to the computer?
It seems like my computer does not receive anything from the phone.
Maybe I can try if the communication is ok with a different kind of logs? Maybe there is no radio log because the phone is mobile-network locked? I don't know if it makes any sense what I say...

Please let me know if you have new ideas to get the logs or if we give up and I just try to fix my phone.

RE: SIM Network unlock PIN - Added by Paul Kocialkowski about 9 years ago

Are the logs supposed to be seen on the computer screen? Or are they stored somewhere else?

They are definitely supposed to be seen on the computer. It shouldn't say - waiting for device - once connected. If you get the fingerprint verification dialog on the phone (and accept it, of course!), there is no reason why it shouldn't work. You can check the state of currently detected device with: adb devices. If it says offline, then you should plug it off and on again and make sure you accept on the dialog. You can try connection to the device with adb shell, which should give a shell on the device.

Maybe I can try if the communication is ok with a different kind of logs? Maybe there is no radio log because the phone is mobile-network locked? I don't know if it makes any sense what I say...

There should still be logs. If it says waiting for device, you won't be able to access main logs either.

Please let me know if you have new ideas to get the logs or if we give up and I just try to fix my phone.

I will not give up until you decide to. This is a unique opportunity for me to figure out how this works, so that people can unlock their phone with Replicant next time.

RE: SIM Network unlock PIN - Added by Ellen Ripley about 9 years ago

Hey Paul, I managed to establish the connection! Just removing the USB cable and plugging it back and it worked!

The problem now is on the Recovery thing. I downloaded the Cyanogenmod zip file, I started the phone in downloading mode, then I run sudo heimdall flash --BOOT recovery.img --RECOVERY recovery.img
but all I got is

Initialising connection...
Detecting device...
ERROR: Failed to detect compatible download-mode device.

I tried rebooting phone, rebooting computer and unplugging and plugging back the USB cable, and always got the error above.

Anyway, I attach the logs that I registered with Replicant.

RE: SIM Network unlock PIN - Added by Paul Kocialkowski about 9 years ago

Thanks for the logs with Replicant!

If you were able to install Replicant, there is good chance recovery is still installed, so you can just boot Replicant up, press the power button, select reboot and select "recovery". You can then pick up the steps that mention recovery (from loading the zip). It may also be easier to put the CyanogenMod zip on the phone storage or external sdcard beforehand, with Replicant.

Follow the procedure and select the CyanogenMod, don't forget to "wipe data" at the end and finally, reboot. It should then reboot to CyanogenMod. Please boot without a SIM card first, then try to grab logs. Enabling ADB requires a few additional steps on CyanogenMod, that I'd be happy to guide you through!

RE: SIM Network unlock PIN - Added by Ellen Ripley about 9 years ago

Done. I have CyanogenMod now.

So, what are those additional steps to enable ADB on CyanogenMod?

By the way, those logs that I sent here and accessible to everyone do they contain private information about me? I mean any identifier or metadata. Maybe the logs include information about antennas around from which my location might be deduce?

It's not a big deal, but I'd like to know. I am supposed to be interested not only in free software but also in privacy, but I've just realized now that posting private logs publicly does not seem one of the safest practices on privacy : )

RE: SIM Network unlock PIN - Added by Paul Kocialkowski about 9 years ago

Done. I have CyanogenMod now.

Great!

So, what are those additional steps to enable ADB on CyanogenMod?

Open the Settings app, go to About phone and tap on the Build number label 5 to 10 times. It should say you have enabled Developer options. Go back to Settings, open Developer options, on Root access, select Apps and ADB and tick the box for Android debugging. You can then plug in the device via USB. Start ADB on the host computer again:

sudo adb start-server

The device should ask for confirmation. Once accepted (make sure you tick the box to have it always accepted), you can test connectivity with the device:
adb shell

Eventually, you should be able to access the radio logs:
adb logcat -b radio

Please send those here. If they're okay, it'll be time to turn off the device, plug in the SIM card, boot it, start adb logcat -b radio and only then enter the code, while capturing the logs. Please get back to me before doing so, so that I can confirm that the logs provide enough information.

By the way, those logs that I sent here and accessible to everyone do they contain private information about me? I mean any identifier or metadata. Maybe the logs include information about antennas around from which my location might be deduce?

Yes actually, they at least contain the device's IMEI and the cell ids, which can be tracked down to a precise position. Feel free to remove them or just send them to me via private email next time, at <>.

RE: SIM Network unlock PIN - Added by Ellen Ripley about 9 years ago

We're moving forward, I got the logs now for CyanogenMod without SIM, just sent them to you through email.

How do I delete those log attachments I published here? Editing the post does not show the attachments. Do I have to delete the entire message?

RE: SIM Network unlock PIN - Added by Paul Kocialkowski about 9 years ago

We're moving forward, I got the logs now for CyanogenMod without SIM, just sent them to you through email.

Thanks, I just had a look at them, everything looks good, so we can keep going! Next step is the following: turn the phone off, put the SIM card in, let it boot, start adb logcat -b radio and once the log is shown, enter the code and it should work. It should then register to the network and you should be able to place calls.

Please send me the log as soon as possible and if you can, don't close the terminal window until I confirm it's all there!

How do I delete those log attachments I published here? Editing the post does not show the attachments. Do I have to delete the entire message?

I just deleted them -- maybe you didn't have the rights to do it yourself.

RE: SIM Network unlock PIN - Added by Ellen Ripley about 9 years ago

Done! Got it now! Unlocked.

I've just sent you the logs with the successful unlocking.

We did it!

RE: SIM Network unlock PIN - Added by Paul Kocialkowski about 9 years ago

Alright! It's all there, so I will be adding support for that in Replicant soon. Thanks a lot for taking the time to do all this!

Now your device should be unlocked, so you can install Replicant back and it should work.

RE: SIM Network unlock PIN - Added by Ellen Ripley about 9 years ago

Yes, thank you!

RE: SIM Network unlock PIN - Added by Tiberiu T about 8 years ago

Paul, is network unlock implemented in Replicant? In the stable version 4.2 0004 I believe it's not, but maybe it's implemented in the source code in Git. Is there an open ticket associated with this in the issue tracker? Thanks!

RE: SIM Network unlock PIN - Added by Kyle Rens almost 8 years ago

Ellen Ripley wrote:

I told them I was using Replicant. And I've just received an answer saying I have to revert to the original operating system in order for the code to work : (

Do I really need to do so?
If so, how do I do that?

I unlock the sim network unlock pin whit software from this page : http://www.simnetworkunlockpin.com

RE: SIM Network unlock PIN - Added by Nolan Gorel almost 8 years ago

Ellen Ripley wrote:

I told them I was using Replicant. And I've just received an answer saying I have to revert to the original operating system in order for the code to work : (

Do I really need to do so?
If so, how do I do that?

I solve this problem whit software that is the best free sim network unlock pin tool http://www.imeichanger.net/sim-network-unlock-pin/

RE: SIM Network unlock PIN - Added by Charly L over 5 years ago

Hello,

I have nearly the same case (I9300 simlocked on Bouygues, Replicant 6.0 build 2017-12-10 14:44:33 UTC) and can give some more logs if needed.

Please contact before 20th of July.

    (1-19/19)