yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] achio1115:
Untrue, just did mine on ZSJG4. First try didn't work for me tho. until I typed the whole thing on my SGS via terminal emulator.
[Galaxy S I9000 Android Development] odyssey61:
Mine took only 2 minutes or so.
[Galaxy S I9000 Android Development] lafaya:
can you apply this fix over the mimocan's lagfix?
[Galaxy S I9000 Android Development] matty___:
And format the external sd card partition with yaffs2 instead of ext4 and mount it.

As was done with the old lag fixes?
[Galaxy S I9000 Android Development] K-mart Shopper:
networkdood. I did the same thing my first time. After entering:

# busybox dd if=/dev/zero of=/data/dataimg bs=1024 count=1048576,

you will need to wait for the # to pop up before entering more commands.

Unfortunately, I've not had success with this method on my Captivate.
[Galaxy S I9000 Android Development] odyssey61:
Should this fix be using up more disk space? I now have 706mb being used.
[Galaxy S I9000 Android Development] kalpik:
Yes! It created a 1GB file on your NAND :)
[Galaxy S I9000 Android Development] tuxing:
did you use the mimocan fix before this

thats a different kernel
[Galaxy S I9000 Android Development] odyssey61:
Is that space lost for apps then?
[Galaxy S I9000 Android Development] kalpik:
I am on stock DDJG4 kernel :) No mimocan fix!
[Galaxy S I9000 Android Development] kalpik:
Your apps will go *into* that 1GB file!
[Galaxy S I9000 Android Development] odyssey61:
And after that is full? Thanks for the reply by the way :)
[Galaxy S I9000 Android Development] kalpik:
^^ Its not easy to fill 1GB with apps ;)

When its full, you should get out of space errors.
[Galaxy S I9000 Android Development] gshklover:
Thought in the same direction...

It would require modifying the initiramfs in the zImage (changing the mount commands and adding yaffs2 support to the kernel) + copying the contents of the .rfs images to yaffs2 images.

Anyone knows if ODIN only writes images to partitions or it actually knows what type of FS there is? (looking at the contents of the firmware archives there seem to be all kind of images there: bootloader image, zImage... others are RFS partition images or smth).
[Galaxy S I9000 Android Development] bub181:
1 GB should be enough for a while, or at least until Samsung release a proper fix for this issue. The nexus one and desire only have 512 MB.
[Galaxy S I9000 Android Development] Anteuz:
My gratitudes for the kind folks who brought this fix. I/O is now flying rather than crawling.
[Galaxy S I9000 Android Development] Rithina:
Managed to perform step on 161. No errors and 1GB successfully created. However when I run the quandant, I am getting 789 score...hmm where did I go wrong?

Here is the log:

C:\AndroidSDK\tools>adb shell

$ su

su

# busybox dd if=/dev/zero of=/data/dataimg bs=1024 count=1048576

busybox dd if=/dev/zero of=/data/dataimg bs=1024 count=1048576

1048576+0 records in

1048576+0 records out

1073741824 bytes (1.0GB) copied, 201.466857 seconds, 5.1MB/s

# busybox mknod /dev/loop0 b 7 0

busybox mknod /dev/loop0 b 7 0

# busybox losetup /dev/loop0 /data/dataimg

busybox losetup /dev/loop0 /data/dataimg

# busybox mkfs.ext2 /dev/loop0

busybox mkfs.ext2 /dev/loop0

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

65536 inodes, 262144 blocks

13107 blocks (5%) reserved for the super user

First data block=0

Maximum filesystem blocks=4194304

8 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376

# mkdir /data/data1

mkdir /data/data1

# busybox mount -o remount,rw -t rootfs /

busybox mount -o remount,rw -t rootfs /

# mv /system/bin/playlogos1 /system/bin/playlogosnow

mv /system/bin/playlogos1 /system/bin/playlogosnow

# cp /sdcard/lagfix/playlogos1 /system/bin/playlogos1

cp /sdcard/lagfix/playlogos1 /system/bin/playlogos1

cp: not found

# busybox cp /sdcard/lagfix/playlogos1 /system/bin/playlogos1

busybox cp /sdcard/lagfix/playlogos1 /system/bin/playlogos1

# busybox cp /sdcard/lagfix/userinit.sh /system/bin/userinit.sh

busybox cp /sdcard/lagfix/userinit.sh /system/bin/userinit.sh

# chmod 755 /system/bin/playlogos1

chmod 755 /system/bin/playlogos1

# chmod 755 /system/bin/userinit.sh

chmod 755 /system/bin/userinit.sh

# busybox mount -o remount,ro -t rootfs /

