Jump to content


Photo

New (very fast) lag fix using internal memory and playlogo1 hack


  • Please log in to reply
187 replies to this topic

#1
portman0

portman0

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:Axim X51v
This is copied from my post over on XDA dev. It makes the phone as smooth as butter. It's faster than any of the previous lag fixes plus it doesn't have any of the issues that the other ones had like not being able to remove the memory card, or running out of space on the new partition, etc. My SGS feels as smooth as an iPhone 4 now. My only contribution is that I made this into a complete guide. It was the hard work of others that discovered this fix.

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

Attached Files


Edited by portman0, 09 August 2010 - 02:43 AM.

  • 0

#2
Kilack

Kilack

    Enthusiast

  • Members
  • PipPipPip
  • 189 posts
  • Devices:nexus 1
yah already trying it :)

Will see how it goes....

update: looking great, faster quadrant scores than the ext4 fix, am getting around 2,300 with this, was about 1700 with the ext4 fix. (i also did it iwth the ext4 fix kernel) but that was over a stock rom, no issues there.

So just their crappy filesystems are at the root of the problem, nice to know its not hardware...
Am hoping the same for the GPS too (well the gps hardware rocks) so hopefully they can fix that with some good firmware
Getting better and better

Nice to be able to use the internal storage!!!

How does this affect wear and tear of the internal memory?
and they set aside 2 gigs right? any reason why we only made this file 1 gig?

Edited by Kilack, 09 August 2010 - 02:57 AM.

  • 0

#3
portman0

portman0

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:Axim X51v

How does this affect wear and tear of the internal memory?
and they set aside 2 gigs right? any reason why we only made this file 1 gig?


I'm assuming that the underlying RFS filesystem will take care of wear levelling since we have just created a file on top of it, but I'm not sure.

It's only 1 GB because the old data isn't deleted from the partition. I'm sure someone can work out a better method and maybe even a new kernel which can flash the entire partition with a better filesystem like YAFFS2 which is used in the Nexus One.

  • 0

#4
aeo087

aeo087

    Regular

  • Members
  • PipPip
  • 67 posts
  • Location:Oregon
  • Interests:Computer engineering, software, android development
  • Devices:Galaxy S
  • Twitter:@aeo087

I'm assuming that the underlying RFS filesystem will take care of wear levelling since we have just created a file on top of it, but I'm not sure.

It's only 1 GB because the old data isn't deleted from the partition. I'm sure someone can work out a better method and maybe even a new kernel which can flash the entire partition with a better filesystem like YAFFS2 which is used in the Nexus One.


Why are we assuming YAFFS2 will give better performance than an ext2/3/4? From what I can see, benchmarks say the opposite, with these fixes the SGS is clearly performing i/o operations much faster than other phones, including the nexus one... Regardless, the bug has been found and has been fixed as a hack!! I think we can declare Samsung incompetent as a software developer if they can't manage to fix this in the following firmware updates!! lol Where or to whom can write to at Samsung? anyone know someone at Engadget, Android Central, or any other big site that can make this more public??

  • 0

#5
DistortedLoop

DistortedLoop

    Addict

  • Members
  • PipPipPipPipPip
  • 603 posts
  • Gender:Male
  • Devices:GalaxyNexus, HTC One X, SGS2
  • Twitter:@distortedloop

Why are we assuming YAFFS2 will give better performance than an ext2/3/4? From what I can see, benchmarks say the opposite, with these fixes the SGS is clearly performing i/o operations much faster than other phones, including the nexus one... Regardless, the bug has been found and has been fixed as a hack!! I think we can declare Samsung incompetent as a software developer if they can't manage to fix this in the following firmware updates!! lol Where or to whom can write to at Samsung? anyone know someone at Engadget, Android Central, or any other big site that can make this more public??


Because YAFFS2 was specifically designed with flash nand chips in mind...?

ext 2 is risky because no journaling, ext 3 is damaging because of the journaling being written to the same areas and wearing out the nand faster, ext 4 is risky because everyone says so...LOL.

