yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 General] sztupy:
a fat fsck will corrupt the filesystem badly, probably this is what happens if an rfs partition gets mounted as vfat without check=no. In rfs mode however as there is no way to fsck the partition imho no checking will occur. Probably the claimed corruption will occur in the following two places:

1. when fsck.rfs gets run inside init on /system, which is mounted rw, and it corrupts /system (as fsck-ing an rw parition is a bad idea)

2. when the kernel gets replaced and fsck.rfs can run on an "ro" /system and breaks while trying to fix the partition which was actually never checked.

exec is no-op in the android init, but this is samsung's init, and it does have fsck.rfs built in too, which has to get run somewhere. Porbably this somewhere is the "apply_disk_policy" line.

As unproven claims are bad for the health (so I'm still waiting for real proof of this corruption), I did some disassembling to prove the second part of this post. Unfortunately IDA was not able to crosslink the command names to their subroutines (and the fact that it has libc statically compiled makes the disassembling even harder), but I went on with opening both the original source code, and the disassemlby, and checking them side by side.

In the original code exec is:

int do_exec(int nargs, char **args)
{
return -1;
}

This should translate in ARM to something like MOV R0, #-1; BL xxxx. Checking the disassemlby output I could only find one place where something similar happens, and I think that belongs to do_import (as that is also a no-op).

While this nowhere near a complete proof I think samsung's init does contain a minimal implementation for exec, but only for samsung's own selfish purpose.
[Galaxy S I9000 General] sztupy:
line 262

mkdir /system/etc/security/drm 0777
chown root root /system/etc/security/drm
chmod 0777 /system/etc/security/drm
#Permission for WMDRM sample.hds file
chmod 0777 /system/etc/security/drm/sample.hds

line 408

chmod 0777 /system/etc/audio/stream_speaker.txt
chmod 0777 /system/etc/audio/stream_headset.txt
chmod 0777 /system/etc/audio/stream_earpiece.txt
chmod 0777 /system/etc/audio/situation.txt
chmod 0777 /system/etc/audio/aeqcoe.txt
chmod 0777 /system/etc/audio/soundbooster.txt
chmod 0777 /system/etc/audio/srstunning.txt
chmod 0777 /system/etc/audio/ArkamysTuning.txt

these things are probably already set up inside factoryfs.rfs, but still, they're there and polluting init.
[Galaxy S I9000 General] hardcore:
/dev/block/stl9 /system rfs ro,noatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0

@sztupy:

Another interesting thing is the log_off option. This option can't be set by mount, and you won't get this option if from a rw, u manually do a remount to ro.

So I guess it must be set somewhere else? Interesting I got these options just by:

- adding the -o check-no to the /system mount command

- fixing the post-init.sh to correct reset /system to ro

From what I've seen, if u have the log_off option set, if u then remount-rw using mount and try to modify /system, some corruption will occur! So if log_off is set, then its only safe to modify /system from CWM update.zips.
[Galaxy S I9000 General] RyanZA:
I'd assume that all of these lines are simply erroring out and doing nothing, unless we can find further proof. Because 'ro' really is 'ro' -- it's a kernel level setting, and it is definitely being applied outside of /init - so 99% sure it is being applied inside /init as well. Easy enough to test -- simply add a link to write a file to /system inside /init and see if it shows up. Probably won't. ;)

Awesome info! Looks like Samsung really has modified exec to run their RFS check? But for their specially created RFS check to actually corrupt their own filesystem seems fairly unbelievable? This obviously isn't the FAT32 check either, because that one would make the system unbootable.

Pretty interesting anyway!
[Galaxy S I9000 General] sztupy:
Simply open samsung's init, you can find some strange strings there that are probably from a command that checks the file system, which has to get runned somewhere. And "fsck.rfs" can't be on /system, because if /system is corrupted you can't actually check it.
[Galaxy S I9000 General] sztupy:
but wouldn't this mean that on stock kernels if you remount /system to rw it will get corrupted? (as /system has log_off in stock kernels as you previously mentioned?)
[Galaxy S I9000 General] RyanZA:
remounting /system to rw in stock kernels does not appear to cause corruption (and the log_off does not appear either, at least for me)
[Galaxy S I9000 General] sztupy:
Oh, okay.

Btw. it seems the "llw" option gets replaced with "log_off" during a remount, and there is also no way of getting the "llw" option back.
[Galaxy S I9000 General] hardcore:
The corruption is somewhat random. But I'm pretty sure log_off appears on stock kernels, last time I tried. It seems to go with the -ro.

It could mean that the rfs journal is off or something like that.
[Galaxy S I9000 General] AnnihilatorSC:
But we already know it is. :)

