[HOWTO][Bacon][F2FS-ALL] F2FS Filesystem

Search This thread

FSadino

Forum Moderator
Staff member
Oct 27, 2011
3,643
4,510
Blue River City
OnePlus One
OnePlus 3
I'm having troubles installing latest CM12.1 nightlies on F2FS system partition.

Steps i did:
1. Used TWRP 2.8.6.0 bacon with f2fs support to format /system /cache /data
2. Flash latest CM12.1 with f2fs support but when it begins to install it format again on ext4 and continue the installation

After that the rom get bootloop, i also tried with AK kernel but no success (i supose it doenst boot because /system is in ext4 but /data and /cache still on f2fs

What i'm doing wrong?
 

tekanina

Senior Member
Jan 14, 2013
395
136
Baltimore
A small question. Is anyone using f2fs on system partition? Does that work ? If not anyone knows what the problem is or why it does not work ?
Do we need sth like that https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/commit/33bf0eb8e8397e339c6c8aa7550f7aa052e28467
or that https://github.com/dorimanx/DORIMANX_LG_STOCK_LP_KERNEL/commit/3e248ab89c9198f018ac1097ad7f0d2ef37b402f

This probably doesn't answer your question but I used f2fs with calkulins cos12 ROM on the system partition and I believe your kernel was the only one I could get it to work with.
 
  • Like
Reactions: Jole7

st11

Senior Member
Aug 19, 2014
56
10
what's the implication of f2fs being built into official CM nightly? I'd guess that installation will be easier than the OP

can someone shed a light as to how much easier it would be now?
 

Jole7

Senior Member
Dec 22, 2013
2,160
1,225
Preveza
what's the implication of f2fs being built into official CM nightly? I'd guess that installation will be easier than the OP

can someone shed a light as to how much easier it would be now?

I think simple format system-data and data media-cache and then install the rom. OTG cable is needed as the internal storage will be wiped.
 

fmc000

Senior Member
Jan 18, 2008
3,137
1,357
The commit says that there's only support for /data and /cache . There's no mention for either /system or /data/media partitions.
 

dev0lver

Senior Member
Apr 20, 2013
667
270
Čakovec
can someone help me, i would like to use sultan's caf rom on full f2fs, but i cant get the rom zip file to flash with f2fs, every time it gets reverted to ext4
data and cache i already have on f2fs, only system is reverted to ext4 when i flash that rom
temasek rom is on full f2fs, system data, cache, and all works ok
but i cant get sultans rom to have ext4 on system partition...
tried to change stuff with this tutorial, but no luck, or am i doing something wrong ?
tried even with this post, again no luck - http://forum.xda-developers.com/one...al-ak-f2fs-t2963619/post57921263#post57921263

can someone help me to make sultan caf full f2fs ?? :)
sultan rom - http://forum.xda-developers.com/one...m-kernel-unofficial-cyanogenmod-12-1-t3120259
 

DerRomtester

Senior Member
Aug 20, 2012
2,900
5,825
24
Neumarkt
can someone help me, i would like to use sultan's caf rom on full f2fs, but i cant get the rom zip file to flash with f2fs, every time it gets reverted to ext4
data and cache i already have on f2fs, only system is reverted to ext4 when i flash that rom
temasek rom is on full f2fs, system data, cache, and all works ok
but i cant get sultans rom to have ext4 on system partition...
tried to change stuff with this tutorial, but no luck, or am i doing something wrong ?
tried even with this post, again no luck - http://forum.xda-developers.com/one...al-ak-f2fs-t2963619/post57921263#post57921263

can someone help me to make sultan caf full f2fs ?? :)
sultan rom - http://forum.xda-developers.com/one...m-kernel-unofficial-cyanogenmod-12-1-t3120259

Not possible. A Rom patch is necessary to support system on f2fs.
 

Jole7

Senior Member
Dec 22, 2013
2,160
1,225
Preveza
can someone help me, i would like to use sultan's caf rom on full f2fs, but i cant get the rom zip file to flash with f2fs, every time it gets reverted to ext4
data and cache i already have on f2fs, only system is reverted to ext4 when i flash that rom
temasek rom is on full f2fs, system data, cache, and all works ok
but i cant get sultans rom to have ext4 on system partition...
tried to change stuff with this tutorial, but no luck, or am i doing something wrong ?
tried even with this post, again no luck - http://forum.xda-developers.com/one...al-ak-f2fs-t2963619/post57921263#post57921263

can someone help me to make sultan caf full f2fs ?? :)
sultan rom - http://forum.xda-developers.com/one...m-kernel-unofficial-cyanogenmod-12-1-t3120259
Hi i will tell you how it works for me: Flash Philz touch recovery 6.59.4 make a full back up the rom to usb stick then format 3 partitions to F2FS then restore the backup and you're ready to go F2FS-ALL (you must be on a kernel that supports f2fs on all partitions TYR kernel or Radioactive, or AK). Check with DiskInfo app after i'm waiting for feedback.
 
Last edited:

dev0lver