You can't compare SGS benchmarks against the Nexus One benchmarks and then declare that ext is better than yffs2 based on those. A whole lot more goes into the Quadrant scores than the i/o speed of the database read/writes. Heck, my SGS with mimocan on an ext sdcard outbenchmarks a FroYo Nexus One - much of that is because of the better CPU and GPU of the SGS.

"Better" doesn't necessarily mean faster. If speed is all you care about, fine, but I'm not sure we've even seen a valid speed comparison of ext2/3/4 vs yffs2 until we see both filesystems used on the otherwise-the-same hardware.

Personally, I want the fastest speed I can get while still having a stable file system that doesn't get corrupted or worn out physically sooner than later because of the filesystem choice. What little bit I read about yffs2 suggests it's a better choice, and the selection of it by HTC/Google for the flagship Android phone seems to support that belief. I could certainly be wrong, as I am no expert in this area at all, but think about it, ext 2/3/4 is designed for cross platform linux operations and spinning physical platters on a hard disk in mind. It has to consider all that in its design choices. YFFS2 is designed specifically for flash nand memory and takes the hardware concerns of nand (limited writes to a single sector over the device lifetime and no moving parts to contend with) and designs a filesystem for it.

At any rate, I agree, this hack looks promising and I've backed up (nandroid and titanium) my phone in anticipation of reversing my mimocan fixes and trying this. It's getting late here, though, so I may not get around to it until tomorrow.

Excited to see results people post.

If this is actually the real fix that's the best, maybe we'll see Paul build it into his ROMs!

  • 0

#6
Kilack

Kilack

    Enthusiast

  • Members
  • PipPipPip
  • 189 posts
  • Devices:nexus 1
Yeah, definitely looks the best option at the moment and very easy for Paul to add in also, even if its as an option to start with - mcr script, just too easy for him not to add it right now :).

Edited by Kilack, 09 August 2010 - 03:45 AM.

  • 0

#7
twit_xp

twit_xp

    Newbie

  • Members
  • Pip
  • 10 posts
  • Devices:Samsung Omnia II
does anyone know if this hack works with Froyo firmwares? Itching to flash Paul's rooted JP3 + other goodies :)

  • 0

#8
portman0

portman0

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:Axim X51v

does anyone know if this hack works with Froyo firmwares? Itching to flash Paul's rooted JP3 + other goodies :)


Yeah, it should work on Froyo too assuming the stock kernel has support for EXT2 like the Eclair one did.

  • 0

#9
twit_xp

twit_xp

    Newbie

  • Members
  • Pip
  • 10 posts
  • Devices:Samsung Omnia II

Yeah, it should work on Froyo too assuming the stock kernel has support for EXT2 like the Eclair one did.


Nice i will give it a try to see how it works out =D

  • 0

#10
K-mart Shopper

K-mart Shopper

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:Samsung i617
Hey guys this is my first attempt at using this type of hack; I have a Captivate, and after running through these steps Quadrant is still spitting out 864. I used Root Explorer for my MV and CP operations since busybox for some reason wouldn't cooperate for those steps.

I'm not familiar with Android's file system or anything - is there something I'm doing wrong?

  • 0

#11
ovrclock

ovrclock

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:Nexus One
Any chance this fix would work for other versions of the SGS? Specifically the Vibrant for Tmo??

  • 0

#12
dgovil

dgovil

    Newbie

  • Members
  • Pip
  • 1 posts
  • Devices:Galaxy S 1900M
So forgive the (possibly) silly question, I'm new to Android with the Bell Vibrant (GT-1900M) on a rooted stock firmware(JG9). I'm one of the lucky ones who can go into the recovery mode so yay..

Anyway, was looking to perhaps use this fix.but was wondering if it wiped both the internal SD and the internal app storage or just the latter (or at all)?

Also is this firmware independent? XDA is a bit confusing as to wether the Bell Vibrant is closer to the international or american versions.


Thanks very much!

  • 0

#13
dr_ysp

dr_ysp

    Enthusiast

  • Members
  • PipPipPip
  • 186 posts
  • Gender:Male
  • Location:UK
  • Devices:Galaxy Note II, Grey
  • Twitter:@dryspuri
