[UTIL][DISCONT'D] CFLagFix 1.90 (ext2+ext3+resize+uninst support)

Search This thread

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu
THIS TOOL HAS BEEN DISCONTINUED. IF YOU REALLY NEED A LAGFIX, USE VOODOO. HOWEVER, WITH LATEST ROMS I DONT PERSONALLY FEEL A LAGFIX IS STILL NEEDED, THUS I DON'T USE ONE, AND WILL NOT CONTINUE DEVELOPING ONE



About
Here it is, yet another LagFix tool. It's certainly not the first, but it does offer some things others do not (at the time of this writing).

This patch uses the ext2/ext3 image in /data method.

IMPORTANT NOTICE FOR FROYO USERS
(1) Use ext2. ext3 is NOT supported on Froyo, only Eclair
(2) The installation will fail if you apps installed to SD. Go to Settings -> Applications -> Manage -> On SD card. Click each app and click "Move to phone". In the end, the "On SD card" list should be empty. Reboot. Install CFLagFix. When the fix is installed, you can move apps back to the SD card if you wish.

Features
- Lots of checks to make sure the fix is possible
- This is not just based on a script, but a lot of commands are performed and their results rigorously checked to be what is expected
- You can select (from a set of presets) which folders you want to lagfix
- You can select how big the image should be (between 128mb and all the free space in /data minus 250mb, to prevent low storage space warnings)
- The actual moving of data from RFS to the image is done in a boot loop, while the files are not in use. This minimizes the chance of corruption during move (settings being lost, etc)
- Comes with e2fsprogs, and e2fsck is performed each boot to fix a corrupted image
- Comes with it's own busybox, so no need to install it, and no chance for conflicts
- If an ext2 image is used, it is tuned to not reserve any blocks
- If an ext3 image is used, it is tuned to not reserve any blocks and use journalling
- Also moves databases (safely)
- Uninstall option
- Resize option, resize your partition whenever you want, to whatever (possible) size you want
- "Full automatic" option, this will max out the image size while still preventing the low storage space warning, and will also reclaim the space from the backup folders and automatically resize the image to max again after that space is reclaimed. This generally results in an image of about 1.5 GB. It'll also leave some space in case the system still needs to write in /data but not in the image.
- Progress monitor ("educated guess" about progress, not exact, but pretty close, usually!)

A fair number of these seem to be unique at the time of this writing.

Notes
- e2fsck result is stored in /data/cflf/e2fsck_result.txt
- list of mounted directories is stored in /data/cflf/mountlist.txt
- if ext3 is used /data/cflf/imageisext3 file will be present
- my own test rom is JM2+root-with-update.zip+ClockworkMod

Known issues
- In case the image is heavily corrupted, e2fsck may take longer to fix it than the rest of the boot process. Theoretically this could result in data loss
- ext3 does not seem to be supported on Froyo ROMs JP1/JP2/JP3

Credits
- mimocan, ykk_five, RyanZA, and all others who have chipped in for various lagfixes
- cynogen, e2fsprogs built for ARM
- kalpik, busybox APK
- ofcourse the original authors of those tools as well
- myself, this is all based on ADB Magic code

Donations
Please feel free to donate: http://www.jongma.org/dx.php

Requirements
- Windows :)
- Microsoft .Net 3.5 framework
- Phone in USB debugging mode
- SuperUser

Before using ...
I strongly recommend using ClockWorkMod and making a backup of your ROM. Just in case :) Also, during any operation, I advise having your phone hooked up so I can draw power from the computer.

Usage
- Unzip the attached file somewhere
- Make sure your phone is connected in USB debugging mode
- Make sure you have SuperUser installed
- Run CFLagFix.exe

There are three tabs:

Install LagFix
This tab allows you to install the LagFix, and lets you configure some options.

I recommand leaving the "Full automatic" option turned on, if you do, just press "Install !" and everything will be arranged for you. If you turn this option off, you can configure some settings manually, but note that using this does not reclaim wasted space of the backup files.

Note that you can still select to use ext3 instead of ext2, even if in "Full automatic" mode.

When you press "Install !", the program will be finished quickly, but your phone may continue working for 30 minutes or so, and keep rebooting very often. If you have a lot of data installed, it may take even longer.

Do NOT even touch your phone until Android boots up again!

A lot of things are checked before the install will start. You will need about 50% free in /data for the operation to work, but it will check this before making any modifications on your phone.

Resize Partition
This tab allows you to change the current ext2/ext3 partition size. The slider will only let you select values that are actually possible, i.e., bigger than your current data usage and smaller than the total space that could be occupied by the image.