That being the case, YOU have the power to fix it: by adding an option to ULK to convert /system to ext4 as well. ;)
[Galaxy S I9000 General] sztupy:
It might be a problem with busybox's (re)mount functionality.
[Galaxy S I9000 General] RyanZA:
Looks like you can set llw back :

mount -o remount,rw,llw /dev/block/stl9 /system

Gives

/dev/block/stl9 /system rfs rw,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset utf8 0 0
[Galaxy S I9000 General] sztupy:
Yep, it works. Didn't worked if I only added /system (without /dev/block/stl9), and only works in rw mode, not in ro mode.
[Galaxy S I9000 General] RyanZA:
Makes sense it only works in rw mode -- no need for journaling if you're mounted ro.
[Galaxy S I9000 General] putkte:
hello,

i got that corrupted system rfs partition.

i got i i had jfs and all partitons and then i converted it back to rfs.

and now it's corrupted. Mine phone onlyh boots on speedmod kernel. dosent boot on stock or voodoo kernel.

we debuged this today with curious. i have this corrupted rfs still on if some want want run test on it.

you can find me on irc Frd^@freenode.
[Galaxy S I9000 General] RyanZA:
If your phone boots on sztupy's kernel, then it can hardly be corrupted, can it? Incompatible maybe, but not corrupted - sztupy's kernel uses the identical RFS drivers that the stock samsung and voodoo kernels use, after all - so if sztupy's kernel can understand /system, then so can the others.

Issue is probably related to different init.rc looking for different stuff in some way, check dmesg and that kind of thing by booting into recovery.
[Galaxy S I9000 General] pele78:
not sure if it has been said but

Is there any info on who this may affect ?? :confused:
[Galaxy S I9000 General] sztupy:
Or to the fact that /system gets checked and fsck dies...

@putkte: could you send a logcat and dmesg log, when you're running on stock/voodoo (probably the latter, as on stock adb is not enabled on boot afaik)? "adb bugreport" command from the PC comes in handy.
[Galaxy S I9000 General] putkte:
when i rebooted on voodoo kernel i mounted /system ok. but it was missing totally /bin dir under it voodoo pre-init crashed becuse there was no df bin.

and all mine partitons are in rfs mode so then i should be able to boot on stock kernel also?
[Galaxy S I9000 General] RyanZA:
Would be the opposite of that -- stock and voodoo have check=no, so only your kernel would be doing the checking. If fsck was failing, it would stop your kernel from booting, not the others.

Unless check=no actually means check=yes -- and I guess this is possible. :D

EDIT: Alternatively, the RFS log file may be out of date from not being used, and when it attempts to use it in stock/voodoo, it mangles the files.

There are a LOT of possibilities, with outright corruption being one of the least likely since all your data is still readable by the sztupy kernel, correct?

DMESG may shed a lot of light. :)
[Galaxy S I9000 General] pele78:
Bump? I'm aware that it affects docs rom jpa and jpo but what about the barebone rom?

Need details not politics please.

Doc is not around atm, so if someone could answer I could put a big post up to warn users for the time being as this is like 1% known...
[Galaxy S I9000 General] xcreatir:
Is the

"System UIDs Inconsistent" message related to this topic?

Is there a way to get to know which files got corrupted and manually replacing them?

Edit: hardcore kernel with all jfs lagfix here
[Galaxy S I9000 General] RyanZA:
I'd recommend not panicking... it doesn't even appear to be actual corruption, which means it can probably be repaired in some way, or the issue avoided entirely even if you have hit it.

I have been able to reproduce the issue of losing /system/bin now

