Project

General

Profile

Actions

Issue #711

closed

GalaxyS I9000: No SIM card access after changing battery

Added by Flo Debian almost 11 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Urgent
Category:
Telephony and mobile data
Target version:
Start date:
11/12/2013
Due date:
% Done:

0%

Estimated time:
Resolution:
fixed
Device:
Galaxy S (I9000)
Grant:
Type of work:

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

c0.txt (124 KB) c0.txt Clockworkmod installed Flo Debian, 11/12/2013 10:48 PM
c1.txt (125 KB) c1.txt Clockworkmod installed, after battery replaced Flo Debian, 11/12/2013 10:48 PM
r0.txt (117 KB) r0.txt Replicant installed, access to sim card working Flo Debian, 11/12/2013 10:48 PM
r1.txt (164 KB) r1.txt Replicant installed, after battery replaced, no access to sim card Flo Debian, 11/12/2013 10:48 PM
rm0.txt (149 KB) rm0.txt Replicant working Flo Debian, 11/18/2013 08:35 PM
rm1.txt (71.9 KB) rm1.txt Replicant not working after battery replaced, different SIM card Flo Debian, 11/18/2013 08:35 PM
cc0.txt (233 KB) cc0.txt Clockworkmod installed Flo Debian, 11/25/2013 10:39 PM
cc1.txt (256 KB) cc1.txt Clockworkmod installed, after battery replaced Flo Debian, 11/25/2013 10:39 PM
ccc5.txt (295 KB) ccc5.txt clockworkmod radio log Flo Debian, 12/01/2013 10:46 PM
clock0.txt (316 KB) clock0.txt before battery replacement Flo Debian, 12/04/2013 07:42 PM
clock1.txt (462 KB) clock1.txt after battery replacement Flo Debian, 12/04/2013 07:42 PM
Actions #1

Updated by Paul Kocialkowski almost 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.

Actions #2

Updated by Flo Debian almost 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.

Actions #3

Updated by Paul Kocialkowski almost 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.

Actions #4

Updated by Flo Debian almost 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.

Actions #5

Updated by Paul Kocialkowski almost 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.

Actions #6

Updated by Flo Debian almost 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.

Actions #7

Updated by Paul Kocialkowski almost 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.

Actions #8

Updated by Flo Debian almost 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?

Actions #9

Updated by Paul Kocialkowski almost 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

Actions #10

Updated by Flo Debian almost 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.

Actions #11

Updated by Paul Kocialkowski almost 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!

Actions #12

Updated by Flo Debian almost 11 years ago

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.

Actions #13

Updated by Paul Kocialkowski almost 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!

Actions #14

Updated by Paul Kocialkowski almost 11 years ago

I am experiencing the same thing now. #717 reports the same behavior as well.

Actions #15

Updated by Paul Kocialkowski over 10 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

Actions #16

Updated by Flo Debian over 10 years ago

Many thanks, it's working!!!

Actions #17

Updated by Paul Kocialkowski over 10 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.

Actions #18

Updated by Denis 'GNUtoo' Carikli almost 9 years ago

  • Category changed from 69 to Telephony and mobile data
  • Device Galaxy S (I9000) added
Actions

Also available in: Atom PDF