confirmed

quadrant 2235
linpack is 8 only???

wow, i am happy to be the fastest, will test for long use now
:)

Edited by dr_ysp, 09 August 2010 - 06:14 AM.

  • 0

#14
aeo087

aeo087

    Regular

  • Members
  • PipPip
  • 67 posts
  • Location:Oregon
  • Interests:Computer engineering, software, android development
  • Devices:Galaxy S
  • Twitter:@aeo087

confirmed

quadrant 2235
linpack is 8 only???

wow, i am happy to be the fastest, will test for long use now
:)


Linpack should not change, this only improves i/o performance not computational performance...

  • 0

#15
NeidRider

NeidRider

    Regular

  • Members
  • PipPip
  • 53 posts
  • Gender:Male
  • Location:Switzerland
  • Devices:HTC One 32GB, Silver
  • Twitter:@MartechInfo
Great, thanks!
Quadrant 2288. :-)

  • 0

#16
jkgtan

jkgtan

    Enthusiast

  • Members
  • PipPipPip
  • 211 posts
  • Location:China/Singapore
  • Devices:i9000/i8000/S5620

This is copied from my post over on XDA dev. It makes the phone as smooth as butter. It's faster than any of the previous lag fixes plus it doesn't have any of the issues that the other ones had like not being able to remove the memory card, or running out of space on the new partition, etc. My SGS feels as smooth as an iPhone 4 now. My only contribution is that I made this into a complete guide. It was the hard work of others that discovered this fix.

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


Dear Portman,
I am totally new.
You mentioned 2 zip files, but below there is only one "lagfix.zip"
copied that into internal sd, then do a 3 buttons flash but it indicate aborted.
My device is rooted with samset1.9b.
My sd card are not partition.
Can you give a thorough instruction for newbie like me.
Thank you

  • 0

#17
Kilack

Kilack

    Enthusiast

  • Members
  • PipPipPip
  • 189 posts
  • Devices:nexus 1

Dear Portman,
I am totally new.
You mentioned 2 zip files, but below there is only one "lagfix.zip"
copied that into internal sd, then do a 3 buttons flash but it indicate aborted.
My device is rooted with samset1.9b.
My sd card are not partition.
Can you give a thorough instruction for newbie like me.
Thank you


he said 2 files inside the zip, extract them from the zip then copy them to the internal sd card.
You don't flash anything so no going into recovery mode etc.
Its all done by adb or terminal...

  • 0

#18
jkgtan

jkgtan

    Enthusiast

  • Members
  • PipPipPip
  • 211 posts
  • Location:China/Singapore
  • Devices:i9000/i8000/S5620

he said 2 files inside the zip, extract them from the zip then copy them to the internal sd card.
You don't flash anything so no going into recovery mode etc.
Its all done by adb or terminal...

Extracted now, there are 2 files:
playlogos1 - 1kb
userinit.sh - 2kb

How do I go abt from here?
Thank you for detail instruction.

Edited by jkgtan, 09 August 2010 - 08:17 AM.

  • 0

#19
DasTisu

DasTisu

    Regular

  • Members
  • PipPip
  • 96 posts
  • Location:Sweden
  • Devices:Liquid E LCRF 1.1.2
I write:

adb shell

su

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

then I get:
Permission denied
$ dd: can´t open '/data/dataimg': Permission denied

The system is rooted and have:
1. su+Superuser
2. busybox (/system/xbin/busybox)

Why wont it work?

Edited by DasTisu, 09 August 2010 - 08:14 AM.

  • 0

#20
oachim

oachim

    Newbie

  • Members
  • Pip
  • 33 posts
  • Devices:HTC Touch
Hi,

First thanks for your work.

I've started to apply the commands and get an error why executing mkfs.ext2. It seems that mkfs.ext2 is not existing on my system (JF5.MCR1 + busybox 1.16).

Would you please point me how I can get mkfs.ext2 on my android?

Regards,
Ovidiu

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users