Issue #711
closedGalaxyS I9000: No SIM card access after changing battery
0%
Description
I have installed Replicant 4.0 0005. Finally it's working so far.
But if I change batteries, I cannot access the SIM card anymore. If I
enter the PIN, it is always incorrect. Even if I deactivate the PIN
request it cannot connect to a mobile network.
In order to make it working again I have to flash clockworkmod (I am
using cm-10.2-20131104-NIGHTLY-galaxysmtd) again and then flash the
replicant image.
Just restoring a Replicant backup does not help in any ways.
Remark: Flashing with Semaphore_2.7.4 did not work for me, it can't
mount /sdcard etc when I boot into recovery mode. I used the described
work around to install the replicant recovery.img already at the
clockworkmod installation.
The logfiles are added, I used in the terminal as root: logcat -b radio -f /emmc/xx.txt -d -v raw
I deactivated the PIN not to get stuck at the PIN request.
Files
Updated by Paul Kocialkowski about 11 years ago
Looks like a segfault. Could you grab the main logcat buffer of when the problem happens with Replicant? No need to do it for CyanogenMod.
Updated by Flo Debian about 11 years ago
The logfiles I added now are produced by: logcat -b main -f /emmc/xx.txt -d -v raw. I used a different SIM card (same operator but PIN deactivated) for the 'not working' log. I hope this is of no importance.
Updated by Paul Kocialkowski about 11 years ago
Okay things are getting clear. It seems that we are receiving some junk data on the RFS transport, which probably leads to a declared size bigger than the buffer. Or it may be intended data that we do not know how to handle. In any way, I will come up with a particular ril for you to test. It is easy to fix this, but I would like to understand what that data is and how the proprietary RIL reacts to it.
(Note to self: build a ril with hexdump of the rfs buffer, check that declared length <= defined max length and log something when it happens.)
In the meantime, it would be great if you could provide full logs from CyanogenMod (the ones you uploaded has the beginning truncated), on the first boot after replacing the battery.
Updated by Flo Debian about 11 years ago
Can you tell me how the command should be to run on the Terminal Emulator not to get a truncated log?
Thanks.
Updated by Paul Kocialkowski about 11 years ago
The best way is to run adb logcat -b radio
from the host computer a bit after the phone booted up and you unlocked the sim card. Don't wait more than a minute or two or the log will be truncated.
Updated by Flo Debian about 11 years ago
adb doesn't work on CyanogenMod, so I entered at the terminal emulator logcat -b radio -f /emmc/xx.txt . It seems to me, that it's truncated again. Though I didn't need more than one minute. Nevertheless I will upload the two files. If they don't satisfy you, I will try to find other possibilities.
Updated by Paul Kocialkowski about 11 years ago
You should rather enable usb debugging (that's adb) in CyanogenMod and get logs via adb so that the buffer isn't truncated. I think that's why your logs are still truncated. We should really see the RIL starting up, which is not yet the case here :( I could probably work without these full logs but I'd prefer to know exactly what happens and how the proprietary implementation reacts to it, and your current logs don't show that.
Updated by Flo Debian about 11 years ago
This could be the problem: I haven't found the option to enable ist. Not at this version of CyanogenMod. Maybe I have to use another version of CyanogenMod. I have already searched this option yesterday but I was unable to find it. Is there a specific version where you know where usb debuging is available?
Updated by Paul Kocialkowski about 11 years ago
If you're using CM 10.1 or later, you have to follow that procedure:
Settings > About phone > Tap Build number 10 times or so > Developer settings should be enabled > Go back > Developer options > Root access for Apps and Adb > Enable Android debugging
You need a recent Android SDK to have adb working (the Replicant versions of adb will not work because they're too old).
Then you can :
sudo adb start-server adb logcat -b radio
Updated by Flo Debian about 11 years ago
Finally I found this hidden option. I started 'adb logcat -b radio' when I switched on the device. adb said 'waiting for device'. Now I hope that I got everything from beginning. Please have a look, of course I am willing do better if required. Do you need a second log for clockworkmod (battery replaced)?
This time I used cm-10.1.3-galaxysmtd (because I thought I 'developer options' are easier to find there.
Updated by Paul Kocialkowski about 11 years ago
Great, that's a full log now! Is this actually a log with the replaced battery (basically, boot once with the original battery, then turn the device off, replace the battery, turn it on and get radio logs). This may only happen on the first boot after the battery was replaced. If it is, I won't be asking you anymore log. Thanks for your patience by the way!
Updated by Flo Debian about 11 years ago
- File clock0.txt clock0.txt added
- File clock1.txt clock1.txt added
What I did: I flashed with cm-10.2-20131104-NIGHTLY-galaxysmtd,
I booted and configered a couple of times.
Then I started with log on ('adb logcat -b radio'): clock0.txt
Then I powered down and replaced battery (more than 5 sec without battery).
Then I started with log on ('adb logcat -b radio'): clock1.txt
I hope that was right.
Updated by Paul Kocialkowski about 11 years ago
Ahhhh now I understand, it's a very long multipart RFS message! I know for sure that we don't handle that properly.
Finally this last batch of logs was exactly what I needed to know, so I won't bother you anymore and will come with a fix!
Updated by Paul Kocialkowski almost 11 years ago
I am experiencing the same thing now. #717 reports the same behavior as well.
Updated by Paul Kocialkowski almost 11 years ago
- Status changed from New to Closed
- Resolution set to fixed
Fixed with commit: adc29ca0c04d5fa70f30ae0ef65315db4465c2c4
Thanks again for your very useful logs!
The fix will be part of the next Replicant 4.2 images (0002), in the meantime, you can find a binary for Replicant 4.2 at: http://download.paulk.fr/replicant/galaxysmtd/libsamsung-ril.so
Install it using ADB:
wget http://download.paulk.fr/replicant/galaxysmtd/libsamsung-ril.so adb root adb remount adb push libsamsung-ril.so /system/lib/ adb reboot
Updated by Paul Kocialkowski almost 11 years ago
Apparently, this issue causes nv_data to become corrupt. If you made a backup of /efs, restoring it after installing the fixed libsamsung-ril.so would be a good idea. If not, it is possible that the device runs with the default IMEI. There are ways to manually change the IMEI back to its correct number.
Updated by Denis 'GNUtoo' Carikli almost 9 years ago
- Category changed from 69 to Telephony and mobile data
- Device Galaxy S (I9000) added