[RECOVERY][All-F2FS] TWRP-2.7.0.0 with All-F2FS support [11/03/14]

Search This thread

legolas93

Senior Member
Jul 13, 2010
644
1,267
TWRP-2.7.0.0 with "All-F2FS" support

I have modified the standard TWRP recovery to work with F2FS partitions.
This is different from the previous recoveries that i published.
This is for "All-F2FS" that mean that /system, /cache and /data are formatted with F2FS.
Keep in mind that this can work only with a compatible kernel and ROM.

What is F2FS?

F2FS (Flash-Friendly File System) is a flash file system created by Kim Jaegeuk at Samsung for the Linux operating system kernel. The motive for F2FS was to build a file system that from the start takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.

Download:
  • FormatPartitions.zip: Here
  • TWRP-recovery img: Here

Chagelogs:

- 11/03/14: Initial release

Here are some explanations. Read them

Recovery has the usual red back key to remember you that you are using a F2FS-recovery.
If wiping /system and /cache and making a factory reset from Wipe menu doesn't work, use FormatPartitions.zip. (<- READ THIS)
Instead wiping /data is fine within the wipe menu.

To switch your /system, /cache and /data partitions to F2FS follow instructions:
Keep in mind that you will lose all the files on the memory of your N7.

You need:
- Two files you can download above (img and FormatPartitions.zip)
- A ROM with "All-F2FS" support (Like my SlimKat version)
(Or Make your ROM with Convert To F2FS)
- GApps (i think you want PlayStore.) Usual GApps. Slim AiO work well.

  • Copy a ROM with "All-F2FS" support to your N7
  • Copy GApps to your N7
  • Copy FormatPartitions.zip to your N7
  • Reboot in bootloader
  • Flash this recovery with Fastboot (Maybe Flashify works too)
  • Reboot in new recovery
  • Flash FormatPartitions.zip
  • Reboot recovery (It's needed for some reasons..)
  • Flash ROM
  • Flash GApps
  • Go to Wipe Menu and Format Data (Not a simple wipe)
  • Reboot
  • Done.

It's easier than it seems :)



To restore partitions to stock:


- Download a standard TWRP
- Download RestorePartitions.zip

Hope i dind't any errors writing this down. I personally tested this procedure.
Enjoy. :D
 
Last edited:

CptKlink

Senior Member
Aug 14, 2011
141
57
Edmonton
This is Awesome thxs for your hard work. And a few people where talking about have a Twrp that had all the partitions in f2fs and bam here it is.
 
  • Like
Reactions: farmerbb

farmerbb

Senior Member
Oct 9, 2011
459
346
Somewhere, Utah
Awesome work legolas!

So if I understand correctly, just having an f2fs-supported kernel isn't enough to run f2fs on all partitions? We need a modified ROM as well?

Also, are you going to make a modified TWRP 2.7 with MultiROM support?
 

adomol

Senior Member
Jan 25, 2014
663
593
/etc/init.d
Curious about which ROM has "All F2FS" support? Lego, did you modify one as such?

Sent from my Nexus 7 using Tapatalk
 
Last edited:

legolas93

Senior Member
Jul 13, 2010
644
1,267
Awesome work legolas!

So if I understand correctly, just having an f2fs-supported kernel isn't enough to run f2fs on all partitions? We need a modified ROM as well?

Also, are you going to make a modified TWRP 2.7 with MultiROM support?

Yes. You need a modified ROM too.

Yes when i have some free time! As now this doesn't support MultiROM for the reason writed in OP.

Curious about which ROM has "All F2FS" support? Lego, did you modify one as such?

Sent from my Nexus 7 using Tapatalk

Yes :D. My SlimKat version is ready.
 
  • Like
Reactions: farmerbb and adomol

adomol

Senior Member
Jan 25, 2014
663
593
/etc/init.d
I can verify that everything is working as advertised... Installed your modified files and am now up and running with F2FS.

I'll post if I run into anything odd.


[EDIT] Finished restoring all my apps and data. And it's blazing! Ran an ANTUTU benchmark test and scored a

14829 vs. 12726 of a stock Nexus 7!!!

And the here are the numbers for the Quadrant benchmark: 5748 vs. 3517 for stock... nice!!

Thanks again legolas!
 
Last edited:

bhu1

Senior Member
Aug 1, 2011
5,307
4,517
28
Jaipur
Does the standard omni ROM will work with this? If not then where can I find a modified omni ROM? And where can we find modified gapps?

Sent from my Nexus 7 using Tapatalk
 

SkOrPn

Senior Member
Jun 3, 2007
2,994
948
Albuquerque, NM
www.planetamd64.com
Does the standard omni ROM will work with this? If not then where can I find a modified omni ROM? And where can we find modified gapps?

Sent from my Nexus 7 using Tapatalk

I believe users will have to ask their devs to provide a modified version of their ROM of choice. I'm going to give SlimKat a try with M-kernel here soon I think, just because legolas seems to be the only dev taking F2FS support seriously. I like that about him.

What is meant by "Normal Gapps"? I wasn't aware there was a Gapps considered not normal. There are only different versions of it. Can someone provide a link to "Normal Gapps" please? OP says in the play store but I do not find anything in the play store called normal gapps, or even gapps (although I did find something called Gapps Manager, hmmm). I normally use PA gapps or the latest CM gapps. Thank you

EDIT: Never mind, I just found that SlimROM's has their own version of Gapps, which seems to me to be the best choice if I am going to try SlimKat. lol

Sent from my Nexus 7 using Tapatalk
 
Last edited:

legolas93

Senior Member
Jul 13, 2010
644
1,267
I can verify that everything is working as advertised... Installed your modified files and am now up and running with F2FS.

I'll post if I run into anything odd.


[EDIT] Finished restoring all my apps and data. And it's blazing! Ran an ANTUTU benchmark test and scored a

14829 vs. 12726 of a stock Nexus 7!!!

And the here are the numbers for the Quadrant benchmark: 5748 vs. 3517 for stock... nice!!

Thanks again legolas!

Glad you like this :)