ls l /system/
ls: /system/app: No such file or directory
ls: /system/xbin: No such file or directory
ls: /system/usr: No such file or directory
ls: /system/media: No such file or directory
ls: /system/firmware: No such file or directory
ls: /system/fonts: No such file or directory
ls: /system/lib: No such file or directory
ls: /system/bin: No such file or directory
-rw-r--r- 1 root root 593 Nov 13 15:04 SW_Configuration.xml
rw-r--r- 1 root root 2266 Nov 13 15:04 build.prop
drwxr-xr-x 1 root root 0 Nov 13 16:00 etc
drwxr-xr-x 1 root root 0 Nov 13 16:01 framework

It appears to be directly related to remounting as rw with the no journals option. It goes back to normal when mounted ro. Looks to be some type of RFS journaling bug going on here. As always, RFS is a pleasure to use! :D
[Galaxy S I9000 General] RyanZA:
No files are actually corrupted, so replacing them isn't the answer. :)
[Galaxy S I9000 General] pele78:
Thanks ryan, just wanted to see what was going on, was concerned about all those users.......
[Galaxy S I9000 General] hardcore:
Yes it looks like some RFS journal bug - its not safe to just remount as rw from ro.

BTW, I've released speedmod k9 which mounts /system differently, and a bunch of people now get stuck at boot - presumably because /system is corrupted and can't be mounted for them, but when they revert to the k8 kernel with the 'wrong' mounts for /system, it boots.

But for another bunch of people k9 and k8 are okay.

Maybe this is the /system corruption curio was talking about.
[Galaxy S I9000 General] leoon:
A yes/no simple question:

I used DocRom froyo v7, and now I'm using Insanity v0.94,

Is there a chance to totally brick my phone using any of those roms (since they use lagfix and kernels etc.)?
[Galaxy S I9000 General] sztupy:
I mean when it gets checked by init.
[Galaxy S I9000 General] sztupy:
What if a code like this is used for back and forwards compatibility:

/sbin/busybox mount -t rfs -o ro,check=no /dev/block/stl11 /system
if /sbin/busybox [ -f /system/bin/sh ]; then
echo Hooray, bin still contains sh
else
/sbin/busybox umount /system
/sbin/busybox mount -t rfs /dev/block/stl11 /system
fi;
[Galaxy S I9000 General] sztupy:
If you have 3-button recovery and have saved the contents of /efs then you can't brick the phone while using faulty kernels.
[Galaxy S I9000 General] mr_at_sgs:
ignore my post
[Galaxy S I9000 General] sunwee:
i have this problem too. usually the affected files are media related. the missing files will end up in LOST.DIR.

as RyanZA suggested, it happens to him when he pulls out the battery while the "media scanning" is going on but afaik i have never done that.

any ideas to narrow this down? i am also using ULK kernel. it happens whether i use ext-4 or just plain no lagfix.
[Galaxy S I9000 General] danamoult:
Speaking from a non-techy perspective...if this corruption really is there and it affects my phone, will a simple complete reflash fix it or will it be permanent?
[Galaxy S I9000 General] DamianGto:
Hmm a have pulled my battery many time when it bnot up or the media is scanning and never got a corrupted system.

Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
[Galaxy S I9000 General] supercurio:
Oops, flamewar starter topic name ^^

I'm writing a new post named Details about /system RFS corruption and HOWTO correct it http://xdaforums.com/showthread.php?t=848471
[Galaxy S I9000 General] MaelstromXC:
Sorry, I have a few questions regarding this and I am a noob...

How do you save the contects of /efs?

Also, I don't think OCLF have any chances of causing this corruption since it doesn't touch /system, right?

Lastly, does this issue relate to the internal sd corruption people experienced? Maybe not, because as supercurio suggested, it would work as long as people continue to use the same kernel, but there are people who's phone just didn't work after a month without any flashing.
[Galaxy S I9000 General] :
:eek:

Well this is a bug of Kernels with ULF i think. It happens if you convert the filesystem with ULF while sd-card is inserted. Some video and music files on the sd-card will dissapear or get 0 size.

