• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[FIX] UPDATED - Real fix for the "stalling/lagging" problem

Search This thread

mimocan

Member
Jan 6, 2008
38
3
Amsterdam
I have made a custom kernel to mount an ext3/ext4 partition on the sdcard at the boot time.

to be able to use it:

-- you need an external sdcard: partitioned as follows:
- partition 1 (fat32) / for your storage needs
- partition 2 (ext3/ext4) / for program database

This implies that instead of making a symlink to the /dbdata directory, you will make a symlink to the ext3 partition on the sdcard.

Advantages:

-- you have the freedom of creating that partition for your needs ( mine is 1gb)
-- after applying the lag fix posted on the forum I still had that lagging after a while, but now my phone is flying

And here it is:

Prerequisites:

-- an external sd card partitioned in 2
-- the ext3 partition must be the 2nd one, otherwise this won't work, so Partition 1 ishould be fat32, and partition 2 ext3 or ext4
-- use gparted or paragon hard disk manager to make the partitions and format them (just google how to do this)

How to:

-- download the tar file attached to this post, this includes the modified kernel which supports ext3/ext4 and automounts the ext3/ext4 partition when you restart your phone
-- put the phone in download mode, just like updating the firmware
-- fire up Odin and attach the phone to the USB

-- choose only the PDA section and put the downloaded tar into there ( do NOT choose repartition or something else otherwise you will loose settings)
-- it should finish within 5 seconds and wait till the phone is booted

when booted (assuming you already have busybox)

adb shell
su -
busybox cp -rp /data/data /disk/
busybox mv /data/data /data/data.bak
busybox ln -s /disk/data /data/data

to fix market issues:
busybox mv /system/media /disk/
busybox ln -s /disk/media /system/media
reboot

when booted you should see your 2nd partition of your external sdcard is mounted on /disk and your program database in residing in it.

If you do it like this you won't loose any personal data or settings.

Remember this does not depend on any specific firmware, so you are free to try it to on any firmware

If you want to try out the kernel with ext4 support I have attached it below. The same steps should be taken to mount the 2nd partition as ext4, but create the partition as ext4.

My personal experience and benchmark results are showing ext4 is faster than ext3. But ext3 is there for many years and ext4 is stable stated from kernel versions 2.6.3x.


Download v3 (ext3):

http://www.multiupload.com/5QAVQBU6GB

Download v4 (ext4):

http://www.multiupload.com/Z8TGXRRNCS
gr, Mimo from Holland

for the ones who like watching instead of reading Oblivia made some great video tutorials:

Part1: http://www.youtube.com/watch?v=a7fDBJOzQw8
Part2: http://www.youtube.com/watch?v=S26ny2UGBBU
 
Last edited:

Jonas.M

Senior Member
Jun 11, 2010
66
2
Well first thanks. Will try it when I flash the new firmware :)

Sent from my GT-I9000 using Tapatalk
 

dahool2008

Member
Nov 5, 2008
43
3
tested...runs completly smooth now. after opening many apps - also smooth. with the old stalling fix-i get after many apps open little lags. but this is great.

good work done.
 

dahool2008

Member
Nov 5, 2008
43
3
Question to anybody who did former use app2sd on a other android mobile. did it drain the battery if the sd card is constantly used? like with this fix here.

a big top is-i has only a class2 16gb sd card and it runs completly smooth with this fix. (opened bis apps like copilot and many games-no lag anymore)
 

Fredrichc

Member
Jul 13, 2010
5
0
Hi Mimo, great job!
I just have a question regarding the SD card. Could you please tell us which card (brand, class) that you are using? I am thinking of buying a new one and would like to be sure that I don't mess it up :)

Regards,
Fredrich
 

dahool2008

Member
Nov 5, 2008
43
3
@Fredrichc I have a really cheap Toshiba 16gb Class2 and everything is smooth. Don't think you have to pay for a expensive Class 6 card for this fix here.
 

NZtechfreak

Senior Member
Sep 5, 2008
2,574
999
I don't think there is any read-speed difference with the higher class card anyway is there? Isn't it the write speed only that the classes reference?
 

