Everything about F2FS for our device (Recoveries, patches, info,...)

Search This thread

laufersteppenwolf

Inactive Recognized Developer / Retired Forum Mod
Jul 1, 2012
2,840
6,964
Baden-Württemberg
droideveloper.com
Alright guys, as most of you most likely already noticed, we are preparing our device to run completely on F2FS. This task, however, needs some information and tools, which I will try to provide in this thread. It is WIP, so don't expect too much yet :p

First of all, we need a F2FS capable recovery. I have compiled both, CWM and TWRP, but CWM seems to have some issues, so please use TWRP for now ;)

The only ROM running on F2FS for now is our unofficial CM11, but I will update the following list as soon as I get to know about another ROM


  • Unofficial CM11

To install a F2FS ROM coming from an ext4 filesystem (default), you have to do the following steps:
0) make backups (including titanium backup)
1) flash the F2FS TWRP recovery image
2) manually format /system /data and /cache to F2FS (WARNING: internal sdcard will be wiped as well)
3) flash the F2FS ROM
4) flash GAPPS
5) boot

Regarding custom kernels, if you don't use the default kernel, please don't make bug reports. If we know that the ROM and kernel are working properly, then we can go on. But for now, if you run into problems using a custom kernel, please keep it to yourself.

I assume you will want to restore your data after formatting to F2FS, but keep in mind that if you restore your /data partition via recovery, the old filesystem will be restored as well (ext4). This means, you cannot restore your old backup via recovery. However, if you have a Titanium Backup backup, you sure can restore this.



ROM devs
In order to compile a flashable zip, the updater-script has to be altered. But don't worry, you don't have to do this manually :D I edited the script creating the updater-script and made a patch, which can be found in the 2nd post ;)

XDA:DevDB Information
F2FS related tools/info/..., Tool/Utility for the LG Optimus 4X HD

Contributors
laufersteppenwolf

Version Information
Status: Stable

Created 2014-06-29
Last Updated 2014-06-30
 

laufersteppenwolf

Inactive Recognized Developer / Retired Forum Mod
Jul 1, 2012
2,840
6,964
Baden-Württemberg
droideveloper.com
Reserved

Updater-script patch:

The patch in the attachment patches the updater-script (generator) to be compatible with F2FS partitions (proper mounting and formatting).

Save it inside the build dir, then open a shell and cd to the correct path. Now run "git apply <patchname>.patch" and you're good to go ;)

Example:
Code:
cd /path/to/ROM_sources/CM11/build
git apply F2FS_updater-script.patch
cd ..
 

Attachments

  • F2FS_updater-script.patch
    1.6 KB · Views: 372
Last edited:

peppethustra

Senior Member
Nov 16, 2012
557
342
Catanzaro
@laufersteppenwolf Ok, I'm a bit confused: according to what I'm reading here, and on your unofficial CM11 thread, I assume that /system should be formatted with F2FS using the new twrp recovery you uploaded..but reading what @Demetris and @iodak are saying on iodak kernel's thread, it seems like only /data and /cache partitions will be turned to F2FS, while /system will stay on ext4..the same has been said by @Demetris in the official CM11 thread..so, my question is: are you thinking to try developing in different ways? Just to understand where you are pointing to, and to acquire a clear knowledge about the status of your work :) Thank you guys!

Sent from my LG-P880 - Beanstalk 4.4.4 - Iodak 9.95 kernel - using XDA Premium 4 mobile app
 
Last edited:
  • Like
Reactions: guckyck

laufersteppenwolf

Inactive Recognized Developer / Retired Forum Mod
Jul 1, 2012
2,840
6,964
Baden-Württemberg
droideveloper.com
@laufersteppenwolf Ok, I'm a bit confused: according to what I'm reading here, and on your unofficial CM11 thread, I assume that /system should be formatted with F2FS using the new twrp recovery you uploaded..but reading what @Demetris and @iodak are saying on iodak kernel's thread, it seems like only /data and /cache partitions will be turned to F2FS, while /system will stay on ext4..the same has been said by @Demetris in the official CM11 thread..so, my question is: are you thinking to try developing in different ways? Just to understand where you are pointing to, and to acquire a clear knowledge about the status of your work :) Thank you guys!

Sent from my LG-P880 - Beanstalk 4.4.4 - Iodak 9.95 kernel - using XDA Premium 4 mobile app

I didn't follow iodak's kernel thread, and lately neither the official CM thread, which is why I can't say anything about those discussions. However, all the above info is still correct, as the /system partition still has to be F2FS (you can take a look into our fstab), at least up til now.