Clicking "Resize !" will reboot your phone and resize the partition. Again, this can take an awfully long time! Don't panic, just wait it out.

Uninstall LagFix
This will uninstall the LagFix. It will completely remove it. Before removing it, however, it will move all files out of the image and back into the normal filesystem again, so no data is lost.

Clicking "Uninstall !" will reboot your phone and perform the uninstallation. Again, this can take an awfully long time! Don't panic, just wait it out.

Note that uninstallation will only work if you are using less than 50% of the device's capacity, but again the program will check this before making any modifications on your phone.

You can only uninstall installations of CFLagFix 1.20 and newer !!

BETA
This is very beta, use at your own risk!

WARNING
This patch is NOT compatible with ANY other lagfix tools. Either undo those completely, or just don't use this. If you were using one of those, I'd personally recommend a complete reflash of the firmware before using this patch.

WARNING #2
Before trying 1.80, please see this post.

Download
<< 1.70: 632
 

Attachments

  • CFLagFix-1.70.zip
    1.5 MB · Views: 2,976
  • CFLagFix-1.80.zip
    1.5 MB · Views: 4,904
  • CFLagFix-1.90.zip
    1.5 MB · Views: 9,770
Last edited:

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu
Changelogs

1.80, 15-08-10
- Redone some crucial parts of the patching procedure (for all install, resize and uninstall). Should fix all remaining issues!

1.70, 13-08-10
- Added /data/app-private/ folder
- Added progress monitor (estimates.... not exact)
- Moved /dbdata/databases to it's own partition, much faster for smaller read/writes

1.60, 12-08-10
- Updated codebase to ADB Magic 0.9, fixes issues with some weird pre-existing installations of busybox

1.50, 12-08-10
- Added "full auto" mode, "one click" solution for beginners
- Added ext3 support
- Added resize support
- Added uninstall support
- Fixed some issues
- Update scripts

1.20, 11-08-10
- Everything has been moved to /data/cflf/ , this - amongst other things - fixes issues with JP3

1.01, 11-08-10
- Adusted a permission error which could cause the system to be unable to create any new databases

Fix for 1.00 users: there isn't any yet. This is *beep* to fix manually. I would advise this "unpatch" method posted here: http://xdaforums.com/showpost.php?p=7616676&postcount=29, then repatch with the latest version.
 
Last edited:

lyno

Senior Member
Feb 9, 2005
96
10
CFLagFix.exe doesn't even run for me.

"The application failed to initialize properly (0xc0000135). Click OK to termiate the application."
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu

lyno

Senior Member
Feb 9, 2005
96
10

turbonutter

Member
Jul 19, 2010
9
0
installing now

Well im gonna give this a shot, have just installed the african jg8 and rooted,am doing this fix now.

Then ill try the 1.2 overclock on top, ill post a score shortly :).
 

veenone

Member
Feb 27, 2008
41
8
Jakarta
just tried out your tool on my stock DXJF4 (with apps in it, not clean condition). With default size as well (around 1200 mb)
Actually I used mimocan's fix before but everything was wiped by mistake and everything went to default condition.

After the process finished, the Android displayed information about damaged internal SD, but everything was working. Is that expectable?

Now I got 2260 using Quadrant, leap from 1700 with mimocan's fix. :D


Nice job Chainfire!!
Can't wait to use JM2 / DDJG4 :D

btw, can I post this on my blog? :p

:update :

whenever I open gallery, it always says no sdcard detected... do you know how to fix this? -> it doesn't recognize both my internal & external sd, but i can browse them properly in Estrongs/astro
 
Last edited:

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu
This looks so awesome! Thank you!

Any chance for open sourcing this?

Not at the moment, but maybe in the future :)

Not bad though i see one problem... it's windows only ^^

Can't be helped. Not going to release a non-Windows versions. Perhaps wine/mono will make it work, though I doubt it :)

Sorry, bit of a noob here - what exactly do you mean by this? Why would we only want to 'lagfix' certain folders and not the whole thing?

You can't really lagfix all folders, as the process where the image is mounted is run asynchronously with the rest of the boot process. There will be havoc if the system can't load certain files because the image is not mounted yet. This is why you can't just lagfix the entire system, but only certain parts.

In the presets I have only added those folders that I feel are mostly safe to lagfix AND would actually benefit the speed of the phone.

Also, for some folders there is some discussion to whether or not it is beneficial to have them in the image, like /dbdata/databases. I personally feel it should be lagfixed, but not everyone agrees.

just tried out your tool on my stock DXJF4 (with apps in it, not clean condition). With default size as well (around 1200 mb)
Actually I used mimocan's fix before but everything was wiped by mistake and everything went to default condition.

