yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] RyanZA:
Just to follow up on what I think is going on here. This is total speculation now! ;)

The SD controller uses 4k or higher block sizes natively when transferring data, so with a 1K block size, it has to do many more operations than with a 4K block size, which is slowing it down a lot when reading data. The stock samsung RFS partitions probably have not been tuned. RFS was first made for samsungs featurephones, which would not have had the kind of size the galaxy s does. Therefore they probably use a 256 byte block size or something equally inane, causing horrible delays.

Might possibly have found samsungs lag problem for them? ;)
[Galaxy S I9000 Android Development] g00ndu:
Quadrant score = 2711!

Used this with overclocking from raspdeep tweak @ 1.2ghz :eek::eek:
[Galaxy S I9000 Android Development] ykkfive:
i'm so glad to see that there r ppl really putting efforts in this issue. i think u can make big things, RyanZA

well, i think i will stop here (for this topic only), and goto find other dirty tricks

and finally, i wish u all the best, and i'm very happy to see that ppl do enjoy with my mod/findings, as well as my previous zero file size mod for symbian

thx everyone and i'll keep an eye on this topic as usual
[Galaxy S I9000 Android Development] g00ndu:
Thank you, ykk_five, for sharing with us this.
[Galaxy S I9000 Android Development] RyanZA:
EXT2 has a maximum block size of 4K :(

128MB partition with 1K block size gets ~1700 quadrant

128MB partition with 4K block size gets 2100+ quadrant

4K is the key to higher quadrant (and probably all large file operations) when running off internal SD.

Gonna try 4K block size on /dbdata now just for kicks, but the 200mb file size limit makes it impractical for real world use (probably).
[Galaxy S I9000 Android Development] Bajo76:
You guys should be payed by Samsung.

I just hope they are reading this!
[Galaxy S I9000 Android Development] MAJED.y:
Great,

thank you ykk_five and RyanZA :) for this great effort.

we are waiting.
[Galaxy S I9000 Android Development] titovic:
+1

and we'll be waiting for news that you've found a new one ;)
[Galaxy S I9000 Android Development] raspdeep:
i've tried both /dbdata and /data and their benchmarks are pretty close.

what i did was created a 1GB image on /data

format ext2 bs 4k

mv /data/data to the image

mv /data/dalvik-cache to the image

setup the links

u can try mke2fs -T ext3... i've not tried it yet.. going to test next :D
[Galaxy S I9000 Android Development] gueria:
The guy there created a 1200Mo ext3 formated file on a linux box and then moved it to the phone's internal SD :

On the linux box :

dd if=/dev/zero of=data_ext3.img bs=1M count=1200

mkfs.ext3 -F data_ext3.img

tune2fs -c 0 -i 0 -m 0 data_ext3.img

Then on the phone with adb :

adb shell

su

(At this step he kills any app running on the phone)

busybox mv /sdcard/data_ext3.img /data/

mkdir /data/loop-mount-point

mount -t ext3 -o loop /data/data_ext3.img /data/loop-mount-point