Senior Member
Apr 20, 2013
667
270
Čakovec
Hi i will tell you how it works for me: Flash Philz touch recovery 6.59.4 make a full back up the rom to usb stick then format 3 partitions to F2FS then restore the backup and you're ready to go F2FS-ALL (you must be on a kernel that supports f2fs on all partitions TYR kernel or Radioactive, or AK). Check with DiskInfo app after i'm waiting for feedback.

it wont work, because partitions get reformated during backup to the file system on which the backup was made
but, will try that philz recovery
and for the kernel side, i am ak kernel user, so i am covered either way
 
Last edited:

Jole7

Senior Member
Dec 22, 2013
2,160
1,225
Preveza
if that works like that on philz recovery, then ok, but on twrp it wont, because in twrp partitions get reformated durring backup to the file system on which the backup was made
but, will try that philz recovery
and for the kernel side, i am ak kernel user, so i am covered either way
It will work i have done it already on many roms with Philz it won't reformat back to EXT4 and it will boot on F2FS. Soooooooo simple! OP must be updated in this thread.
Greetings!!!
 
Last edited:

ThunderThighs

Senior Member
Aug 7, 2015
305
113
It will work i have done it already on many roms with Philz it won't reformat back to EXT4 and it will boot on F2FS. Soooooooo simple! OP must be updated in this thread.
Greetings!!!

Can confirm, works perfectly as you said it would. At first I was hesitant to switch from twrp to philz, but when I did I realized how many more options it has. And a LOT better f2fs support. This little workaround made f2fs-all on 6.0 with lightning caf kernel a breeze. Thanks man! :D
 

Jole7

Senior Member
Dec 22, 2013
2,160
1,225
Preveza
Can confirm, works perfectly as you said it would. At first I was hesitant to switch from twrp to philz, but when I did I realized how many more options it has. And a LOT better f2fs support. This little workaround made f2fs-all on 6.0 with lightning caf kernel a breeze. Thanks man! :D