busybox mount -o remount,ro -t rootfs /

# reboot

reboot

C:\AndroidSDK\tools>
[Galaxy S I9000 Android Development] jayteks:
I also cant install this lag fix. I think the only problem is this :

busybox mkfs.ext2 /dev/loop0

busybox mkfs.ext2 /dev/loop0

mkfs.ext2: can't format mounted filesystem

Does anyone know what went wrong here? thanks
[Galaxy S I9000 Android Development] gilsken:
@Rithina

try

busybox cp /sdcard/lagfix/playlogos1 /system/bin/playlogos1

instead of

cp /sdcard/lagfix/playlogos1 /system/bin/playlogos1
[Galaxy S I9000 Android Development] Rithina:
Message deleted
[Galaxy S I9000 Android Development] gilsken:
I guess that you should not mount before using mkfs
[Galaxy S I9000 Android Development] Rithina:
Yup, I done that on the next following line when cp not working
[Galaxy S I9000 Android Development] jayteks:
Can you tell me what to do now please? I have no idea what mounting even is so im not sure how I exactly did it. thanks
[Galaxy S I9000 Android Development] Bhonka:
I've got it going on jg5.

2177 quadrant.
[Galaxy S I9000 Android Development] sionyboy:
So, would Samsung be able to provide an update that partitions the band into ext or yaffs? I'm going to guess that if they did it would involve wiping all apps/data off the nand?

I guess if they don't at least the community is here to tidy up their mistakes!! Feeling much more confident with my purchase now :-)
[Galaxy S I9000 Android Development] mathewlyons:
Any chance of that .sh file? :)
[Galaxy S I9000 Android Development] RyanZA:
Hey guys, couple things I've seen.

I used the one click root from here: http://www.addictivetips.com/mobile...t-samsung-galaxy-s-i9000-with-a-single-click/

It has all the commands you need, and it's the easiest way to root anyhow. ;)

On the blocksize for DD issue, it doesn't matter what you use there. That is just creating a big file of 0s. The blocksize is on the busybox mkfs.ext2 /dev/loop0. busybox mkfs.ext2 -b 4096 /dev/loop0. A 1GB file is big enough that EXT2 will default to a blocksize of 4096 already, so you don't have to specify it. It is only for small partitions that 1024 blocksize is used by default.

Since we are running EXT2 inside the RFS partition, we should get all the flash friendliness of RFS by default (not that RFS appears to have any real flash friendliness to start with, it looks pretty terrible as far as partitions go!)

I see a few scripts around for this, but nothing that is really easy to use like the one click root. I'll try put together something similar to the one click root for this! :D
[Galaxy S I9000 Android Development] BlazerRazor:
Got 1733 in Quadrant with this fix. Running JP3.
[Galaxy S I9000 Android Development] MAJED.y:
Waiting.... :D
[Galaxy S I9000 Android Development] borchgrevink:
Would LOVE it if a "one-click" solution comes available...

Two Q:

1) Is this completely reversable?

2) Can I unroot after applying?

Thanks
[Galaxy S I9000 Android Development] GSeeker:
i almost decided to try this fix but now i will wait for your easier way,he. thanks!
[Galaxy S I9000 Android Development] odyssey61:
Can someone explain to me why the whole 1.9 Gb cant be used. Thanks

And a big thank you to bub and all the others that made this possible.
[Galaxy S I9000 Android Development] Archer13:
Using this fix for a while - lags returned, and they are unstable. I mean - sometimes it's faster than "standard" SGS, sometimes it freeze more than "standard". It's my main phone, so i've returned back to external card solution.
[Galaxy S I9000 Android Development] Croak:
Because it's using the app storage area on the internal memory. Use the whole 1.9Gb and you've got no room for apps.

Which is a lag fix in its own right. :)
[Galaxy S I9000 Android Development] Croak:
Betcha that's an I/O bottleneck causing the spotty performance...other things trying to access the internal FS.

The EXT hack doesn't do this because of different I/O pipelines so the ext-SD that can run concurrent with the internal FS.

And the NAND hack avoids this just by running off of much faster memory, so if there is a bottleneck, it's usually a very short one.
[Galaxy S I9000 Android Development] manniakk:
i got 2122 on rooted JF5... the phone feels much better for now :)
[Galaxy S I9000 Android Development] rickylcp:
I managed to find some help from a German Forum.

They provided a busybox that support the command of mkfs.ext2.

Now it works and scored 2xxx!!!

Thanks ykk_five!

You may use google translate if you don't read German like me.

(P.S. after used google translate, the command lines altered a little!!!

So better follow the original post when typing the commands!)