After the process finished, the Android displayed information about damaged internal SD, but everything was working. Is that expectable?

Now I got 2260 using Quadrant, leap from 1700 with mimocan's fix. :D

Nice job Chainfire!!
Can't wait to use JM2 / DDJG4 :D

btw, can I post this on my blog? :p

I have not seen the "damaged internal SD" message before in any of my tests. It might be ROM specific (I'm personally using JM2). I would recommend rebooting (using the "hold power button + press power off" method) and see if the message still comes up. Let me know what happens.

And yes, feel free to post about it in your blog.
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu
just tried out your tool on my stock DXJF4 (with apps in it, not clean condition). With default size as well (around 1200 mb)
Actually I used mimocan's fix before but everything was wiped by mistake and everything went to default condition.

After the process finished, the Android displayed information about damaged internal SD, but everything was working. Is that expectable?

Now I got 2260 using Quadrant, leap from 1700 with mimocan's fix. :D


Nice job Chainfire!!
Can't wait to use JM2 / DDJG4 :D

btw, can I post this on my blog? :p

:update :

whenever I open gallery, it always says no sdcard detected... do you know how to fix this?

Replying to the same message again, hehe.

Now that I'm thinking about, how exactly did your device got wiped ? Anything less than an actual firmware flash does not completely remove mimocan's fix, AFAIK. To completely undo it you'd have to completely reflash (and get stock kernel back), and possibly remove the ext partition from your SD. In other words, if you "wiped" from recovery, this is not a removal of mimocan (AFAIK).

Gallery is working fine for me, by the way, and as stated above, I have not seen that message in my tests with JM2 (neither with a lot of apps installed nor a clean flash).

(Then again, this is the first release, so there might be issues :p)
 
Last edited:

Daemos

Senior Member
Dec 1, 2005
676
93
Is it possible to do this onto an external SD card (provided one has one that is fast enough) so we do not risk any possible further damage to the internal card due to excessive IO.

I believe it would be quite difficult to replace the internal SD card, and in order to load custom roms (with update.zip) it must be mounted to the internal SD.

I'd much rather replace external SD cards if I had to choose between the internal and an external.
 

veenone

Member
Feb 27, 2008
41
8
Jakarta
well everything was restored to factory state when I went to CSC menu. I think mimocan's fix also removed since I got 800 in quadrant score.

Update: after I rebooted the sgs for a couple times, now it recognize both sd cards.. weird.. But that's fine since the issue is solved now! :D
 

Laum

Senior Member
Jun 23, 2010
180
19
Is it possible to do this onto an external SD card (provided one has one that is fast enough) so we do not risk any possible further damage to the internal card due to excessive IO.

I believe it would be quite difficult to replace the internal SD card, and in order to load custom roms (with update.zip) it must be mounted to the internal SD.

I'd much rather replace external SD cards if I had to choose between the internal and an external.

This fix is using exactly same space that is already reserved for user data and programs. And it is on the internal SD. So I really can't think how this fix could cause any damage at all. Thoughts?
 

DrIGGI

Member
Jul 28, 2010
48
0
I selected maximum Space, and now i have low internal memory. How to remove this fix or change the Space?
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu
Is it possible to do this onto an external SD card (provided one has one that is fast enough) so we do not risk any possible further damage to the internal card due to excessive IO.

I believe it would be quite difficult to replace the internal SD card, and in order to load custom roms (with update.zip) it must be mounted to the internal SD.

I'd much rather replace external SD cards if I had to choose between the internal and an external.

Use mimocan's fix if you want to use external SD - it is especially made for that! His thread is a sticky (at the top) in this forum.

well everything was restored to factory state when I went to CSC menu. I think mimocan's fix also removed since I got 800 in quadrant score.

Update: after I rebooted the sgs for a couple times, now it recognize both sd cards.. weird.. But that's fine since the issue is solved now! :D

Mimocan's fix uses Odin. Like update.zip's, a "factory reset" does not remove patches made in this way, only a real flash does.

Either way, happy to see your problem is solved :)
 

veenone

Member
Feb 27, 2008
41
8
Jakarta
I think the problem was the system didn't mount sd cards properly after several boots from CFLagFix. So it needs more reboots to mount the sdcard with structure change properly...
 

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
Not at the moment, but maybe in the future :)



Can't be helped. Not going to release a non-Windows versions. Perhaps wine/mono will make it work, though I doubt it :)

It's a shame you can't open source this. :(

Personally, there is no way I'm going to run something like this without source - I believe you are just trying to help us out, but there is always the chance that you could be doing something damaging by mistake, or even installing a trojan on purpose.

I'll be following release though, looks awesome and hopefully you'll be able to open source this soon! :D