09-01-2011 07:40 AM
460 123 ...
tools
  1. ragnarokx's Avatar
    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.

    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!).



    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:




    6. Clockwork v3.0.0.5 will automatically convert your filesystem from RFS to EXT4, so you're now ready for some EXT4 ROMs 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:


    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
    mredamon, BBooDad, werkx and 18 others like this.
    12-30-2010 12:05 AM
  2. pre2epic4g's Avatar
    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.
    12-30-2010 01:17 AM
  3. Paul627g's Avatar
    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?
    12-30-2010 09:31 AM
  4. ragnarokx's Avatar
    Themes/add-ons should all still work, as long as you flash them with the new Clockwork v2.5.1.2.
    12-30-2010 10:50 AM
  5. mredamon's Avatar
    If you have installed this ROM then do you need to perform steps 1 and 2?
    12-30-2010 12:01 PM
  6. ragnarokx's Avatar
    Yes, because what you're on is not stock Froyo. You must start with a clean/unmodified version of DK28.
    12-30-2010 12:06 PM
  7. mredamon's Avatar
    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.
    12-30-2010 12:41 PM
  8. ragnarokx's Avatar
    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.
    mredamon and skipjohn like this.
    12-30-2010 12:50 PM
  9. Paul627g's Avatar
    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?
    12-30-2010 01:52 PM
  10. ragnarokx's Avatar
    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.
    12-30-2010 02:33 PM
  11. Paul627g's Avatar
    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.
    12-30-2010 03:08 PM
  12. ragnarokx's Avatar
    The midNIGHT ROM is based on Bonzai, and it offers EXT4 support. You could give that a try.
    12-30-2010 03:19 PM
  13. mredamon's Avatar
    thanks so much for posting. my epic is now epic
    12-30-2010 03:22 PM
  14. feralpanda's Avatar
    i got the "md5 hash is invalid" error in odin. should I just try to download the froyo md5 again or am I doing something wrong?
    12-30-2010 06:29 PM
  15. ragnarokx's Avatar
    Try doing it without the .pit file, that works for some people.
    willmsbrg likes this.
    12-30-2010 06:49 PM
  16. willmsbrg's Avatar
    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.
    12-30-2010 08:15 PM
  17. ragnarokx's Avatar
    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.
    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.
    12-30-2010 08:48 PM
  18. willmsbrg's Avatar
    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.
    12-30-2010 09:10 PM
  19. willmsbrg's Avatar
    Update, wireless is working perfectly fine..~ just the GPS is the only problem. But, like I said, have had those with any flavor of froyo...~~
    ragnarokx likes this.
    12-30-2010 09:47 PM
  20. lancelot916's Avatar
    i got the "md5 hash is invalid" error in odin. should I just try to download the froyo md5 again or am I doing something wrong?
    I am getting this too and I've tried the alternative without pit file. other thoughts?
    12-30-2010 11:21 PM
  21. ragnarokx's Avatar
    You're trying to flash stock Froyo with Odin3+v1.61 correct? A few things to try:

    restart both the computer and phone and try again
    use a different USB port and/or cable
    redownload the .tar.md5 file
    12-30-2010 11:35 PM
  22. lancelot916's Avatar
    You're trying to flash stock Froyo with Odin3+v1.61 correct? A few things to try:

    restart both the computer and phone and try again
    use a different USB port and/or cable
    redownload the .tar.md5 file
    done
    done
    done

    Sorry, still the same. MD5 invalid
    12-30-2010 11:56 PM
  23. ragnarokx's Avatar
    Try removing the ".md5" from the end of that file and then flashing it with and without the .pit file.
    12-31-2010 12:12 AM
  24. lancelot916's Avatar
    try removing the ".md5" from the end of that file and then flashing it with and without the .pit file.
    yes it worked
    12-31-2010 12:19 AM
  25. willmsbrg's Avatar
    I wanted to offer a quadrant benchmark report after using this for almost 24hrs. Running the benchmark after starting the phone with no additional programs running beyond the os and other needed apps.

    I got 3 benchmarks of 1524, 1514 and 1503 which is much better than I had running the old file system even on dk-28.
    Latest benchmark 1576...
    12-31-2010 05:19 PM
460 123 ...
LINK TO POST COPIED TO CLIPBOARD