Samsung Epic 4G Lag Fix: RFS to EXT4 for Froyo DK28

ragnarokx

Well-known member
Apr 20, 2010
6,915
1,696
0
Visit site
This thread is for converting Froyo DK28 to EXT4. For Froyo EB13, go to this thread.

Topic of this thread: converting your Epic's RFS filesystem to an EXT4 filesystem, allowing you to flash ROMs with EXT4 support. I strongly suggest reading through these steps at least once before starting.

This procedure can take you from a completely stock version of Froyo DK28, to being rooted with ClockworkMod Recovery v3.0.0.5 (generically referred to as ClockworkMod3) and having an EXT4 compatible ROM. If you're already rooted, already have another version of Clockwork or already have a custom ROM installed that's ok - this will still work for you.

Standard Disclaimer: as with any Android modification, proceed at your own risk.

What is a filesystem?
A filesystem is a method of storing and organizing files and their data. Basically, a filesystem organizes your files into a database for the storage, organization, manipulation, and retrieval by the Android operating system.

What's the difference between RFS and EXT4?
RFS is Samsung's proprietary filesystem, which has a pretty poorly written driver and is overall not very efficient. EXT4 is the filesystem used by Linux, and is more efficient than RFS. EXT4's efficiency over RFS gives a noticeable boost in operating system responsiveness/performance (the nimble Nexus S uses EXT4).

What are the pros and cons of converting to EXT4?
Pros: increased OS speed/responsiveness, ability to install newer ROMs that require EXT4. Cons: once you convert to EXT4, if you want to flash a ROM that does not support EXT4 you must use Odin or flash a special zip in Clockwork to return to RFS (see last question before the procedure for more info).

What does this procedure do to my phone exactly?
It will permanently root your phone (if not already rooted; also safe for rooted phones), as well as install Clockwork v3.0.0.5, which will format "/cache", "/data" and "/system" from RFS to EXT4. Having an EXT4 filesystem will enable you to install ROMs with EXT4 support, and having Clockwork v3.0.0.5 will enable you to flash ROMs, kernels, themes, etc. that use Edify scripts.

What's an Edify script?
There are currently two ways to create flashable zip scripts. The first one is "update-script", also known as Amend. Amend was the first version of the scripting language created by Google, and was used in Android 1.0 and Cupcake (1.5). However, Amend has two serious design flaws: function arguments can not span more than 1 word, and the scripting language is compiled into the recovery causing image bloat and inflexibility. Because of this reason Google removed Amend support in Donut and beyond, and instead switched to update-binary and updater-script, which is also known as Edify.

However, Amend support was left in Clockwork, to help ease the transition off its usage in ROM creation. Clockwork needed to transition to using the newer Edify scripts to be compatible with Gingerbread. So we now have a recovery that is Gingerbread ready and uses the better Edify scripts instead of Amend scripts.