http://www.android-hilfe.de/root-hacking-modding-fuer-samsung-galaxy-s/39026-neuer-speedfix-wo-die-sdkarte-nciht-verwendet-wird.html

ykk_five, maybe you can post this on the first post so that ppl who have problems like me can also benefit?:)
[Galaxy S I9000 Android Development] mekwall:
Just a heads up...

Before even trying to apply this "fix" in this immature state you'll have to learn the basics of linux. What a mount is, what dd is, what busybox is and so on.

If you don't know these things you will most likely screw up and your phone will become useless or in the worst case bricked. You'll waste your own time reflashing and others time with answering your questions that you most likely can answer yourself with a little bit of research.

Please respect the hard-working people who use up their spare time to get these fixes out for the mainstream. Let them work the fixes, instead of answering your basic questions.
[Galaxy S I9000 Android Development] RyanZA:
Doesn't seem likely, the internal SD card (which is what this fix runs off of) is capable of some really high read speeds. If anything, it might be because we are running on top of RFS, and RFS seems to block everything when it does some operations. Since we are using a single file in RFS, it shouldn't have to be doing anything heavy - but it might be shuffling data around on the internal SD card anyway.

In any case, this lag fix should reduce the amount of problems that RFS can cause by as much as possible, while still keeping our data in the (much faster) internal device memory, instead of punching all the way out to the external SD card.

Best fix would be to change all the filesystems over to a real flash filesystem like what HTC phones use, but I personally have no idea how to write a kernel and scripts and odin flash files that could do all of that. So this fix is the 2nd best thing. ;)
[Galaxy S I9000 Android Development] matty___:
makes me wonder what kind of monkeys work at samsung.... really they could fix all this with 1 firmware.

guess when lead says it's has to be RFS because its made by samsung no questions are ask. it just pisses me off...
[Galaxy S I9000 Android Development] borchgrevink:
Bad news???

Can someone explain why there seems to be jf3 phones (and others) without this lag problem? Shouldn't all phones have this?

I have contacted a official Norwegian service point, and they claim not all phones are lagging and that something else is wrong...
[Galaxy S I9000 Android Development] D.Rosendahl:
Nope, you don't get all the "flash friendliness", that's part of why you get such high score. Since RFS is not open source all is just speculation but it's quite easy do understand what RFS is:

-Its FAT16/32 as base. (basic filesystem without much extra, a little bit like ext2 but I know some people would bash me hard for that conlusion :) )

-It has some form of journaling/protection system for saving the filesystem on unexpectely power failure. This means that it writes "alot" of overhead bits. This saves the "file system", NOT the single files themself. Means your ext2 system is not protected. This will slow down some operations, especially when writing. Journaling rightly implemented can actually improve some performance.

- It implements some sort of wear/no wear algorithm which means it tries to write on different places the whole time saving your flash from failure. It also redlists cells that already been defected and use other ones instead. This WILL decrease performance but is probably IMPORTANT! How this is implemented makes the difference if it affects the 1 GB file or not. But the raw performance increase we are seeing suggests that it do not work as it should...

Ext2/Ext3/Ext4 is generally not a good idea for a mobile phone. (Especially ext2)

YAFFS2/JFFS2/(RFS, ok probably no on that one :) ) is the only alternatives.
[Galaxy S I9000 Android Development] matty___:
format SD card in linux with yaffs2 and mount with yaffs2 aware kernel and create symlinks like the other lag fixes does.
[Galaxy S I9000 Android Development] RyanZA:
Only think I can think of is that some devices have a faster internal sd card than others, which helps to mask the problem of RFS. When RFS blocks the system, if it completes the operation really quickly, you wouldn't even notice. When it starts moving the whole disk around, and takes 15 seconds to do this while blocking the entire device, you notice very very quickly. ;)
[Galaxy S I9000 Android Development] gilsken:
That's exactly my thoughts. That's why I prefer to wait & see before applying this fix. Seems that we could use the mkyaffs but I don't see in the kernel that the yaffs2 is supported (in .29)
[Galaxy S I9000 Android Development] RyanZA:
This could be true, but I don't believe so. The raw performance increase we are getting here appears to come entirely from increased block size. If you decrease the block size of the EXT down to a small value, you get the same I/O performance as stock RFS. The speed increase comes from an EXT2 with a large block size sitting on top. :D

If we could alter the RFS filesystems to increase their block size, we might see similarly big big performance gains.