At least it happens to me everytime.
[Galaxy S I9000 General] sunwee:
in my case i don't think it happened that way. neither due to pulling the battery while media scanner is running. and i also always reboot by shutting down and then starting up again. (no using those quick reboot methods)

could it be related to usb debugging always default to on?
[Galaxy S I9000 General] Ticiano:
I'm concerned about this since I've tested here some different lagfixes and I'm shure not all the times I made the right choices. I'm wondering the easyest way to make shure my system partitions are back to the stock situation.

I'm not a developer, just a curious user and a potencial danger to my own Galaxy S.

I'd be fine if I just flash the stock ROM with Odin using that "Re-Partition" option selected?

Thank you.
[Galaxy S I9000 General] zurchpet:
Yes. Just flash stock with Odin with repartiotion option on.

But you will lose your data. Make Backup of everything important first.
[Galaxy S I9000 General] brack11:
Does this mean that when I use root explorer and remount system as rw to remove/update some system apps I potentially damage the system?
[Galaxy S I9000 General] g00ndu:
@hardcore,

Not sure if this is appropriate, but would issuing a command in adb like

mount -o remount,rw check=no /system

be able to eliminate the possibility of corruption if I want to set the system to rw?

Also, just to report, I believe that rfs does corrupt elsewhere as well.

I remember flashing the dxjpa rom via odin the time the dbdata was installed correctly. Even Titanium Backup reported that 86mb was in the dbdata folder.

Due to the K9 upgrade that resulted in the hang, I reflashed the whole package again. But this time after applying K9, there was no huge files in the folder. All the files were now found in the LOST.DIR folder, with filenames being renamed as numbers. I know this because "Smart Life" mp4 which is 51+mb, has a number filename.This could only mean that they cannot be installed at all. Corruption maybe?

Please note that every time I flashed a rom, i would always wipe and do a factory reset.

Just thought of highlighting this and perhaps others might faced similar problems.
[G2 and Desire Z Q&A, Help & Troubleshooting] dietotherhythm:
Just like the title says, I'd like to unroot and go back to factory defaults like it was fresh out of the box. I've already messed up quite a few things on it and would just like to start over ~_~
[G2 and Desire Z Q&A, Help & Troubleshooting] g_grey:
by going to the development forum and reading the stickies and following directions
[G2 and Desire Z Q&A, Help & Troubleshooting] dietotherhythm:
thank god for smart ass answers. Without jag offs like you we'd all be lost in this world!

No but seriously **** munch, I was hoping for some details in what order I would need to do everything seeing as how there are some warnings on downgrading straight to stock. Thanks for your next-to-useless advice though.
[G2 and Desire Z Q&A, Help & Troubleshooting] G1_enthusiast:
LOL thats pretty funny hahah

did u do a back up?
[G2 and Desire Z Q&A, Help & Troubleshooting] dietotherhythm:
sadly i did not, I was messing with overclocking and somehow messed up some permissions and i'm kinda stuck in a loop. Not sure how to enable read/write to my system while in a root explorer and adb is just giving me some weird message about color being incorrect when I try to access system... bleh, could always be worse, at least i'm not bricked yet right? heh
[G2 and Desire Z Q&A, Help & Troubleshooting] sinistersai4d4d:
Could you use somebody elses clockwork backup?
[G2 and Desire Z Q&A, Help & Troubleshooting] dietotherhythm:
I tried that once with my old G1 and I've had mixed experiences, sometimes I would get MD5 checks that didn't match up and once actually backed up my step fathers G1 while rooting his and ended up accidentally loading it up on mine.

Worth a shot I guess.
[G2 and Desire Z Q&A, Help & Troubleshooting] g_grey:
you can use someone else's backup, but the unroot threads all tell you the order in which you need to do things, without searching and reading you will never do anything on your own which is ridiculous. there are a few different threads that tell you how to unroot your phone if you just read everything through it will all make sense
[G2 and Desire Z Q&A, Help & Troubleshooting] G1_enthusiast:
think its ur best bet man.. why do you want to go back to stock?
[G2 and Desire Z Q&A, Help & Troubleshooting] Big Dawg 23:
He did a little too much tweaking and has it phone hosed up.

Best of luck to him. I am sure he will now do a back up before messing with things. I have opted to do that every time now with Rom Manager. Its nice to be able to revert quickly.

I did the CM 6.1 RC1 but GPS and battery life not so good. Luckily I had a Backup that I was able to restore days later. With the assistance of Titanium I get everything else set up. Email is no big deal as I have exchange and Gmail.
[G2 and Desire Z Q&A, Help & Troubleshooting] vrav:
Please see this thread. I had used this to reset my G2 back to stock and then went ahead and rooted it with rage.

http://xdaforums.com/showthread.php?t=831398
[G2 and Desire Z Q&A, Help & Troubleshooting] shortlived:
Heres another smart ass one for ya http://www.google.com/m/search?pbx=...sdt=21595&q=how+to+revert+stock+g2+bootloader
[Captivate General] prim8:
I'm hoping this can be a place to discuss tips and tricks for getting the Captivate GPS working better.

Things where we can share what ROMS seem to work better, Jupiter files and LBSTestMode settings.

LBSTestMode settings found in this thread.

It also discusses changing the pool settings.

http://xdaforums.com/showthread.php?t=732030

Original/Stock Settings:

SUPL/CP Settings/SErver FQDN Type/Custom Config

Application settings/Operation Mode/Standalone

SUPL/CP Settings/Server/www.spirent-lcs.com

SUPL/CP Settings/Port/7275

Second suggested setup (from other posts and claimed to have great results):

SUPL/CP Settings/SErver FQDN Type/Custom Config

Application settings/Operation Mode/MS Based

SUPL/CP Settings/Server/supl.google.com

SUPL/CP Settings/Port/7276

Other settings that I have played with:

Application settings/SkyHook/On (and Off)

SUPL/CP Settings/SErver FQDN Type/Auto Config (and Custom Config)

In this thread they talk about modifying and replacing the jupiter files helping the GPS lock.

http://xdaforums.com/showthread.php?t=789383&highlight=jupiter

This thread is for the Cog ROM. Some have reported that the last two ROM versions have improved their GPS substantially. The ROM developer has stated he hasn't been working with the GPS so improvements if real or imagined are accidental. It's still worth noting for discussion that Cognition 2.3b5 and 2.3b6 may improve GPS.

http://xdaforums.com/showthread.php?t=786532

Another thread using GPS drivers from JM9 to try and fix the GPS in Froyo

http://xdaforums.com/showthread.php?t=831725

Thread suggesting a google maps update improved the gps.

http://xdaforums.com/showthread.php?t=842232
[Captivate General] prim8:
I wanted to add for discussion that is it possible that the recent update of Google Maps improved error correction which may be seen as an overall improvement in the Captivate GPS?
[Captivate General] ari197:
my experience with google maps is rather bad .. I could get a lock-up using GPS Status and waizer .. but never with google maps ..

I also notice that I lost gps lock whenever I change apps ..
[Captivate General] prim8:
I have noticed that the GPS disconnects then has to restart when you enter a new app. I would think this would be a warm start but it never seems to lock any quicker.

Have you tried Google maps in the last couple of weeks? I'm running Cognition 2.3b6 and MyTracks are all over the place. It generally follows my path (no crazy ivans or anything) but it strays off the road fairly often.

Google Navigation seems to be pretty accurate now. Whether it's Cog, random Captivate GPS hot streak or a change in the way Google handles the GPS we may never know.
[Captivate General] prim8:
Saw http://xdaforums.com/showthread.php?t=842232 today, it supports my theory that maybe a google maps update and not cognition roms are responsible for improved gps.
[Captivate General] tamanaco:
Add me to the list of those that believe that the recent Goggle Maps update improved my GPS performance. After the update I get several satellites in view after a few seconds and locks on GPS after ~20 to 25 seconds. Before the update, my Captivate took a little while to get sats in view and rarely locked unless I stood still for a while in an open area on a sunny day. Now I get locks by the window of my apartment on cloudy days where I "rarely" got locks before even on clear days. Not saying that it's fixed... just saying that it has improved considerably after the GM update. Your mileage might vary.
[Captivate General] SiL3nTKiLL:
the new google maps did pretty good for me :)