And no, I will not go a different was, as my main goal is to keep our device as unified as possible (hence also all various ROM sources on our p880-dev github for slim, gummy,...). All this F2FS stuff is still in a pretty early stage, which is why there can always be changes.
 
Last edited:
  • Like
Reactions: peppethustra

peppethustra

Senior Member
Nov 16, 2012
557
342
Catanzaro
I didn't follow iodak's kernel thread, and lately neither the official CM thread, which is why I can't say anything about those discussions. However, all the above info is still correct, as the /system partition still has to be F2FS (you can take a look into our fstab), at least up til now.

And no, I will not go a different was, as my main goal is to keep our device as unified as possible (hence also all various ROM sources on our p880-dev github for slim, gummy,...). All this F2FS stuff is still in a pretty early stage, which is why there can always be changes.

Mmm, yes, it's clear, reading fstab..thank you. The strange thing which took me asking for that question was the discussion between Demetris and iodak in iodak kernel's thread (about using f2fs only for /cache and /data) Anyway, you are the devs, so let's wait :)

Sent from my LG-P880 - Beanstalk 4.4.4 - Iodak 9.95 kernel - using XDA Premium 4 mobile app
 

Demetris

Recognized Developer
Aug 15, 2008
3,096
9,471
47
Limassol
Alright ROM devs, just uploaded the patch to the 2nd post with some quick instructions, but I assume you know how to apply it ;)

What is a patch? Can i use a brush to apply it? :silly:
Can you make a cwm flashable zip for us? :silly:
Btw because i have a screen protector this can be applied over it or i need to remove it?
 
Last edited:

laufersteppenwolf

Inactive Recognized Developer / Retired Forum Mod
Jul 1, 2012
2,840
6,964
Baden-Württemberg
droideveloper.com
What is a patch? Can i use a brush to apply it? :silly:
You sure can try to use a brush ;) :p

Can you make a cwm flashable zip for us? :silly:
Yeah, sure, no problem, but first you need to provide me a CWM for my and your PC :p :D

Btw because i have a screen protector this can be applied over it or i need to remove it?
I'm sorry, but you need to remove your screen protector, your back and your battery in order to apply it... :p
 
Last edited:

baxtex

Senior Member
Oct 16, 2011
1,107
116
Updater-script patch:

The patch in the attachment patches the updater-script (generator) to be compatible with F2FS partitions (proper mounting and formatting).

Save it inside the build dir, then open a shell and cd to the correct path. Now run "git apply <patchname>.patch" and you're good to go ;)

Example:
Code:
cd /path/to/ROM_sources/CM11/build
git apply F2FS_updater-script.patch
cd ..


Got any guide on doing this, can't seem to find any.
 

laufersteppenwolf

Inactive Recognized Developer / Retired Forum Mod
Jul 1, 2012
2,840
6,964
Baden-Württemberg
droideveloper.com
Got any guide on doing this, can't seem to find any.

Well, TBH, I don't know how else to describe :eek: :D

as anothe example, let's say we want to compile CM11, and all sources are in ~/CM11 (you ran the repo init command in ~/CM11)

DL the patch and save it under ~/CM11/build, named F2FS_updater-script.patch
then run the following commands in your terminal:
Code:
cd ~/CM11/build
git apply F2FS_updater-script.patch

then you can compile the ROM as usual, but make sure to run repo sync before applying the patch ;)
 

bjpafa

Senior Member
Aug 29, 2011
54
4
Porto
What is a patch? Can i use a brush to apply it? :silly:
Can you make a cwm flashable zip for us? :silly:
Btw because i have a screen protector this can be applied over it or i need to remove it?
Hi Revered Developer:

Two questions into one: Is it really worth formating F2Fs, which seems to be yes with a lot of buts, and should we choose Art selected runtime. The ART problem is theoretically ok, better than Dalvik, pratically every time I turn Art on, benchmarks ans subjective feeling od the device got worst: Nexus7Flo and t0lte Note II. We need Xposed installer and surround environment...

http://www.xda-developers.com/search/Art+compilers
 

sprite048

Senior Member
Aug 6, 2013
123
18
using twrp where can i find the option to format /data and /cache to f2fs?

edit: found it, under andvanced wipe
 
Last edited:

Rafostar

Senior Member
Jun 27, 2014
66
27
Roms with data and cache f2fs while system ext4

If I have non all-f2fs rom. Can I install it with only data and cache f2fs :confused:
Because CM11 is all-f2fs and other roms are not, but @iodak released kernel that is compatible with different f2fs and ext4 combinations.
So what roms I can install with data and cache f2f2 while system is ext4 :confused:
I'm really confused with this :silly: :p :silly:
 

masmoe

Senior Member
May 31, 2013
258
55
Jakarta
Redmi 9 Power
Hey want to ask... I don't have external SD, so if I format to F2FS my internal memory will be wiped right? So, must I push ROM zip to internal memory through ADB to install ROM? or there is any other method?

Thanks.
 

Optimissimus99

Senior Member
Feb 21, 2014
362
122
Just for Information: Carbon Rom from animus7 also uses F2FS. And sadly the TWRP is very Buggy for me. I wipe dalvik and it wipe WHOLE /DATA (including /data/media) :(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    Alright guys, as most of you most likely already noticed, we are preparing our device to run completely on F2FS. This task, however, needs some information and tools, which I will try to provide in this thread. It is WIP, so don't expect too much yet :p

    First of all, we need a F2FS capable recovery. I have compiled both, CWM and TWRP, but CWM seems to have some issues, so please use TWRP for now ;)

    The only ROM running on F2FS for now is our unofficial CM11, but I will update the following list as soon as I get to know about another ROM


    • Unofficial CM11

    To install a F2FS ROM coming from an ext4 filesystem (default), you have to do the following steps:
    0) make backups (including titanium backup)
    1) flash the F2FS TWRP recovery image
    2) manually format /system /data and /cache to F2FS (WARNING: internal sdcard will be wiped as well)
    3) flash the F2FS ROM
    4) flash GAPPS
    5) boot

    Regarding custom kernels, if you don't use the default kernel, please don't make bug reports. If we know that the ROM and kernel are working properly, then we can go on. But for now, if you run into problems using a custom kernel, please keep it to yourself.

    I assume you will want to restore your data after formatting to F2FS, but keep in mind that if you restore your /data partition via recovery, the old filesystem will be restored as well (ext4). This means, you cannot restore your old backup via recovery. However, if you have a Titanium Backup backup, you sure can restore this.



    ROM devs
    In order to compile a flashable zip, the updater-script has to be altered. But don't worry, you don't have to do this manually :D I edited the script creating the updater-script and made a patch, which can be found in the 2nd post ;)

    XDA:DevDB Information
    F2FS related tools/info/..., Tool/Utility for the LG Optimus 4X HD

    Contributors
    laufersteppenwolf

    Version Information
    Status: Stable

    Created 2014-06-29
    Last Updated 2014-06-30
    7
    Reserved

    Updater-script patch:

    The patch in the attachment patches the updater-script (generator) to be compatible with F2FS partitions (proper mounting and formatting).

    Save it inside the build dir, then open a shell and cd to the correct path. Now run "git apply <patchname>.patch" and you're good to go ;)

    Example:
    Code:
    cd /path/to/ROM_sources/CM11/build
    git apply F2FS_updater-script.patch
    cd ..
    6
    Thx again for all your works !
    I can see recent moves on github : android_device_lge_p880/mr_init_devices.c +/recovery ..
    Does it mean, we can build a twrp with multirom & f2fs compatible with MM ( or even N) for primary rom?

    Without your "compressed" magic twrp 2.8.6 multirom, I wouldn't have been able to build & test anything; I have an aosp7 ak kexeced kernel compatible with my cm12, and now I'm looking toward cm14/tree with awesome csk1jw' 100% generic kernel (~cm12+motorola/nougat upgrades). Unfortunately, I'm very new to tree stuff. Apparently google's move to jack & ninja don't change cm build behaviour (?). Also I don't get @alfsamsung changes on cm13/frameworks/av (with his uber euphoria kernel) and I have a broken CMmusic in my cm13 build.
    I'm pretty sure that cm14 with jit/aot on board and csk1jw regular kernel could be the more frugal CM ever seen on p880 (with 2 more years of monthly up-to-date cve bonus from Cyanogen).
    Of course, your help will be greatly appreciated.

    Nice to hear, that you like my work. Well the thing is, i'll get a new PC for christmas and i'll surely try to help you, cause i have more time lately, but keep in mind this isnt my main device anymore and i dont really have any benfit from building roms for it, but i'll surley will give it a try. The other thing is, i'm not sure wether i can test anything, cause my device doesnt seem to work anymore, but for that, i'll upload my stuff and you guys could try out.

    Stay focused and wait to hear from me.
    @oF2pks If you have any further question, pls hit me up via PM!
    5
    Every normal rom (ext4) can be installed with data or/and cache on f2fs. And you able to update or change rom without problems.