No problem man you're welcome have fun! ;)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    All-F2FS Partitions for Oneplus One

    I am not responsible for any damage to your phone.
    Make always a full nandroid backup.
    Read before downloading or posting in the thread.
    Proceed with caution if you have no experience.
    Again, make always a full (including /data/media) nandroid backup.



    [ What is F2FS ]
    http://www.cnx-software.com/2013/01/15/f2fs-a-new-flash-file-system-for-mobile-devices-elce-2012/
    http://www.xda-developers.com/android/f2fs-put-to-the-test-against-ext4/
    http://en.wikipedia.org/wiki/F2FS


    [ TESTED WITH ROMs ]

    CM12 nightly
    CM11 nightly
    Temasek
    Slim Saber (tested by @Setting.Out)
    CM11S stock using complete guide with ak boot.img from CM11S kernel. (tested by @Leicxan)
    Calkulin's_OPO_ROM (tested by @DarkAngel-81)
    Madhi
    Gummy (tested by @Setting.Out)
    EOS (tested by @Setting.Out)
    Slim (tested by @Setting.Out)


    For CM12 use this guide:

    F2FS for CM12.X

    (if you test other roms, please report here, so we can track working roms)

    Use these recoverys to work with F2FS partitions:
    CWM Advanced Edition - PhilZ Touch
    or
    TWRP




    this guide for All-F2FS on OPO is based on guide of ronedogg.
    Original thread: http://forum.xda-developers.com/showthread.php?t=2694201



    [ Prebuild ROM ]


    Download a F2FS ready ROM:
    CM-11-20141203-NIGHTLY-bacon-F2FS
    CM-11S-XNPH33R-bacon-signed-F2FS
    Calkulin's stock rooted XNPH33R-F2FS (thanks to @LookedPath)
    Madhi 8-30 build-F2FS (thanks to @SchmilK)
    SlimSaber-F2FS (thanks to @dexxa05)
    Droidkang-F2FS (thanks to @SchmilK)
    Carbon-F2FS (thanks to @Setting.Out)


    1. Flash Philz Recovery with F2FS support.

    WARNING make a FULL nandroid backup, and place it on external storage, also SD partition will be formatted
    2. Boot to the Philz Recovery, format /system /cache and "/data and /data/media" to F2FS
    3. Flash the downloaded modified rom, (install the gapps.zip if needed) and AK Kernel for your rom.
    4. Reboot & enjoy the new speed!


    [ Easy Way First time format in F2FS]
    [ without using a prebuild F2FS enabled rom ]

    1. Download latest CM nightly or CM11S
    2. Download:
    F2FS-ALL-CM11.zip for CM11
    F2FS-ALL-CM11S.zip for CM11S ( tanks to @Setting.Out)
    and extract boot.img and updater-script
    3. Copy the extracted boot.img in rom zipfile overwriting original one (tested with 7zip)
    4. Copy the extracted updater-script in rom zipfile overwriting original one, for cm11 is located under .\META-INF\com\google\android\.
    5. Flash Philz Recovery with F2FS support.

    WARNING make a FULL nandroid backup, and place it on external storage, also SD partition will be formatted
    6. Boot to the Philz Recovery, format /system /cache and "/data and /data/media" to F2FS
    7. Flash the modified CM nightly zipfile, the gapps.zip and AK Kernel ( for this step, i've used an OTG cable and an external hdd, because the phone now is completely empty, or use ADB sideloading)
    8. Reboot & enjoy the new speed!


    [ Easy Way Upgrading a rom with partition already on F2FS ]

    [ without using a prebuild F2FS enabled rom ]

    1. Download latest CM nightly (https://download.cyanogenmod.org/?device=bacon)
    2. Download F2FS-ALL-CM11.zip and extract boot.img and fstab.grouper
    3. Copy the extracted boot.img in the CM nightly zipfile overwriting original one
    4. Copy the extracted fstab.grouper in the CM nightly zipfile overwriting original one, located under .\META-INF\com\google\android\
    5. Flash the modified CM nightly zipfile, and AK Kernel
    6. Reboot



    [ Complete guide to manually modify the rom ]


    This is the exact procedure i've used for CM11 (OPO ready)
    to unpack/repack the boot.img i've used http://boot-repacker.blogspot.it/

    Oneplus ONE - CM Nightly with All-F2FS

    1. Download latest CM nightly
    2. Download AK kernel zipfile
    3. Open CM nightly zipfile, extract the boot.img
    4. Open AK kernel zipfile, extract the zImage and rename it boot.img-zImage
    5. Unpack the boot.img in step3
    6. Replace the boot.img-zImage in step5 with AK boot.img-zImage (step4)
    7. Replace fstab.grouper content with this one

    Code:
    # Android fstab file.
    #                                               
    # The filesystem that contains the filesystem checker binary (typically /system) cannot
    # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
    
    /dev/block/platform/msm_sdcc.1/by-name/system       /system         f2fs    ro,noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait
    /dev/block/platform/msm_sdcc.1/by-name/userdata     /data           f2fs    noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait,nonremovable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4
    /dev/block/platform/msm_sdcc.1/by-name/cache        /cache          f2fs    noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait
    /dev/block/platform/msm_sdcc.1/by-name/persist      /persist        ext4    nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,check
    /dev/block/platform/msm_sdcc.1/by-name/boot         /boot           emmc    defaults                                                        defaults
    /dev/block/platform/msm_sdcc.1/by-name/recovery     /recovery       emmc    defaults                                                        defaults
    /dev/block/platform/msm_sdcc.1/by-name/misc         /misc           emmc    defaults                                                        defaults
    /dev/block/platform/msm_sdcc.1/by-name/modem        /firmware       vfat    ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0        wait
    
    /devices/platform/xhci-hcd*                         auto            auto    defaults voldmanaged=usbdisk:auto

    8. Repack boot.img place it back in the CM nightly zipfile
    9. On the CM nightly zipfile, edit updater-script and edit these lines:

    Code:
    mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
    replace it with
    Code:
    run_program("/sbin/busybox", "mount", "/data");

    this

    Code:
    mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
    replace it with
    Code:
    run_program("/sbin/busybox", "mount", "/system");

    and these

    Code:
    format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
    mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
    replace with
    Code:
    run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
    run_program("/sbin/busybox", "mount", "/system");


    10. Save the updater-script and put it back to the zipfile. CM nightly zipfile is complete and ready for flashing.
    11. Flash Philz Recovery with F2FS support.

    WARNING make a FULL nandroid backup, and place it on external storage, also SD partition will be formatted
    12. Boot to the Philz Recovery, format /system /cache and "/data and /data/media" to F2FS
    13. Flash the modified CM nightly zipfile, the gapps.zip and AK Kernel ( for this step, i've used an OTG cable and an external hdd, because the phone now is completely empty, or use ADB sideloading)
    14. Reboot
    15. Enjoy the new speed!



    thanks to:
    @ak for the kernel
    @Phil3759 for recovery
    @ronedogg for original guide
    @katinatez & @johnnyslt for OPO F2FS enabled Philz Recovery
    5
    I built a TWRP recovery that supports F2FS. I've confirmed recovery can format and mount /cache so this should be good to go. If anyone feels daring feel free to try it.

    Note it's a public dropbox link so don't abuse it. Mirror it if a few testers can confirm this works.

    EDIT: And yes it's the same device as bacon and should pass as both find7op and bacon.

    https://dl.dropboxusercontent.com/u/31805083/twrp-2.7.1.0-find7op-UNOFFICIAL.img
    5
    Carbon F2FS

    Here's Carbon & Franco "all in one" ... no need to flash anything else but gapps and superSU

    DOWNLOAD

    *Wipe
    *Flash
    *Enjoy
    5
    This should be a working F2FS capable TWRP.

    It seems to be based off TWRP 2.8 as well.

    https://dl.dropboxusercontent.com/u/31805083/twrp-2.8.0.0-bacon-UNOFFICIAL.img

    CM11 flashed and booted fine for me.

    I haven't tested backup/restore yet. It should work fine. If you want to be safe, backup beforehand as this is mostly untested but should work.
    4
    Updated twrp 2.8.0.1 I dropped it in the unofficial twrp thread with f2fs support.

    Enjoy :D

    http://forum.xda-developers.com/showpost.php?p=55417676&postcount=63
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone