Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
djkdawg
Old
(Last edited by djkdawg; 23rd August 2010 at 03:32 PM.) Reason: updating links
#1  
Senior Member - OP
Thanks Meter 6
Posts: 227
Join Date: Mar 2008
Location: dallas
Default [UTIL] One Click Lag Fix 2.0 by RyanZA

i seen this in the Samsung Galaxy S I9000 and i tried it out on the vibrant and it works perfect, its probably the easiest way to partition your SD card and i can confirm it fixes the lag, i will post my scores shortly...... THANKS RYANZA you saved me weeks of research. go here for more info

http://forum.xda-developers.com/showthread.php?t=751864


[UTIL] One Click Lag Fix 2.0
This version (2-3) is now open for BETA testing! It is known to work on many devices, but still has known issues that could greatly affect you. Please read this whole post a few times until you understand!

Details about what this fix does:

Creates a VIRTUAL EXT2 filesystem inside the stock RFS filesystem on the internal SD card, with a 4KB block size. This means that this lag fix creates a buffer between the real filesystem and the android system. This buffer should reduce the amount of disk I/O required for all operations by utilizing EXT2 buffering, as well as not writing file access times to disk, etc.

Folders that are currently supported:

/data/data
/data/system
/data/dalvik-cache
/data/app
/data/app-private as a symlink to /data/app/app-private

/dbdata/databases is not supported. It appears to be ROM backed, and can cause problems if overwritten.

Benefits over version 1

1.5GB of application data available, with no data loss.
e2fsck of the EXT2 partition on each boot.
Correct busybox version included! YES!
/app and /app-private directory included in the fix for faster application installs.
/dbdata/databases included in the fix, expected to give a big performance boost for apps that use it.
Mounts instead of symlinks for extra performance as OS does less work (about 100 or so more quadrant).

Benefits over other lag fixes

Open source, with full comments and ease of editing.
Works on any and all firmware versions, including any yet unreleased froyo versions (that don't change file structure).

Credits
Big thanks to mimocan for putting us all on the right track in how to sort out lag problems!
Big thanks to ykk_five for showing us all how well loopback filesystem mounting works!
Big thanks to cyanogen mod for e2fsck

Requirements for One Click Lag Fix 2.0

Rooted phone - http://www.addictivetips.com/mobile/...-single-click/
Windows computer with SGS Drivers (Samsung Kies), or the ability to read through the batch file and run it yourself.
(Beta Release) The ability to reflash your device if something goes wrong.
No other lag fix installed. If you installed One Click Lag Fix 1.0, then use the uninstall function which came with that lag fix before running this lag fix. (Untested but assumed to be working, please help out here.)
1.5GB of freespace on Internal SD Card for swap files while the fix is working (/sdcard).
"Internal phone storage" in Settings->SD Card must read greater than 500mb (0.5GB) of free space.

How to run One Click Lag Fix 2.0

Place your phone into USB debugging mode: Settings->Applications->Development
Attach your device to your computer. Do not mount the drives.
Download the attached ZIP file.
Unzip to a folder of your choice.
Double click "lagfixme.bat".
Don't double click "unlagfixme.bat".
Wait for it to complete.
You will need your phone to be unlocked when it runs the script, so that you can accept the permissions request that will appear on your device.

How to remove One Click Lag Fix 2.0

Double click "unlagfixme.bat"
Wait for it to complete.

Known Issues For All Versions

Some custom firmwares use up all available space in /system. This fix requires some libraries to be placed in /system/lib. These libraries are used to create the filesystem properly, and to check it for errors on every boot.
If your firmware does not have the available space (around 1mb) in /system, do not use this fix! Your phone will not boot and will have to be restored from backup / reflashed.
Current known firmwares with this issue: None yet. Please provide the firmware version+mods if you encounter this issue. It will show up as an out of space error in the log, under 'Copying libraries'.

Known Issues 2-1, 2-2

Paid apps from the market have issues.
Google maps and other pre-installed ROM-backed applications have issues.

2-3 Changes from 2-2

/dbdata has been removed. This fixes maps issues.
/app-private is now a symlink to /app/app-private. This fixes paid apps issues.

Alternate installation methods for similar fixes
Tayutama has made an update.zip version that is easy to install - http://forum.xda-developers.com/show...&postcount=208
Chainfire has a .NET version of this fix with some nice features - http://forum.xda-developers.com/showthread.php?t=751513
Attached Thumbnails
Click image for larger version

Name:	ScreenShot2.jpg
Views:	1853
Size:	30.7 KB
ID:	384444  
Attached Files
File Type: zip RyanZAEXT2LagFix BETA 2-2.zip - [Click for QR Code] (1.45 MB, 431 views)
File Type: zip RyanZAEXT2LagFix BETA 2-3.zip - [Click for QR Code] (1.45 MB, 2062 views)
Kevin H: Server Administrator
Phone: Samsung Nexus S 4g
ROM: MIUI 2.7.6 with Things and Stuff + DIANXIN

________________________________________
Technology makes it work. People make it happen.
________________________________________
 
djkdawg
Old
(Last edited by djkdawg; 23rd August 2010 at 03:40 PM.)
#2  
Senior Member - OP
Thanks Meter 6
Posts: 227
Join Date: Mar 2008
Location: dallas
Quote:
I recommend starting from scratch to avoid any problems
my setup is

1.) True 2.1 Samsung T mobile Image http://tinyurl.com/2bc5b6r