What do I need to get started?
A Windows computer (this is also possible on OSX and Linux, however there will be procedural differences not covered here), a USB cable, and an Epic 4G with Froyo DK28 installed (does not matter if you're already rooted or have a custom ROM).

Is there any way to go back to my original setup after I do this?
Yes, you can flash this zip in ClockworkMod3. It will revert your filesystem to RFS as well as give you ClockworkMod2 with a prerooted, odexed system with some additional minor mods. You can alternatively use Odin to return to a completely stock ROM.

[Procedure]
Now is the time to backup anything on your phone that you need, as Step 0 and Step 7 will erase everything on your Epic (excluding the SD card).

0. You must have Froyo DK28 (Android 2.2) before continuing to the next step. If you need to update from Eclair to Froyo, go to this thread: Restore to Froyo DK28. Once you're done, come back and head on down to the next step.

1. Download and install the appropriate drivers for your Windows system:
32-bit drivers
64-bit drivers

Plug your Epic into your computer via USB and let Windows recognize your phone/configure the drivers. After Windows is done with the drivers, unplug your Epic.

2. Download OneClickRootCWM3.zip and extract it to a folder on your Windows desktop.

3. Download the zip file of the ROM you want to flash, and place it on your phone's SD card.

4. On your phone, push MENU, then select Applications > Development, then enable USB debugging and connect your phone to your computer via USB.
5247348177_81f69fe529.jpg

Credit for picture goes to Ahmgsk

5. Now double click "run.bat" in the folder from Step 2.

The type of USB cord and the specific USB computer port can make or break the success of this installation. If you are getting errors in the command prompt during this step, trying swapping USB cables and/or switching USB ports (even the USB cord that came with the phone can cause problems!).

5326073720_bffb40368d_z.jpg


If the command prompt asks you to restart adb, you need to go into Windows Task Manager (ctrl-alt-del on your keyboard) and end adb in the process tab, then go into the folder from Step 2 and double-click on the "adb" file to restart adb.

If the command prompt says "device not connected", disconnect the phone and reboot it, turn debugging mode back on, reconnect the phone via USB, and rerun the "run.bat" file again. If you're still getting "device not connected", try repeating these steps one at a time or in a different order, for example just kill adb and rerun "run.bat" or only reboot the phone and then rerun "run.bat".

Antivirus programs can also cause problems. If you still can't get the run.bat file to work, try disabling your antivirus software.


If all goes well your command prompt should look something like this:

5325466259_8ac1e8f118_z.jpg

5325466439_a51dab0675_z.jpg


6. Clockwork v3.0.0.5 will automatically convert your filesystem from RFS to EXT4, so you're now ready for some EXT4 ROMs :D Note: if you try and boot your phone after converting to EXT4, you will get stuck on the Samsung screen. You need to flash an EXT4 ROM before booting, so proceed to Step 7.

7. Congratulations! The hard part is over - now all that's left is to flash an EXT4 ROM.

You should have the zip file of the ROM you want to flash already on your SD card from Step 3. Boot into Clockwork v3.0.0.5 by turning off your phone, then holding volume down+camera+power buttons (do NOT use an app to reboot to recovery, see Important Notes below). You can use the volume buttons to move up and down in the menus, and camera for select.

It's always a good idea to wipe your phone before flashing a ROM to avoid conflicts. To perform a wipe, while in the Clockwork main menu go to: wipe data/factory reset>yes.

Now to flash your ROM. Go to: install zip from sdcard>choose zip from sdcard>(navigate to the ROM zip on your SD card)>(select it using the camera button)>yes. Your ROM will now be flashed.

Optional: you can confirm you have successfully converted to EXT4 by using the command
Code:
adb shell mount
or
Code:
adb shell df

Your command prompt will return something like this:

5364948600_9350fc4096_z.jpg

Picture courtesy of BlackPearl890

Notice it mentions "ext4", not "rfs".

[/Procedure]

Important Notes
You must boot into Clockwork v3.0.0.5 by turning off your phone and holding volume down+camera+power buttons. If you boot into Clockwork using a program like ROM Manager or Quickboot, you will get errors.

A quick way to manually boot into Clockwork is to press volume up+camera+power buttons to reset your phone, then immediately hold volume down+camera+power buttons until you see the recovery screen with orange text.

Also, as long as you have EXT4 in place you can only flash ROMs with EXT4 support. To flash a ROM without EXT4 support, you must either use Odin to return to stock, or flash this zip in ClockworkMod3.

Any flashable zips you want to install must by compatible with the new Clockwork v3.0.0.5. This will be explicitly indicated, or there will be a note saying the zip is using the new Edify script (as opposed to the old Amend script).

Sources
[MOD] Epic4G EXT4 Support [Froyo Only] [No More RFS!][Updated/Fixed v1.3] - xda-developers
[ROM] Quantum Rom v2.5.0.DK28 | EXT4 REQUIRED! [Updated 12/28/2010] - xda-developers
[ROM] midNIGHT ROM v2.2 EXT4 Support 12/29/2010 - Page 29 - xda-developers
[MOD] Ported Clockwork Mod version 3.0.0.5 [READ OP CAREFULLY!][RELEASED!] - xda-developers
[NOTICE] ClockworkMod Recovery 3.0+ and update-script - xda-developers
[Stock Flash][CWM]ReRFS.Format.ROM.DK28 to revert back to RFS from ext4 - xda-developers
 
Last edited:

pre2epic4g

New member
Dec 30, 2010
1
0
0
Visit site
Dameon87's Epic4G ext4 file system needs a write up by the staff

I think this step forward in technology needs to be written up by the android central staff... my phone flys faster than the speed of sound on 2.2.
 

Paul627g

AC Moderator All-Star
Moderator
Nov 25, 2010
15,963
2,752
0
Visit site
Once your on the EXT4 filesystem can you use any of the themes, add ons and other tools we have available from the regular RFS file system Froyo 2.2 or do we have to wait for those to be reconfigured to work with EXT4? Example anything from the " Compendium of Froyo Themes & Add-Ons " page?
 

mredamon

Active member
Sep 15, 2010
43
2
0
Visit site
But at the top of that page it says
THIS IS NOT A CUSTOM ROM, IT IS SPRINT STOCK ROM.

And when you link to it (I can't create a working link to the article on androidcentral) your comments were "This version of stock Froyo can be flashed no matter..."

How then is it not stock? I'm not being argumentative but am trying to educate myself. This modding stuff is fun.
 
Last edited:

ragnarokx

Well-known member
Apr 20, 2010
6,915
1,696
0
Visit site
It's not a custom ROM, but it is modified. Look at the thread title on XDA:

[Stock Flash][Odin]Dk28 Extended 12/05/2010 inc. Root,GPS hack,Clockwork+Redir.

It is pre-rooted, has a GPS hack, and has Clockwork preinstalled. This is not an unmodified version of Froyo. Starting from a virgin DK28 is the best way to go.
 

Paul627g

AC Moderator All-Star
Moderator
Nov 25, 2010
15,963
2,752
0
Visit site
Thanks Ragnarokx. Had a feeling it would be okay using the new version of Clockwork but I wasn't sure.

BTW, what improvements with the new file system are you noticing? It says lag fix, so are we talking about eliminating the occasional lag when switching apps and things just seem to hang for a second or two?
 

ragnarokx

Well-known member
Apr 20, 2010
6,915
1,696
0
Visit site
Exactly. For example, with the launcher I now use (ADW EX) I was noticing some stuttering when going through the app drawer or a slight pause when moving between different homescreens. Now with EXT4 my launcher never skips a beat and is smooth as butter.
 

Paul627g

AC Moderator All-Star
Moderator
Nov 25, 2010
15,963
2,752
0
Visit site
Exactly. For example, with the launcher I now use (ADW EX) I was noticing some stuttering when going through the app drawer or a slight pause when moving between different homescreens. Now with EXT4 my launcher never skips a beat and is smooth as butter.


Nice.. That would be a nice improvement to see those occcasional stutters/pause/lag whatever we want to classify them as eliminated. I think I will be switching over later tonight when I have more time.

It would be nice if Mammon adapts/converts his Bonsai rom over to support the new file system. :)
 

willmsbrg

Well-known member
Nov 25, 2010
75
1
0
Visit site
Good evening,

I wanted to say thank you for the detailed step by step layout of this conversion. While I did have to run thru it a second time due to a mistake on my part at step 4f and fearing a brick, re-flashed stock dk-28 and went from there. I now am running the ext4 QuantumRomv2.5 and it looks good without all the sprint bloat missing~~

While I had no trouble prior using odin to flash from 2.1 over to 2.2 and back, I didn't root my phone before tonight as I wanted to try new goodies.

I am guessing that once this has been flashed and such, I can delete those zips from the phone correct?

Now, if I want to say try a different ext4 rom, all I need do is drop that onto the sdcard and boot into clockwork (using the method from the instructions cmd prompt ) then simply install the rom from the card like this one or will I need to do more as I needed to with this one with the additional zip files or does it depend on the instructions for the specific item. If that makes sense.:D
 

ragnarokx

Well-known member
Apr 20, 2010
6,915
1,696
0
Visit site
I am guessing that once this has been flashed and such, I can delete those zips from the phone correct?

Yes, once flashed you can get rid of the zip files on your SD card.

Now, if I want to say try a different ext4 rom, all I need do is drop that onto the sdcard and boot into clockwork (using the method from the instructions cmd prompt ) then simply install the rom from the card like this one or will I need to do more as I needed to with this one with the additional zip files or does it depend on the instructions for the specific item. If that makes sense.:D

Once you're on EXT4, you can flash ROMs as you normally would. Just put the ROM zip file on your SD card, boot into the new Clockwork and flash.
 

willmsbrg

Well-known member
Nov 25, 2010
75
1
0
Visit site
Excellent,

I still have no GPS lock but never have on any version of Froyo though I do with eclair. Not a biggie with that.

I have had a slight issue getting my wireless connection to pickup at least for the moment. I will try it again as it seems to just not obtain the ip address then resets and tries again. Will update this as I see how it goes.
 

Forum statistics

Threads
943,143
Messages
6,917,503
Members
3,158,840
Latest member
wei34