busybox cp -a /data/data/* /data/loop-mount-point

busybox mv /data/data /data/data-backup

ln -s /data/loop-mount-point /data/data

But at the end he's saying that this just boosted the quadrant scroe, but didn't really remove the lag issue.

PS : i don't have any linux/android knowledge, i just translated all this from the french forum. Maybe this can help the devs
[Galaxy S I9000 Android Development] RyanZA:
No real difference with 4K block size on /dbdata. It probably doesn't have the same kind of latency? limits that the internal SSD does, so the blocksize doesn't matter?

Either way, EXT2+Internal SSD+4K Block size is the perfect way to go for maximum IO speed and tons of available space! We have the winner, now we just need to throw together something that can be clicked in windows that will do all of this for us. It should be pretty easy to do, and I'll throw it together tomorrow morning if nobody else has.

Thanks for the help everyone! :D Looks like we should have the lag problem mostly sorted shortly for anybody that wants to root their device and double click an icon. :D
[Galaxy S I9000 Android Development] RyanZA:
The reason this only boosted his quadrant score and not the whole lag issue, is that he didn't finish through on the fix! :D

He only moved over /data/data which is what quadrant uses, and where apps are stored. Most apps use an sqlite database which goes to /dbdata, as well as caches and other files which are scattered about. So his fix (and the little demo posted earlier) only fixed half the files. Moving the other directories should be easy too.

Some games store their files on the SD card, and those will be much harder to change. The SD cards are on FAT32 though, and not RFS, so they might not benefit from the fix anyway. They can probably stay FAT32, but may need to be reformatted to use 4KB block sizes!

Anyway, I'm out of here for now!
[Galaxy S I9000 Android Development] sionyboy:
Its great that the community is really nailing down the lag and poor i/o performance of the SGS, hopefully now we'll get a real long-term fix (and something that is uber-friendly to use!)

Makes you wonder why Samsung adopted this approach in the first place.... perhaps the device really was rushed to market by just duct-taping together some code from their other phones! Real shame the software is letting down the hardware, I always get annoyed when I'm waiting 5-6 seconds just for the dialler to load, how can I show off my phone when it takes an age to do the simplest of operations!
[Galaxy S I9000 Android Development] Diger36:
Wow..., as soon as there is a simple method for n00bs like me with a permanent result: I'm testing it. I like the sound of this winner :)
[Galaxy S I9000 Android Development] BackfireNL:
For speeding up this process i started a thread! making it interested for devs to fix this issue!

read this thread
[Galaxy S I9000 Android Development] borchgrevink:
Really getting my hopes up now. Looking forward to a noob implementation.
[Galaxy S I9000 Android Development] vitalij:
Thanks for great thread :)

Just did this on JP3 firmware (I used 1GB file) and did this:

busybox mount -o bind /data/ext2data/data /data/data;

busybox mount -o bind /data/ext2data/dalvik-cache /data/dalvik-cache;

busybox mount -o bind /data/ext2data/databases /dbdata/databases;

now I'm getting 1950 in Quadrant. And this seems quite nice way of speeding the phone.
[Galaxy S I9000 Android Development] bratfink:
If you know how to do it then why not just throw it together now :D, im sure everyone would be very grateful for a proper lag fix.. i know i will be!
[Galaxy S I9000 Android Development] BackfireNL:
If he does it he gets the bounty as discussed in this thread
[Galaxy S I9000 Android Development] raspdeep:
for those that know how to do the playlogo1 trick.. here is the script that i modified to work.. have not fully tested but it seems to work for me

this is not fully auto so a few things needed to be done first:

1) create the image file in /data called /data/dataimg using dd command that OP has already stated in post 1

2) format /data/dataimg with ext2

3) save the code attached to userinit.sh and push into /data/local

4) do the playlogos1 trick and reboot

mkdir /data/data1
chmod 1000:1000 /data/data1
busybox mknod /dev/loop0 b 7 0
busybox losetup /dev/loop0 /data/dataimg
busybox mount -o rw,noatime,nodiratime /dev/loop0 /data/data1

if [ "$?" = 0 ];
then
if [ ! -d /data/data1/data ]
then
busybox mkdir /data/data1/data;
busybox chown 1000:1000 /data/data1/data;
busybox chmod 771 /data/data1/data;

busybox cp -rp /data/data/* /data/data1/data;
busybox mv /data/data /data/olddata;

busybox mkdir /data/data;
busybox chown 1000:1000 /data/data;
busybox chmod 771 /data/data;
fi;

busybox mount -o bind /data/data1/data /data/data;

if [ "$?" != 0 ];
then
busybox rm -r /data/data;
busybox mv /data/olddata /data/data;
fi;

### Dalvik cache...

if [ ! -d /data/data1/dalvik-cache ]
then
busybox mkdir /data/data1/dalvik-cache;
busybox chown 1000:1000 /data/data1/dalvik-cache;
busybox chmod 771 /data/data1/dalvik-cache;

busybox cp -rp /data/dalvik-cache/* /data/data1/dalvik-cache;
busybox mv /data/dalvik-cache /data/old-dalvik-cache;

busybox mkdir /data/dalvik-cache;
busybox chown 1000:1000 /data/dalvik-cache;
busybox chmod 771 /data/dalvik-cache;
fi;

busybox mount -o bind /data/data1/dalvik-cache /data/dalvik-cache;

if [ "$?" != 0 ];
then
busybox rm -r /data/dalvik-cache;
busybox mv /data/old-dalvik-cache /data/dalvik-cache;
fi;

fi;
[Galaxy S I9000 Android Development] FadeFx:
wow what a monster...
[Galaxy S I9000 Android Development] android53:
Can you please make a guide for the rest?

i have no idea how to run a dd command properly

Much more likely to brick my phone through not knowing what im doing than a typo
[Galaxy S I9000 Android Development] sionyboy:
Was just wondering, earlier in the thread someone commented that EXT2 was not the 'safest' option given that data loss can occur. Could you run the same sort of hack with EXT3/4 and still get improved performance over stock?
[Galaxy S I9000 Android Development] clubtech:
Can someone provide the one time commands needed before running this script?
[Galaxy S I9000 Android Development] bub181:
Yep, thanks guys!
[Galaxy S I9000 Android Development] Xurok:
1997 with JP3, maybe I did something wrong ?

Thanks @ ykk_five and RyanZA and others ;)
[Galaxy S I9000 Android Development] mark99uk:
But take hancent messaging app for example. On my htc desire when I click the app it loads up instantly showing me the list of messages.

On my galaxy s, sometimes it is instant, and other times I click the app, and the screen stays black for about 5 to 8 seconds before displaying the messages, But I have the mimicam lag fix installed, with a quadrant score of 17500, and also have launcher pro, and also autokiller set to aggressive.

Can anyone explain why I am still getting this lag? I cant show my lovely phone to anyone coz its so embarressing this lag, which also sometimes happens pressing back or home screen.

My concern is that this fix, like the mimocam fix wont rectify this type of lag :(
[Galaxy S I9000 Android Development] dewt:
Keep in mind too that if you use ext3 on unmanaged flash memory (like our phones have) that they will use the same blocks to write their journal over and over and over again and it will cause those blocks to fail quickly.
[Galaxy S I9000 Android Development] bub181:
Wow!!! I just applied this fix and my phone is flying!! It feels like I have an iPhone 4 in my hands now with how quickly apps open and close. I had previously tried mimocan's lax fix. That definitely made my phone faster, but no where near as fast as it is now. This is definitely the best lag fix. Thanks you ykk_five, RyanZA and rasdeep! I used tips from all of your posts to get it working permanently using the playlogo script hack.

All we have to wait for now is Samsung to realise that they really screwed up the format of their internal flash and fix it! I'm really glad that it's a software problem and not a hardware problem.
[Galaxy S I9000 Android Development] bub181:
Is this a problem if we use EXT2? The image file we created is sitting on top of samsung's own RFS filesystem so would that mean that the underlying RFS filesystem is taking care of the wear-leveling?
[Galaxy S I9000 Android Development] distortedloop:
Aren't all linux/android kernels supposed to be open-source and free to use w/o royalty. I'd assume that giving proper credit where due is sufficient to release it, whether you have prior approval or not. Open exchange of ideas and building upon each-other's work is kind of the whole point of the xda community, isn't it?
[Galaxy S I9000 Android Development] distortedloop:
I see a lot of people calling for the internal formatting of the phone's memory to ext 2/3/4...I checked my Nexus One and it uses YAFFS2 for it's internal memory. Seems like a better choice in the long run.

YAFFS is specifically designed for NAND flash memory use, and has data integrity and performance as its primary and secondary intentions.

I'm a little sick of messing around with my SGS and wasn't going to try this, but some of the enthusiasm and great scores are tempting me to try myself. Would have to undo mimocan first, I imagine. /sigh
[Galaxy S I9000 Android Development] Dandarebr:
Got this from other forum about ext3 and NAND flash:

Ext3 – bad for Solid State Drives?

http://ubuntuforums.org/showthread.php?t=1072318

HOWTO: Decrease disk activity (EXT3)

http://ubuntuforums.org/showthread.php?t=839998
[Galaxy S I9000 Android Development] clubtech:
Mind posting exactly how you did it and made it stick with a reboot?

I tried with playlogos1 but the userinit.sh file seems to be failing with an error (it seems that the script a few posts back has an error in it, which i don't know how to fix)
[Galaxy S I9000 Android Development] sentlon:
we need a tutorial for normal user.

many of us are not really a linux expert.

simple and non complicated instruction would be appreciate from all of us.

thanks
[Galaxy S I9000 Android Development] mark99uk:
would be great if you could give step by step instructions on how to do this for the rest of us if possible. Im guessing youd win the bounty too being the first too :D
[Galaxy S I9000 Android Development] sentlon:
agree, step by step instruction pls.
[Galaxy S I9000 Android Development] bub181:
I can't take credit for this as it was the hard work of others. I'm just putting it into an easy to use guide.

Here are the instructions:

First copy the two files in the attached .zip to the root of your internal memory then run the following commands after enabling debugging mode. Make sure you have the latest busybox installed. The first command takes a while since it creates a 1 GB file on the internal memory. I also recommend starting in stock configuration (any firmware version is fine) I don't know what will happen if other fixes/kernels have been applied.

adb shell

su

busybox dd if=/dev/zero of=/data/dataimg bs=1024 count=1048576
busybox mknod /dev/loop0 b 7 0
busybox losetup /dev/loop0 /data/dataimg
busybox mkfs.ext2 /dev/loop0
mkdir /data/data1

busybox mount -o remount,rw -t rootfs /
mv /system/bin/playlogos1 /system/bin/playlogosnow
cp /sdcard/playlogos1 /system/bin/playlogos1
cp /sdcard/userinit.sh /system/bin/userinit.sh
chmod 755 /system/bin/playlogos1
chmod 755 /system/bin/userinit.sh
busybox mount -o remount,ro -t rootfs /

reboot
[Galaxy S I9000 Android Development] Daemos:
http://osdir.com/ml/linux.uclinux.devel/2005-06/msg00001.html

Here is some info on samsung's rfs file system. Unfortunately it seems slow and not that robust
[Galaxy S I9000 Android Development] clubtech:
Thanks!!!

Works like a charm. i was missing the "mkdir /data/data1" you manually added as for some reason the userinit.sd does not create it while it should.

Finally this phone works as it should.
[Galaxy S I9000 Android Development] mark99uk:
Thanks, very much appreciated.. i wouldnt have been able to sleep all night haha.

Just to confirm.. this isnt just the test/demo which was described earlier which must be reversed before rebooting the phone? This is a fully functionig fix that works even after rebooting the phone?

Also, once this fix is done, if I want to update to a newer firmware via odin, presumebly I'd need to re-apply the fix?
[Galaxy S I9000 Android Development] kalpik:
^^ Yep.. This should work even after reboot!
[Galaxy S I9000 Android Development] Croak:
Anyone tried splitting the difference between 128Mb and 1Gb?

Also, got this:

#busybox mkfs.ext2 /dev/loop0

mkfs.ext2: applet not found
[Galaxy S I9000 Android Development] bub181:
Make sure you have updated to the latest busybox.
[Galaxy S I9000 Android Development] sunwee:
thanks bub! do you mind making an undo script as well? (just as a fallback for whatever reasons users might want to restore to stock condition) :)
[Galaxy S I9000 Android Development] Croak:
I've went through so many phones in the last couple months I lost track. Trying this on my Captivate as a test mule, before I flash back to stock and return it. It has 1.16 on it.

Trying to track down a 1.17 installer now.
[Galaxy S I9000 Android Development] dalingrin:
Perhaps I have misunderstood, but isn't it faster to use 4k block size instead of 1k?
[Galaxy S I9000 Android Development] bub181:
The ext2 filesystem which was created will be using a 4k block size. I assume it would be better to pass a value of "bs=4096" to the dd command but I don't know enough about it to say for certain.
[Galaxy S I9000 Android Development] android53:
Why is busybox no longer on the market? i cant get hold of the new version
[Galaxy S I9000 Android Development] Croak:
http://www.mediafire.com/download.php?adisenpcd3ffaws
[Galaxy S I9000 Android Development] android53:
and how do i install it?

CP /sdcard/busybox /system/xbin/

CP: not found
[Galaxy S I9000 Android Development] mark99uk:
I also got

"mkfs.ext2: applet not found" because it seems i dont have the latest busbox (i thought i did oops)

Do I need to undo the previous commands, or continue from where i stopped once the latest busybox is installed, or re-apply the whole thing?
[Galaxy S I9000 Android Development] SiL3nTKiLL:
dam thats a legit score! lol
[Galaxy S I9000 Android Development] dckiwi:
Too legit? Too legit to....

Anyway, can the mods/op update post one with the instructions from post 161??

http://xdaforums.com/showpost.php?p=7571976&postcount=161
[Galaxy S I9000 Android Development] mark99uk:
deleted ................
[Galaxy S I9000 Android Development] Croak:
Since I was reflashing my Captivate back to stock anyway, I thought I'd try a few idiot tests.

For those of you using the Modaco NAND lag fix, applying this method doesn't break anything, but it doesn't change anything either...you're still running your data from NAND, not the ext2 partition.

You should follow the instructions to revert on this page before trying to apply this script fix.

If you're already running the ext3/ext4 kernel method, you'll most likely need to reflash the firmware.
[Galaxy S I9000 Android Development] Croak:
The CP lines lines should read:

busybox CP /sdcard/busybox /system/xbin/

Just like the following lines should have busybox first

busybox cp /sdcard/playlogos1 /system/bin/playlogos1
busybox cp /sdcard/userinit.sh /system/bin/userinit.sh
[Desire Q&A, Help & Troubleshooting] sandey60:
Hi All,

I have a problem which might have been solved. I have installed opendesire on my HTC Desire with an ext4 partition on my SD Card. I have installed many apps on the sd card and they go to the ext4 partition.

Now, when I connect my phone to the PC and enable USB Mass storage from my phone, I see my FAT32 partition on the PC. But the apps that are installed on my phone on the ext4 partition disappear and ONLY appear after I have disconnected my phone from my PC. Is there a solution here?

Thanks

Any help/suggestion is appreciated.
[Desire Q&A, Help & Troubleshooting] piry525:
I believe its because when its mounted to the computer only 1 thing will read it so since your connected to your computer your phone won't read the SD card or the apps on the ext partition
[Desire Q&A, Help & Troubleshooting] ansiacer:
When you set your SD card to mass storage you are allowing your pc to connect/write/delete info on it and therefore your phone will not be able to access it at the same time. Hence apps on the SD will not be accessible. Also apps with data on the SD will not work correctly either. However, if you set the connection type to charge only then it should be fine. (you just won't be able to access the SD card from your pc!)
[Desire Q&A, Help & Troubleshooting] sandey60:
Its like this. My SD Card has a FAT32 partition and an ext4 file system partition. When connected to a PC only the FAT32 partition is available as mass storage and not the ext4 system. My apps are on the ext4 partition.
[Desire Q&A, Help & Troubleshooting] sbdags:
It's working as designed. If you put your phone into drive mode the phone can no longer see the sd card. Windows doesn't know what an Ext4 partition is so only shows the fat32 partition.

That's just the way it is.
[Desire Q&A, Help & Troubleshooting] jamesmcuk:
I agree with all the above when connected in disk drive mode the phone will not see the phone sd card regardless of the partitions etc set on it. There is an app that allows dual access but I forget the name and tbh its kind of useless when you understand why its the case.
[Desire Q&A, Help & Troubleshooting] KBanause:
I have installed the LeeDrOiD ROM with A2SD+ and all my apps are installed to the ext3 partition on my sdcard. But I'm still able to use these apps when connected in "disk drive" mode (those apps using the fat32 partition for storing data do have problems but the others are working normally)
[Touch HD General] Tango78:
hello all

I want to know what is the best rom for my htc hd in French and if I stay in windows mobile or instll android

my rom is sunrise 2.1 fre ,radio 1.09.25.14 du 21/10/09

thank you for your advice
[Touch HD General] alchopop:
http://xdaforums.com/forumdisplay.php?f=453 and take your pick mate
[G1 Apps and Games] gremsems:
Would it be possible to get the samsung galaxy s musicplayer.apk which can be found in the galaxy s forum, fitted on our magics\G1's?
[HD2 General] Dontaskmewhy78:
Hi

Firstly, apologies if this has already been asked but i ran a search and couldnt find it if its there.

Just wondered how you set up the HD2 to auto answer calls with the supplied wired headset?

Thanks
[HD2 Android Q&A, Help & Troubleshooting and Genera] random_username_:
From my understanding when you launch haret.exe the windows kernel is shut down and the linux kernel is loaded in its place and the only reason we need to boot into winmo in the first place it to initialize the hardware (and we dont have a bootloader capable of flashing android roms). So since the winmo kernel is completely shut down and replaced by the linux one why does using a 'lite' rom make any difference?
[HD2 Android Q&A, Help & Troubleshooting and Genera] MvP77:
im wondering this to cause i see no advantage, my android runs good off all roms i tried. No SOD, or other problems.
[HD2 Android Q&A, Help & Troubleshooting and Genera] fi3ry_icy:
i dun really understand it too.. but when i was using my custom rom for winmo dail use my notification LED would light up when i am in android..

after i flashed to chuckydroid lite rom, the LED blinking bug disappeared..
[HD2 Android Q&A, Help & Troubleshooting and Genera] juicecultus:
It's the speed that makes the whole difference. It used to take me about 2 min to reboot artemis rom and another 2~3 min to boot into android.

With NRG barbone rom it only takes me about 1 min for both tasks above.
[HD2 Android Q&A, Help & Troubleshooting and Genera] mystik610:
I had SOD with all Android ROMS and Zimage files until I stated usings chucky's rom, which is an extremely stripped down WM rom.

Not exactly sure why this works better, but from my understanding, WM will shutdown when you load Haret, but the the drivers and hardware configuration booted from windows will be used to run linux. I'm thinking the lite ROM load only what's necessary and and load fewer hardware configurations.
[HD2 Android Q&A, Help & Troubleshooting and Genera] MvP77:
I guess im lucky cause i get good speed booting to and running android on all roms i tried, no sod either. :cool:
[HD2 Android Q&A, Help & Troubleshooting and Genera] random_username_:
ive never had problems with sleep of death (although i did have speedy issues) with any rom ive used with android (which is a lot) however i do see it makes a huge difference for some people so i guess ive found my answer :D
[Vibrant General] McQueefus:
I noticed a lot of people having trouble booting into recovery mode from the phone. This is how to do it. With the phone turned off hold the power button +vol down button until you see the "Vibrant" logo on the screen. Once you see the logo, take your finger off the power button but keep pressing the vol down untill you see the recovery image. Ive tried every other way that people have posted and this is the only way I could get it to work. Sorry if this is already posted somewhere else but I couldnt find it. Hope this helps.