2.)BETA OC 1.2Ghz (no added steps for now)
kernel-vibext4-oc1.tar.md5
MD5:d1e26f769406c5d368492855c7b5059e

...you can try his new version of the kernel if you like, my phone i runs fine on the beta , so i havent tried the new ones

more info on the kernal hack http://forum.xda-developers.com/showthread.php?t=744655

3.) RyanZAEXT2LagFix BETA 2-3.zip http://forum.xda-developers.com/atta...3&d=1282320979

this is the exact order in which i modded my phone and i have no ran into any problems, it was a smooth process , and yes it was my first time modding my samsung phone and i rate it as very easy to do.



Frequently Asked Questions

Q: My apps are force closing while this fix is running, and I can't use my phone!
A: By design. The script has backed up/copied your apps over to the internal SD card (remember the requirement about 1.5GB of free space on the SD card?). It is now overwriting them with a 1.5GB file. As the file overwrites an app that is trying to do something, it will probably force close. This is normal.
Closing all running apps, and removing widgets before running this fix can make the process much smoother, though.

Q: The script can't transfer files to my phone / The script can't run / Help help I'm dieing!
A: Read the first post again.

Q: My paid apps from the market don't show up.
A: I will hopefully have a fix for this sooner or later. Hold tight! It's in the known issues. I don't have access to paid apps, so I can't test this.

Q: Does this need busybox?
A: No, busybox is included.

Q: I only have 200mb of free space now! What gives?
A: The lag fix has made a 1.5GB file, and is storing all of the data inside there. The side effect is that the free space meter is now incorrect. Sorry, this can't be helped.
You can check real free space by using ADB like this:
Code:

adb shell
su
busybox df -h

Q: When I use a backup tool, the backup is now 1.5GB big! It's taking forever!
A: The backup tool isn't designed to work with this fix. It will work, it just won't work well. Hopefully this fix will be short lived, and either Samsung will give us a new update, or someone will give us a good custom firmware that can natively mount what we need, where we need it. Or someone might come out with a better backup manager. Until then, we suffer.

Q: Will a reflash wipe this fix?
A: Yes, a reflash will wipe everything this fix did.

Q: Can this brick my phone?
A: If you know how to get to the download mode from power off (hint: volumedown+home+power), then almost nothing short of throwing your phone off a tall building can actually brick it. If you can't do this though, or don't know someone who can, then you're better off waiting for samsung to release a fix. Anything that moves files around on your device has the potential to break things, and this fix has no QA department.

Q: Why is /dbdata not included in your fix, but other people have included it?
A: Other people have included it in the same way my 2-2 fix includes it. However, /dbdata is ROM backed. This means that the real files are on ROM, and only the changes appear in the /dbdata folder. When copying or moving files from this folder, you would need to specify each folder by exact name to ensure that it was copied across, and each firmware can have their own names. (This is because RFS wildcard will not catch an unused ROM backed file.) In some cases, you can get lucky and have this work perfectly because you have already used all the files in /dbdata. There is no fail safe method to do this though, and /dbdata does not make a big difference to performance. (It is already on NAND flash.) If you want to try your luck, v2-2 is still available.

Q: Why does this lag fix work? Is it slowly destroying my phone?
A: Let's say an application counts from 1 to 10, and writes the value each time to disk.

Stock:
1 -> App tells RFS to write 1 to disk -> RFS writes 1 to disk -> RFS writes journal saying to changed the value on the disk.
2 -> App tells RFS to write 2 to disk -> RFS writes 2 to disk -> RFS writes journal saying to changed the value on the disk.
..
9 -> App tells RFS to write 9 to disk -> RFS writes 9 to disk -> RFS writes journal saying to changed the value on the disk.
10 -> App tells RFS to write 10 to disk -> RFS writes 10 to disk -> RFS writes journal saying it changed the value on the disk.

Total physical disk writes: 20. Speed: SLOW! Wear and tear on disk: HIGH!

Lag Fix:
1 -> App tells EXT2 to write 1 to disk -> EXT2 stores 1 in RAM.
2 -> App tells EXT2 to write 2 to disk -> EXT2 stores 2 in RAM.
..
9 -> App tells EXT2 to write 9 to disk -> EXT2 stores 9 in RAM.
10 -> App tells EXT2 to write 10 to disk -> EXT2 stores 10 in RAM.
..
EXT2 tells RFS to write 10 to disk -> RFS writes 10 to disk -> RFS writes journal saying it changed the value on the disk.

Total physical disk writes: 2. Speed: FAST! Wear and tear on disk: LOW!

This isn't exactly what is happening, but it gives you the general idea.

Q: Can this mod work on other Android devices? Would we see a performance boost on them as well? If not why is it limited to the Galaxy S?
A: SGS has very very good hardware, but it has some parts of it's hardware poorly implemented. The filesystem that samsung chose to use is custom-built using FAT32 as a base, RFS. It has a lot of the problems that FAT32 has, and should have been left back in the 90s, or even the 80s.

One of the big issues with it is how it handles multiple requests - it blocks. It blocks everything. When your mail app wants to read the mail you just tried to view, but your twitter app is busy writing a new tweat it just received, your mail app is forced to wait.

This is bad, but it could be worse! And it is... your twitter app didn't just get one tweat, it got 50 tweaks. It is busy writing the tweats one by one to the filesystem. This would be fine, since all modern filesystems will buffer writes, so instead of writing each one at a time, they will batch them together and write it as a big chunk. Uh oh - RFS does no buffering at all! After each write, it will also write an update to the grafted-on journal system. Guess what happened to your mail you were trying to view while all this happened? It 'lagged' and you got a black screen for half a second, before the mail popped into view.

Luckily the hardware on the device is so good that you usually don't even notice the problem until you have a lot of apps running, all writing their updates when you unlock the phone.

This is mostly speculation based on experiments done on RFS -- RFS is closed source, and we have no idea if the problems are just badly set settings (such as a block size that is too small), coding bugs in the implementation, or if RFS is just really that badly designed.

This fix just grafts a buffer on top of the RFS filesystem, using a very very simple and fast filesystem, EXT2. It fixes most of the issues by writing to RFS as seldom as possible.

So no, this fix won't fix other devices, since they're already running quite close to maximum speed. The SGS at stock is running nowhere near maximum speed, and this lag fix takes it a bit closer. You could probably speed up other devices by tweaking the filesystem settings to give them a big buffer or similar, but it isn't really needed. (I haven't actually tried to put an EXT2 onto any other Android phone, as I don't have any other Android phone, so this is just speculation.)

Q: My phone is fast now!
A: Yeah.
Last edited by RyanZA; 18th August 2010 at 10:52 PM..
Kevin H: Server Administrator
Phone: Samsung Nexus S 4g
ROM: MIUI 2.7.6 with Things and Stuff + DIANXIN

________________________________________
Technology makes it work. People make it happen.
________________________________________
 
sl0play
Old
#3  
Senior Member
Thanks Meter 14
Posts: 167
Join Date: Jun 2010
I used this yesterday. Works a treat! Just be patient when its running.

Texted While Driving
 
lqaddict
Old
#4  
lqaddict's Avatar
Senior Member
Thanks Meter 60
Posts: 1,331
Join Date: Jul 2010
Location: NYC
You need to fix the links if you reposted it
 
djkdawg
Old
#5  
Senior Member - OP
Thanks Meter 6
Posts: 227
Join Date: Mar 2008
Location: dallas
Quote:
Originally Posted by lqaddict View Post
You need to fix the links if you reposted it
i fixed the links before i reposted it and re-added the attachments , is there a certain link i forgot to fix ?
Kevin H: Server Administrator
Phone: Samsung Nexus S 4g
ROM: MIUI 2.7.6 with Things and Stuff + DIANXIN

________________________________________
Technology makes it work. People make it happen.
________________________________________
 
bobby915
Old
#6  
Member
Thanks Meter 1
Posts: 34
Join Date: Jul 2009
================================================== =============
================================================== =============
One Click Lag Fix for Galaxy S I9000
================================================== =============
================================================== =============
__________________________________________________ ________
Pushing required files to /sdcard - Please wait.
* daemon not running. starting it now *
* daemon started successfully *
mkdir failed for /sdcard/lagfixtemp, File exists
cannot stat 'createlagfix.txt': No such file or directory
cannot stat 'playlogos1': No such file or directory
cannot stat 'userinit.sh': No such file or directory
cannot stat 'busybox': No such file or directory
cannot stat 'e2fsck': No such file or directory
cannot stat 'libext2_blkid.so': No such file or directory
cannot stat 'libext2_com_err.so': No such file or directory
cannot stat 'libext2_e2p.so': No such file or directory
cannot stat 'libext2_profile.so': No such file or directory
cannot stat 'libext2_uuid.so': No such file or directory
cannot stat 'libext2fs.so': No such file or directory
cannot stat 'mke2fs': No such file or directory
cannot stat 'resize2fs': No such file or directory
cannot stat 'tune2fs': No such file or directory
Now running lag fix. On your device, select allow root privledges!"
/system/bin/sh: Can't open /sdcard/lagfixtemp/createlagfix.sh
Script complete!
* server not running *
Press any key to continue . . .




any help?
 
djkdawg
Old
#7  
Senior Member - OP
Thanks Meter 6
Posts: 227
Join Date: Mar 2008
Location: dallas
did you unzip the files and put them all in the same directory ???


Quote:
Originally Posted by bobby915 View Post
================================================== =============
================================================== =============
One Click Lag Fix for Galaxy S I9000
================================================== =============
================================================== =============
__________________________________________________ ________
Pushing required files to /sdcard - Please wait.
* daemon not running. starting it now *
* daemon started successfully *
mkdir failed for /sdcard/lagfixtemp, File exists
cannot stat 'createlagfix.txt': No such file or directory
cannot stat 'playlogos1': No such file or directory
cannot stat 'userinit.sh': No such file or directory
cannot stat 'busybox': No such file or directory
cannot stat 'e2fsck': No such file or directory
cannot stat 'libext2_blkid.so': No such file or directory
cannot stat 'libext2_com_err.so': No such file or directory
cannot stat 'libext2_e2p.so': No such file or directory
cannot stat 'libext2_profile.so': No such file or directory
cannot stat 'libext2_uuid.so': No such file or directory
cannot stat 'libext2fs.so': No such file or directory
cannot stat 'mke2fs': No such file or directory
cannot stat 'resize2fs': No such file or directory
cannot stat 'tune2fs': No such file or directory
Now running lag fix. On your device, select allow root privledges!"
/system/bin/sh: Can't open /sdcard/lagfixtemp/createlagfix.sh
Script complete!
* server not running *
Press any key to continue . . .




any help?
Kevin H: Server Administrator
Phone: Samsung Nexus S 4g
ROM: MIUI 2.7.6 with Things and Stuff + DIANXIN

________________________________________
Technology makes it work. People make it happen.
________________________________________
 
bobby915
Old
(Last edited by bobby915; 20th August 2010 at 08:26 PM.) Reason: extracted to folder, now working (:
#8  
Member
Thanks Meter 1
Posts: 34
Join Date: Jul 2009
Quote:
Originally Posted by djkdawg View Post
did you unzip the files and put them all in the same directory ???
i extracted all files to desktop and ran lagfix.bat from there
 
djkdawg
Old
#9  
Senior Member - OP
Thanks Meter 6
Posts: 227
Join Date: Mar 2008
Location: dallas
Quote:
Originally Posted by bobby915 View Post
i extracted all files to desktop and ran lagfix.bat from there
do you have usb debugging enabled? do you have any other lag fix installed ?
Kevin H: Server Administrator
Phone: Samsung Nexus S 4g
ROM: MIUI 2.7.6 with Things and Stuff + DIANXIN

________________________________________
Technology makes it work. People make it happen.
________________________________________
 
bobby915
Old
#10  
Member
Thanks Meter 1
Posts: 34
Join Date: Jul 2009
Quote:
Originally Posted by djkdawg View Post
do you have usb debugging enabled? do you have any other lag fix installed ?
Got it working thanks

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Tasker Alternative: AutomateIt, Automates Your Device Tasks – XDA Developer TV

XDA Developer TV Producer Kevin wants to help make your … more

Preventing App Piracy: Join the Discussion

The topic of piracy is always a touchy subject, but I feel that the grass roots style of Android … more

Jolla Sailfish OS Flagship Device Makes First Appearance

Given the amount of coverage that Android receives around here, you could almost be … more

XDA University: Porting ClockworkMod Recovery to New Devices

Having a good recovery makes the process of modifying, tweaking, maintaining, … more