I believe users will have to ask their devs to provide a modified version of their ROM of choice. I'm going to give SlimKat a try with M-kernel here soon I think, just because legolas seems to be the only dev taking F2FS support seriously. I like that about him.

What is meant by "Normal Gapps"? I wasn't aware there was a Gapps considered not normal. There are only different versions of it. Can someone provide a link to "Normal Gapps" please? OP says in the play store but I do not find anything in the play store called normal gapps, or even gapps (although I did find something called Gapps Manager, hmmm). I normally use PA gapps or the latest CM gapps. Thank you

EDIT: Never mind, I just found that SlimROM's has their own version of Gapps, which seems to me to be the best choice if I am going to try SlimKat. lol

Sent from my Nexus 7 using Tapatalk

With "Normal" i mean the usual GApps you used (There are no need for some sort of special GApps..). Maybe "normal" can be a bit confusing.. :silly:
 

SkOrPn

Senior Member
Jun 3, 2007
2,994
948
Albuquerque, NM
www.planetamd64.com
Glad you like this :)

With "Normal" i mean the usual GApps you used (There are no need for some sort of special GApps..). Maybe "normal" can be a bit confusing.. :silly:
Ok, yeah that is a bit confusing, or at least the way you typed it is. Kinda made it seem like there was a different version I needed to look for, lol. So, normal is just what ever Gapps package you prefer to use? In other words, they should all work? Cool, thanks legolas... :good:
 

brclho

Senior Member
Jun 22, 2011
135
14
I can verify that everything is working as advertised... Installed your modified files and am now up and running with F2FS.

I'll post if I run into anything odd.


[EDIT] Finished restoring all my apps and data. And it's blazing! Ran an ANTUTU benchmark test and scored a

14829 vs. 12726 of a stock Nexus 7!!!

And the here are the numbers for the Quadrant benchmark: 5748 vs. 3517 for stock... nice!!

Thanks again legolas!

only got 13840 on my cm11 nexus 7 on antutu. looking forward to more f2fs development!
 

SkOrPn

Senior Member
Jun 3, 2007
2,994
948
Albuquerque, NM
www.planetamd64.com
so that's the difference when all (system & data & cache) is in F2FS : 14k+ in antutu ? And a rom with just the data partition in F2FS got 13k+ ?

In real world terms, that is all the difference you need. The only other way to get your OS's file system any faster is to replace it with a real ssd. Its simple really, F2FS was made for NAND, and EXT4 was not.
 

SkOrPn

Senior Member
Jun 3, 2007
2,994
948
Albuquerque, NM
www.planetamd64.com
Ok, before I start all over can someone tell me how long the Google logo is supposed to stay on the screen please?Its been about 20 minutes now, so I am wondering if its upgrading android in the background but just not displaying it. lol

EDIT: Ok, 45 minutes later, I am giving up. Going to do it all a second time now.
EDIT2: 1 hour later. Got it working second time around. I guess this recovery does not like flashing all kinds of things at once. Just flashed Rom and Gapps and its booting apparently. Will flash the 3rd party kernel and MoAB later.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 100
    TWRP-2.7.0.0 with "All-F2FS" support

    I have modified the standard TWRP recovery to work with F2FS partitions.
    This is different from the previous recoveries that i published.
    This is for "All-F2FS" that mean that /system, /cache and /data are formatted with F2FS.
    Keep in mind that this can work only with a compatible kernel and ROM.

    What is F2FS?

    F2FS (Flash-Friendly File System) is a flash file system created by Kim Jaegeuk at Samsung for the Linux operating system kernel. The motive for F2FS was to build a file system that from the start takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.

    Download:
    • FormatPartitions.zip: Here
    • TWRP-recovery img: Here

    Chagelogs:

    - 11/03/14: Initial release

    Here are some explanations. Read them

    Recovery has the usual red back key to remember you that you are using a F2FS-recovery.
    If wiping /system and /cache and making a factory reset from Wipe menu doesn't work, use FormatPartitions.zip. (<- READ THIS)
    Instead wiping /data is fine within the wipe menu.

    To switch your /system, /cache and /data partitions to F2FS follow instructions:
    Keep in mind that you will lose all the files on the memory of your N7.

    You need:
    - Two files you can download above (img and FormatPartitions.zip)
    - A ROM with "All-F2FS" support (Like my SlimKat version)
    (Or Make your ROM with Convert To F2FS)
    - GApps (i think you want PlayStore.) Usual GApps. Slim AiO work well.

    • Copy a ROM with "All-F2FS" support to your N7
    • Copy GApps to your N7
    • Copy FormatPartitions.zip to your N7
    • Reboot in bootloader
    • Flash this recovery with Fastboot (Maybe Flashify works too)
    • Reboot in new recovery
    • Flash FormatPartitions.zip
    • Reboot recovery (It's needed for some reasons..)
    • Flash ROM
    • Flash GApps
    • Go to Wipe Menu and Format Data (Not a simple wipe)
    • Reboot
    • Done.

    It's easier than it seems :)



    To restore partitions to stock:


    - Download a standard TWRP
    - Download RestorePartitions.zip

    Hope i dind't any errors writing this down. I personally tested this procedure.
    Enjoy. :D
    5
    F2FS conversion success!

    Good day fine community.

    Since many people experienced various problems with this idea (including me!), I tried to help as best I possibly could.

    Warning: I have not tested this fix stopping with TWRP and FormatPartitions.zip. All steps below have been tested including steps to flash ROM (and kernel, if needed - some ROMS have kernels injected within) and GAPPS.

    I also did not mention which ROM (and Kernel) I use, for this thread belongs to legolas93, and promoting anything else would be misplaced.

    legolas93, very well done indeed!

    After 3 days of trial and error and much frustration, I finally could get my aging Nexus 7 2012 to fly again, and like never before at that!:good:

    As is expected, this may not work for some of you, but since I reverted back to stock, this could be seen as a uniform starting point, so DO A NAND BACKUP FIRST!

    Although I am yet unsure if this has any bearing, I tested this with the 3.34 bootloader.

    Again, I am not responsible for anything that happens to your device; I just compiled this quick fix from various data found on XDA.

    Unfortunately, since I tried many solutions by doing my homework of reading, reading, reading the threads again and again and again, I cannot pinpoint exactly to whom the credit all goes to. However, I did hit the thank button where appropriate. :silly:

    For those who still have trouble converting to F2FS, here's what I did, all precisely laid down in exact sequence. So even if some of them MAY seem odd, unnecessary or in wrong sequence it has worked for me:

    1: Back to stock Factory ROM 4.4.2, KOT49H, (with NRT {Wugfresh’s Nexus Root Tool Kit found here});
    2: Unlock-Root procedure with NRT, selecting as well the option to Flash Recovery (manually choose modded open recovery 2.7.0.0 F2FS found above - will have a Red Arrow on bottom right, as opposed to standard TWRP, if succesfully flashed);
    3: Copied both files to sdcard (TWRP-recovery img {even if I flashed it in step 2}, and FormatPartitions.zip), (+ ROM and GAPPS, see warning below);
    4: Flashed TWRP-recovery img with Flashify TWICE, found here.
    5: Rebooted to newly flashed Recovery FROM Flashify (could not from bootloader, nor from NRT, and the fact that 4 way reboot is not installed initially with stock ROM);
    6: Flashed FormatpartitionsZIP TWICE;
    7: Rebooted to Recovery (within Recovery), installing SuperSU all the while;
    *Warning: the steps 8, 9 & 10 REQUIRES that you have a compatible F2FS ROM (and kernel, if not included) and GAPPS, on your device, since I did all the steps in sequence, so I would have a working ROM at the end of the file conversion process.
    8: Flashed F2FS compatible ROM TWICE, and F2FS compatible GAPPS TWICE;
    9: Rebooted to Recovery;
    10: Formatted data (your sdcard) TWICE (from the WIPE menu - NOT wiping anything, just sliding the slider), both times inputting "yes" to format .
    11: Rebooted system: Voila! Was in F2FS compatible ROM!

    Enjoy F2FS!

    Hit the Thank button if I helped you in any way.
    4
    The newest Version of TWRP 2.7.10 actually supports Changing the File System for every Partition. I dont know if this Option is available for every Device, but on the Grouper and Hammerhead it is available so i think we don't need a modified Version anymore. If you happen to have a Device with the newest TWRP Version where this Option isn't available, simply write the TWRP Team, they will take care of it.
    4
    Add settings to enable/disable f2fs forcing mode so we can switch on …
    …the fly. Force will force all wipe/format calls to use f2fs or ext4 depending on the selection. Also added code to ensure settings are re-written back to internal sd after a super wipe. Also removed fstab code to determine the mode since we now have a setting for it

    http://goo.gl/NTamfl

    Add code to analyze the fstab to determine whether we are in f2fs mod…
    …e or ext4 mode

    http://goo.gl/MJXQpE
    4
    About 6 months ago or so a few very talented CM developers left Cyanogen, and started their own project https://omnirom.org/
    They felt that CM was becoming overly commercialized and felt it didn't serve the Android community's best interests. Some experts say this is THE TEAM to watch out for.

    AOSPAL has some of the best absolute highest optimizations that can be used. It uses the SaberMod GCC, which is just a dream on my Nexus 7. The absolute smoothest trouble free ROM I have felt so far. During flashing, setting it up and using it for several days not one tiny bit of lag or trouble was ever seen. Just an epic build of ParanoidAndroid. Yes I love it. The kernel dev is working on figuring out this All-F2FS thing, and maybe here soon we will see it released.
    http://xdaforums.com/showthread.php?t=2636893

    I think i will help them! Don't want to "steal" their work by making my version..

    Question: Can anyone tell me If I've already formatted /data to F2FS, can i just update my recovery and format the other partitions using the zip in the OP without losing all of my data again? Then just flash All F2FS Slim+gapps and be good to go?

    I would like to give this a shot, but would also like to avoid backup and restore of all my data again if possible.

    I guess the real question is what partitions does the FormatPartitions zip format? Just /system and /cache, or also /data? The steps in the OP lead me to believe that the zip does not format /data, but this is not explicitly specified.

    Yes FormatPartitions zip doesn't format your data. Yes your procedure is correct. Remember that after flashing FormatPartions a reboot of recovery may be necessary.

    Thanks for the info, I was also curious about the added benefits of this or if it would be minimal, since you're not typically writing to system or cache anyways.

    Some benefits may be seen even during reading.

    Can't we just have a /data and /cache f2fs conversion and leave /system intact? How many times during usage is system written?
    By just formatting cache we could have a simple transition from already formatted data partitions. Or not?

    See my reply to PrizmaticSmoke. He listed the correct procedure!