Also, by the look of it, RFS does not do any buffering - everything is just written directly to disk as it comes in. EXT2 buffers data into chunks in ram before writing it all out. This would decrease the number of times RFS would need to block the system to write the data. If we write out a file 1 byte at a time to RFS, it would write 1 byte to disk each time, while if we put EXT2 on top, it will buffer each of the 1 byte writes until it hits the block size of 4KB. (Maybe? I'll try think of a way to test if this is correct.)

This is still speculation (no RFS source code around), but it appears that the EXT2 fix is making up for the deficiencies of RFS, and should still be using the SD card features of RFS properly.
[Galaxy S I9000 Android Development] MasK:
Running JM5.

I applied the fix.. twice without errors.. but quadrant ends up with 9xx only.

What did I do wrong...
[Galaxy S I9000 Android Development] sandandsea:
Thank you. It works.

Mine got 2115 on DXJG4.
[Galaxy S I9000 Android Development] Croak:
I'm tempted to use the init.d kernel to see if that works for me. I'm on my fourth attempt (and third nandroid restore).

Only thing in data1 is the lost+found folder (empty).
[Galaxy S I9000 Android Development] raspdeep:
benchmark with ext2

Quadrant with ext2 on /dbdata @ 1ghz - 2200

Quadrant with ext2 on /dbdata @ 1.2ghz - 2620

Quadrant with ext2 on /data @ 1ghz - 2140

Quadrant with ext2 on /data @ 1.2ghz - 2540

More benchmark with ext4

Quadrant with ext4 on /dbdata @ 1ghz - 1950

Quadrant with ext4 on /dbdata @ 1.2ghz - 2122

Quadrant with ext4 on /data @ 1ghz - 1955

Quadrant with ext4 on /dbdata @ 1.2ghz - 2208

For those that want to convert, here are the commands:

convert from ext2 -> ext3:

#tune2fs -j /dev/loop0

convert from ext3->ext4

#tune2fs –O dir_index,uninit_bg /dev/loop0

#e2fsck –pf /dev/loop0 <-- must perform or ext4 will not mount

attached the tools, put them into /system/xbin and chmod 755
[Galaxy S I9000 Android Development] praveen6585:
really waiting for this RyanZA! :)
[Galaxy S I9000 Android Development] furstrated:
the userinit.sh takes crae of all the data transfer and linking? or do i have to do them with this? just about to start on it and wants to clear some things up before i do
[Galaxy S I9000 Android Development] odyssey61:
A couple of questions if thats ok.

I assume other firmware can be flashed on this and it wont affect the lag fix and will setting Odin to repartition when reflashing put this back to default for the internal storage? Thanks again.
[Galaxy S I9000 Android Development] Croak:
Yes, and a Clockwork Recovery backup will do the same.
[Galaxy S I9000 Android Development] odyssey61:
Ok, thanks very much. And if just flashing another firmware will that reset the lag fix or not. (Repartition not selected this time).
[Galaxy S I9000 Android Development] Croak:
Yes. You're overwriting the file that was used to host the partition, you're overwriting the scripts that mount it, etc.

Basically, the only thing this fix will survive is a restore of a backup made with it in place. Previous backups and firmware flashes will nuke it (but not kernel flashes).
[Galaxy S I9000 Android Development] RyanZA:
Alright, I have probably found the reason for this one!

RFS can get easily fragmented, and the more fragmented it becomes, the slower your device becomes. Phones with lots of lag probably have very fragmented /data partitions.
[Galaxy S I9000 Android Development] Croak:
Ok, got it working, fifth time was the charm!

2178 bone stock UGJG9 (Bell Vibrant/I9000M)

I just assumed I had Busybox 1.17 installed correctly.

A good indicator if you do or do not have it installed properly is in the lines

cp /sdcard/playlogos1 /system/bin/playlogos1
cp /sdcard/userinit.sh /system/bin/userinit.sh

If you get an error inputting them as typed/copied above (but can make them work by typing busybox in front of each), you DO NOT have it installed properly.

And while the rest of the process SEEMS to work, the stuff that goes on at boot time fails.

There's a link to the Busybox installer apk in this thread, download it, install it, redo the the steps listed, and you should be golden. :)
[Galaxy S I9000 Android Development] jayteks:
Can someone help please. It seems the only place I have an error is here.

busybox mkfs.ext2 /dev/loop0

mkfs.ext2: can't format mounted filesystem

I have no idea what this means so if anyone can help it would be great.
[Galaxy S I9000 Android Development] Croak:
You've already created it, basically, in an earlier attempt.
[Galaxy S I9000 Android Development] jayteks:
Oh, but im only getting around 900 in quadrant. Is there a way I can start again? Because before I got that error I was using the wrong busybox version and that also gave an error on that line. thanks for the reply.
[Galaxy S I9000 Android Development] MasK:
Just relashed to JG5..