dahool2008

Member
Nov 5, 2008
43
3
Attention: There is a bug in this fix. When i want to install from market i get "there is not enough space for this installation". Can reproduce this on two mobiles.
i think it's a permission error on /disk - compare this to normal permissions on /data/data
 
Last edited:

mimocan

Member
Jan 6, 2008
38
3
Amsterdam
Ok.

I think I know what the problem is. There is not enough room in the /system partition.

we will make some room there, here it goes:

adb shell
su -
mount -o remount,rw rootfs /
mv /system/media /disk
ln -s /disk/media /system/media


this should fix the bug.
 

mimocan

Member
Jan 6, 2008
38
3
Amsterdam
strange:

this is from my console:

# mount -o remount,rw rootfs /
mount -o remount,rw rootfs /
# mv /system/media /disk
mv /system/media /disk
# ln -s /disk/media /system/media
ln -s /disk/media /system/media

can you post the output of "df -h"?
 

dahool2008

Member
Nov 5, 2008
43
3
/dev: 166828K total, 0K used, 166828K available (block size 4096)
/mnt/.lfs: Function not implemented
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 282432K total, 279712K used, 2720K available (block size 4096)
/disk: 2712240K total, 118920K used, 2593320K available (block size 4096)
/data: 1963904K total, 270928K used, 1692976K available (block size 16384)
/dbdata: 129728K total, 8960K used, 120768K available (block size 4096)
/cache: 30784K total, 1516K used, 29268K available (block size 4096)
/efs: 6064K total, 4103K used, 1961K available (block size 1024)
/sdcard: 6060544K total, 2174688K used, 3885856K available (block size 32768)
/sdcard/sd: 12893888K total, 101432K used, 12792456K available (block size 8192)
 

Rizlo

Senior Member
Feb 17, 2006
145
2
Milan
This can't be faster than putting data on the NAND, right? Also, you won't be able to switch SD cards (not that I do it that often).
 

sunwee

Senior Member
May 8, 2009
517
60
This can't be faster than putting data on the NAND, right? Also, you won't be able to switch SD cards (not that I do it that often).


if this fix works, then can it be speculated that the lag is not due to internal sd being slower than nand, but bottlenecks in the i/o?
 

dahool2008

Member
Nov 5, 2008
43
3
thats what i also think. i think there is in the firmware a i/o problem. because i have a class2 sdcard for testing. and the system runs now really fast with no lags. the only problem is at the moment here the market bug.
 

sunwee

Senior Member
May 8, 2009
517
60
thats what i also think. i think there is in the firmware a i/o problem. because i have a class2 sdcard for testing. and the system runs now really fast with no lags. the only problem is at the moment here the market bug.

if that's true, then it's not due to hardware problem. perhaps samsung will be able to fix it with a rom upgrade!! :)
 

mimocan

Member
Jan 6, 2008
38
3
Amsterdam
/dev: 166828K total, 0K used, 166828K available (block size 4096)
/mnt/.lfs: Function not implemented
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 282432K total, 279712K used, 2720K available (block size 4096)
/disk: 2712240K total, 118920K used, 2593320K available (block size 4096)
/data: 1963904K total, 270928K used, 1692976K available (block size 16384)
/dbdata: 129728K total, 8960K used, 120768K available (block size 4096)
/cache: 30784K total, 1516K used, 29268K available (block size 4096)
/efs: 6064K total, 4103K used, 1961K available (block size 1024)
/sdcard: 6060544K total, 2174688K used, 3885856K available (block size 32768)
/sdcard/sd: 12893888K total, 101432K used, 12792456K available (block size 8192)

you definetely need to free up some space in /system.

strange that it can't move the media directory. Can you please try to apply the move media fix just after a reboot?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    hey guys i tried this on my captivate because it worked on a friend of mines. i flashed the kernel but it wouldnt boot up completely so i flashed the captivate kernel back. problem is, my laptop died in the middle of the process so now my phone is stuck on a screen that has an exclamation point between a computer and a phone:( it wont go back into download mode since it apparently still has the international galaxy s kernel(captivate does not have physical home key). Any suggestions?