Scores 9xx again with fix.. What did I do wrong?

Same problem on previous JM5. I know rghw partition has been made because available memory is now 8xxMB..
[Galaxy S I9000 Android Development] odyssey61:
Thanks again, much appreciated.
[Galaxy S I9000 Android Development] borchgrevink:
Possible to do a normal defragmentation to solve the prob?

What about the user saying the lag was back after some time?
[Galaxy S I9000 Android Development] matty___:
with what? RFS is not open source.
[Galaxy S I9000 Android Development] Kilack:
So samsungs fix will probably be a defragmentation tool supplied under samsung apps at some point in the future :)
[Galaxy S I9000 Android Development] matty___:
please not. just skip the whole RFS BS and rebuild the firmware with yaffs2 and all is good.

no point in trying to patch up a bad design decision in the first place.
[Galaxy S I9000 Android Development] Rithina:
You made my day. I got it work with your advice!
[Galaxy S I9000 Android Development] moreira86:
nice, 2200 with rooted jm5, indeed works fine with 1.1.17 busybox
[Galaxy S I9000 Android Development] SYUNIXT:
Uh.. I accidentally overwrote the original playlogos1 that was meant to be renamed to playlogosnow...

Do I need the playlogosnow? Can someone upload a copy of the original file? :eek:
[Galaxy S I9000 Android Development] ykkfive:
hi everybody

… the trick should work as mentioned permanently, if u wish

… pls, pls back to basic first, forget about the 1G file creation on the sdcard mentioned by ryanaz for now, just focus on the dbdata

… this trick is based on SGS, if u cant find playlogos1, probably u r not using SGS, have applied other fixes which renamed the file already, or u have modified the default boot animation

… this trick should be persistent, and u should not encounter lags even u turned on ur phone for hours, while some apps may use ur /sdcard instead and thus affect the performance, which is NOT covered by this trick yet

… there r other options instead of modifying playlogos1

… this trick is NOT tested on other phones, since the file structure of different phones are not the same, u may need other work arounds to apply this

… as i mentioned in my first post, if u r not familiar with linux, or u dono what u r doing, stop and wait for a script

PS "the trick" above refers to my first post's trick, without any additions. for additional functions, pls refer to the author
[Galaxy S I9000 Android Development] andrewluecke:
YAFFS is designed primarily for raw access to the storage.. Do we know if they are using XSR currently for this phone? Because it's important to understand why Samsung selected RFS for this phone before you guys go randomly selecting another FS just because its fast. Without wear-levelling and such, EXT4 may be blazingly fast, but your storage might only last a short time. So I'm just wondering how much consideration has gone into the reasons for RFS.. They might be silly, they might not be..
[Galaxy S I9000 Android Development] matty___:
All I'm saying is that samung should have looked at the N1 as reference and build their android based on YAFFS2 and not on RFS.

If samsung had done that we wouldn't have this threat right now.

I'm not sure we are able to fix that anyways. I really hope they fix this with 2.2.

I mean how hard is it to rebuild the firmware on an opensource FS. Can be done within a week.

on the other side maybe the nand chip doesn;t work with yaffs.

but just take a good look at the N1 and desire and tell me its slow. :P

out of the box the desire, with it's older cpu runs circles around the SGS. Just add an application short cut. It takes 5-10 sec before i can see all the apps. On the desire it;s there immediately. That's how bad samsung ****ed up.
[Galaxy S I9000 Android Development] celeron655:
Thank you Thank you.

Just did this to my phone. Get a quadrant score of over 2k .

Phone is sooo fast.
[Galaxy S I9000 Android Development] jdrake001:
I propose that we sticky this and label it "The real fix for lag issues (Turbo edition)" or something to that effect.

Just tried it and instantly gotten > 2100 on quadrant. Phone operations felt instantly faster (I have >100 apps installed).

Got to give this thread a better credit.
[Galaxy S I9000 Android Development] spider_mg_zr:
wish i could do this...i have the JM5 and quadrant gives me 882 :(

but im a Microsoft guy and has told i shouldnt do this...can anyone do anything so its an easy process?

Thanks
[Galaxy S I9000 Android Development] RyanZA:
We are still using RFS with this fix! The whole EXT2 filesystem is just a regular file sitting inside RFS. All writes/reads to the EXT2 filesystem still have to pass through RFS before they can get onto the disk! We aren't bypassing anything, we are just adding an extra layer which does some additional buffering.

It just goes to show how blazing fast this device is - we can run a filesystem inside another filesystem, and still get I/O performance head and shoulders above all other devices on the market. ;)

It is just such a shame that samsung managed to mess it up in the first place. ;)