yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Original Android Development] cocchiararo:
Can you link me to the ROM you are using?
[Nexus 5 Original Android Development] milestone2mod:
http://xdaforums.com/google-nexus-5/development/rom-chroma-03-31-2015-layers-t3069105

Comes with franco kernel preinstalled, that might cause it, but I heard from others with the same setup (Chrome + CodeBlue) and it seems to work for them.
[Nexus 5 Original Android Development] cocchiararo:
i see no files touching cache/data partitions there.

As far as i can see, a sure fire way to get F2FS in /data and /cache in that rom is:

1) Flash rom + gapps (And custom stuff if needed)

2) Boot once

3) Nandroid (just in case).

4) Convert partitions and flash custom kernel

5) Reboot recovery and check F2FS remains

6) Reboot system

IF that, for some reason, fails:

1) Flash rom + gapps (And custom stuff if needed)

2) Boot once

3) Nandroid, copy files to pc, rename

4) Convert partitions

5) Reboot recovery and check F2FS remains

6) Copy files (kernel, nandroid backup)

7) Flash kernel

8) Restore nandroid

9) Reboot recovery and check F2FS remains

10) Reboot system

If any of those works, as long as you do not wipe /data, i believe you can normally update the rom.
[Nexus 5 Original Android Development] phyl65:
F2FS data partition becomes readonly

Hi,

I am now using F2FS for the data and cache partitions of my Nexus 5.

my kernel is blu_sp★rk r56

my rom is Cataclysm

Everything is OK and my Nexus 5 is snappier!

BUT, from time to time, the /data partition becomes read only... which causes the crash of lots of applications. Most of the time, this happens during the night and I notice it on the morning. This never happened when the /data partition was ext4.

What could be the cause of this problem? How to investigate it?

Thanks in advance for your help !

Phyl
[Nexus 5 Original Android Development] morfances:
[MENTION=5499742]dennes544[/MENTION] You can update the link in the OP? Thanks in advance

I would try to use the system F2FS
[Nexus 5 Original Android Development] dennes544:
Theese kernels are really old, they are for android 4.4, just download any custom kernel with f2fs support and thats it
[Nexus 5 Original Android Development] yanni18:
Hi everyone.

I want to convert my phone partitions from ext4 to f2fs. But there are some concerns that I have. I am running cm non caf 14.1 ROM,so is the cm 14.1 compatible with f2fs,if not then is the cm13 compatible with the f2fs.

Also, I have elementalx nougat v7.07 kernel running, so is it compatible with f2fs too or not.

Few more questions about f2fs :p sorry.

-Does the rom and also the kernel both must be compatible with f2fs to convert the partitions and enable f2fs?

-Which custom recovery do I need to have to convert to f2fs? Can the normal twrp for Nexus 5 is compatible or not ? (I have twrp v3.0.2 non caf recovery)

- if I succeed in getting f2fs. Then how to not lose the f2fs format from flashing new ota's of rom or any other flashing tools or dirty flashing or even flashing factory images ?

I read the benefits of f2fs so I thought of giving it a try.

Sorry, for tons of questions. Gave brief details so that I hope everyone understand questions properly and can give me help.

A big thanks in advance.
[Nexus 5 Original Android Development] phpbb3:
This information is only in my experience:

I converted from ext4 to f2fs using non-caf twrp. I clean flashed a ROM afterwards. All nightlies etc retain the filesystem you've chosen (I think twrp just automatically formats partitions to whatever the current fs is.) Your ROM and Kernel need to be compatible. I'm using elementalx 7.08 and aicp 12.1. So I know the kernel is compatible, not sure about your ROM. Should be though. Its possible that a ROM's compatibility with f2fs is only dependant on the kernel anyway, but that's only speculation on my part.
[Nexus 5 Original Android Development] yanni18:
Yes elementalx does support f2fs.

But my concern Is cm 14.1 compatible with f2fs, I didn't find out any source about the support?

Also which partitions are to be converted to f2fs (data system cache etc). For a full f2fs experience.

Could you provide step wise instructions about converting to f2fs ? (All the sources provide very different and confusing steps like flash this script for converting and convert your ROM to f2fs with the f2fs tools) :)

If a ROM and kernel are both f2fs compatible then do I have to do some extra things or just change partions in twrp and thats all ?
[Nexus 5 Original Android Development] phpbb3:
Looks like you just need a compatible kernel. To switch, I followed these directions from [MENTION=3873953]eng.stk[/MENTION]

Do not change /system.

I just saw the edit to your post. I never used any scripts or tools, I just used twrp 3.0.2 because it's already compatible. With a fresh ROM installation and compatible kernel
[Nexus 5 Original Android Development] yanni18:
Thanks

So cm14.1 ROM and its own kernel supports it?

& After the conversion. How to flash the new ROM with gapps and kernel. Do I have to factory reset after the conversion. Will it wipe my internal storage also will it remove my ROM too ? Do I have to compulsorily reinstall a fresh ROM and kernel

Beside this, how Is the aicp 12.1 rom in performance, stability and features.

Is it based on cm ROM or aosp. I am thinking of trying aicp 12.1 rom but had some questions so
[Nexus 5 Original Android Development] dennes544:
Do /system partition in f2fs or not?
[Nexus 5 Original Android Development] PhantomGamers:
Hey, sorry if this is a dumb question but am I correct in my understanding that if I apply the patch in the OP to a kernel that said kernel will only work with roms that also have F2FS support?

So if I wanted to support everything I would need two separate kernel builds?
[Nexus 5 Original Android Development] dennes544:
f2fs support fully in kernel. now with my kernels(or your with patch) you can use any aosp(based) or cm(based) rom's
[Nexus 5 Original Android Development] DforDesign:
So, any normal usage advantages? Do apps open faster or something? Worth installing at this stage?

Wysłane z mojego Nexus 5 przy użyciu Tapatalka
[Nexus 5 Original Android Development] Pretoriano80:
Hi mate, i'm not a developer but i have a fair experience testing f2fs on other devices. So this is my understanding, if i'm wrong someone please correct me:

1) First patch in the OP it's to add complete f2fs support to the kernel.

2) The patch itself won't help if you don't use this patch for the fstab - > https://github.com/dennes544/androi...mmit/a947b29ed4fead6618e358cdc0314916639fa024 < - -

3) The kernel compiled with these patches can be use with any Rom (in your case only AOSP based i guess)

Note: Due to the modified fstab this kernel will work only if the device /data partition it's f2fs formated.

So basically you need 2 versions of your kernel, one for normal EXT4 partition and one for F2FS.

Sent from my Nexus 5
[Nexus 5 Original Android Development] Enddo:
i would like to see this too. well, any bench comparisons actually
[Nexus 5 Original Android Development] dennes544:
OK. I will do it today after school
[Nexus 5 Original Android Development] memnoc:
This is getting way confusing, so I'll try to make a clear point, Op can correct me if I'm wrong:

first, we need to format the partition that will allow the f2fs, hence we need a recovery able to do that. In few words, the recovery erase the ext4 existing partition and rebuild it again this time using f2fs file system, not ext4 as any recovery.

To boot the system, which is now looking like : system ext4, cache+dalvik ext4 data f2fs we need a proper kernel+ramdisk, that's what you find in op.

To get back to normal full ext4 we need to flash back our old recovery and format the data partition so it can be restored as an ext4 partition, and flash a normal kernel, custom, stock, whatever, let's say the one we had before flashing the patched one from this op.

No special ROM

No double kernels

Am I correct??

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Original Android Development] dennes544:
Right!
[Nexus 5 Original Android Development] Pretoriano80:
1) Setting up an F2FS:

Well, for average users following the steps provided in the OP should be enough to get you a working F2FS setup.

2) Going back to EXT4 :

- Flash back an official custom recovery (CWM or TWRP)

- Format Data from recovery (this will wipe all your personal data not just apps)

- Flash a kernel compatible with your ROM (AOSP or CAF based)

- Reboot (done, you will be presented with the initial setup screen)

3) More details about F2FS

- Only Kernel and Recovery it's patched

- Ramdisk is packed with the kernel and contains the fstab.hammerhead file which also must be patched to work with F2FS

- F2FS it's used only on /Data partition (btw, Dalvik Cache is a folder on that partition) System and Cache are still EXT4

4) Installing/Updating a ROM

- ROMs don't need to be patched, you can install any ROM you want but most of them come with a kernel too, so make sure you flash a F2FS patched kernel after you update the ROM.

- If you installed a kernel and you get an encryption/password error don't format the /data partition, try flashing a "known working" F2FS kernel.

I hope that this post will help you avoid more confusion.

Sent from my Nexus 5
[Nexus 5 Original Android Development] memnoc:
I'm not confused, but you have to understand that half of what you just wrote down is beyond the average user's comprehension (take your point 3 for example), plus it's relatively useless to be aware of, unless you do wish to learn more about the whole stuff.. This is exactly the reason why I kept my post so simple. You don't need showing off big words to the average user, this is what brings confusion.

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Original Android Development] Pretoriano80:
That post wasn't meant just for you but for everyone here on XDA and imho if you come to XDA you are eager to learn new stuff or at least to understand how things works, not just flashing.

Yes, only the third point it's for advanced users, the rest it's very useful for those who decide to try F2FS and it's not covered in the OP (and imho it should).

Sent from my Nexus 5
[Nexus 5 Original Android Development] dennes544:
Thanks. I lazy to write so many words :D

I will add that to first post when I get home
[Nexus 5 Original Android Development] tsubus:
edit: nvm, i must be blind
[Nexus 5 Original Android Development] memnoc:
Just my two cents

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Original Android Development] dennes544:
Sorry, but you stupid? My commits for KERNEL! I don't patch anything in ROM!
[Nexus 5 Original Android Development] tsubus:
calm down dude, i missed one line in your post. no need to insult, we're not 12.

ps: these are all rom-side, not kernel-side.
[Nexus 5 Original Android Development] dennes544:
This is patches for ramdisk! Ramdisk is kernel-side
[Nexus 5 Original Android Development] Pretoriano80:
No mate, i could be wrong but those look like patches for the Recovery (at least 3 of them, and one of them is the fstab patch).

The OP please correct me if I'm wrong.
[Nexus 5 Original Android Development] dennes544:
OK. But recovery too not rom-side, right?
[Nexus 5 Original Android Development] tsubus:
You are correct, I meant that those pathces are not kernel-related. AOSP ROMs include the recovery, so they are patches to be included in the ROM tree (of course it's also possible to build the recovery on its own).
[Nexus 5 Original Android Development] Prezlamen:
do i have to flash all patches?
[Nexus 5 Original Android Development] dennes544:
Sorry what?
[Nexus 5 Original Android Development] Prezlamen:
i ve done all steps, and everything works. i just dont understand what to do with those 4 patch files.

thanks
[Nexus 5 Original Android Development] dennes544:
those patches for developers
[Nexus 5 Original Android Development] dennes544:
Recovery updated
[Nexus 5 Original Android Development] Malnilion:
Any major changes? Having a changelog in the first post could be helpful. Thank you for doing this, BTW.
[Nexus 5 Original Android Development] dennes544:
OK. Just busy at moment
[Nexus 5 Original Android Development] shay2911:
I tried all the steps and every time I managed to boot the system and :

each and every time I managed to install the recovery successfully, I would perform steps 3-5 correctly .

about step 6 how should I flash the kernel ? ( I tried with fastboot flash kernel but I got the error : "FAILED (remote: partition table doesn't exist)"

never the less I was managed to boot the device and get to a screen says: " Type password to decrypt storage" and I can't pass it.

I've read that this screen indicate that I need to format data partition but I did performed the Format Data .

please help me understand what am I doing wrong

I would be glad if someone could post a log of all the actions he performed or a video guide about how to do the process from start to end
[Nexus 5 Original Android Development] dennes544:
To everyone

For first time everyone who have troubles can write to my G+ hangouts.

To shay2911

Thx for idea with video! And also write to my G+ hangouts

Secret information: soon will be multirom with f2fs
[Nexus 5 Original Android Development] Technecium:
This is good stuff! I ran it for about 20 hours and was very pleased. I'm looking forward to trying it out with other than stock.

Will there be a kernel patch for aosp?

EDIT: Patch not needed. Worked it out against cm code. Too easy. Added it to franco's source code for r34. Testing that it builds correctly now. Can't wait!

koeASOP 4.4.2 w/ Franco kernel
[Nexus 5 Original Android Development] shay2911:
after some time I managed to boot right AOSP stock with f2fs file system.

General opinion- the f2fs AOSP stock is faster than regular stock on ext4 but it feels slower than ext4 cm based rom on ART runtime .

Pros and cos

Pros:

- fast file system system that has great potential

Cons:

-can't install any custom kernels

-can't change some system setting , such as : DPI and Runtime ( I was unable to put the device on ART :( )

I made comparison between the storage performance between fefs and ext4:

conclusion: this file system is great but because of her current lack of support , I would recommended to use ext4 file system as daily driver . I'm certain that with future development and optimization the device could get 10% faster or even more :)
[Nexus 5 Original Android Development] MetinKale38:
Uhm, is there really a noticeable performance Boost on the Nexus 5?

Tapatalked...
[Nexus 5 Original Android Development] dennes544:
Just try
[Nexus 5 Original Android Development] dennes544:
What's wrong with dpi and runtime? everything works perfect
[Nexus 5 Original Android Development] Technecium:
Not kernel or fs related.

Both working fine here.

koeASOP 4.4.2 w/ Franco kernel

---------- Post added at 03:03 PM ---------- Previous post was at 02:54 PM ----------

@dennes544

I don't forsee Franco kernel officially supporting f2fs so I'm in the process of adding f2fs to franco kernel r34 for personal use. I think this would be a better place than a new thread. This thread could serve for kernels that have adopted the file system.

Would you object to me posting the boot.img here?

koeASOP 4.4.2 w/ Franco kernel
[Nexus 5 Original Android Development] dennes544:
Of course you can post here you build's. I will add it to first post.
[Nexus 5 Original Android Development] Technecium:
Cool. I have a few bugs to work out so I will post it once I test a little more.

koeASOP 4.4.2 w/ Franco kernel
[Nexus 5 Original Android Development] caramba_sda:
У меня была такая же ошибка - " Type password to decrypt storage".

Я сделал так,

fastboot erase boot

fastboot erase system

fastboot erase recovery

fastboot -w

После чего, прошил сток 4.4.2 через flash-all.bat
[Nexus 5 Original Android Development] DarkFantasy6:
I dont get it.....what is the adventage to use this? :D

Gesendet von meinem Nexus 5 mit Tapatalk
[Nexus 5 Original Android Development] Technecium:
curiosity and experimentation.. and maybe performance :confused:

koeASOP 4.4.2 w/ Franco kernel
[Nexus 5 Original Android Development] Technecium:
For clearification, the kernels I maintain are not intended for day to day usage. My goal is to bring as much of Jaegeuk Kim's native linux f2fs code to the android kernel. This is a hobby. I'm just trying to do something productive while learning more.

Change Log:

- Added r47

- Clean up post

- Added r46

- Created nightlies-f2fs github branch

$ git clone -b nightlies-f2fs https://github.com/koe1974/hammerhead.git
$ make franco_f2fs_defconfig
$ make

- Added r44 with flush_merge enabled

- All data moved to github

- Created git repository koe1974 on github

- Attached patches as one tar.gz

- Merged more original source code into android port source code

- Updated to r37 including patched f2fs for debugging

- Attached patch to update f2fs with Jaegeuk Kim's dev repository commits

- Replaced patch for r35 with patch for r36

- Updated to r36

- Attached Bonnie++ benchmark results as graphs

- Attached r35 patch file to post

- Updated to with r35

- Added F2FS to r34 kernel source

- Modified fstab.hammerhead in ramdisk

Notes:

- AOSP ROM support only

- NO CM ROM support

- I don't take requests

- Thanks appreciated

Follow the directions in the OP.

( Download r47 )

( Download r46 )

( Download r44 )

( Download r38 )

( Download r37 )

( Download r36 )

( Download r35 )

( Download r34 )
[Nexus 5 Original Android Development] dennes544:
Added to first post
[Nexus 5 Original Android Development] dennes544:
-delete-
[Nexus 5 Original Android Development] bihariel:
Can this be added to multiRom recovery? if so, could you please add it?

Thank you
[Nexus 5 Original Android Development] dennes544:
Thx for question. I'm working on it now.
[Nexus 5 Original Android Development] dennes544:
lot of work with multirom done. only need create modifed multirom app(for automatic install and update)

UPD1: Multirom too support only F2FS-ed kernels
[Nexus 5 Original Android Development] dennes544:
Soon I will release F2FS multirom and.... Ubuntu touch f2fs kernel:D
[Nexus 5 Original Android Development] Enddo:
any news on benchmark scores so we can see how it compares to stock android?
[Nexus 5 Original Android Development] Technecium:
You can try this and see what the results are on ext4.

u0_a67@hammerhead:/ $ su
root@hammerhead:/ # cd /data
root@hammerhead:/data # dd bs=1024 count=1000 if=/dev/zero of=tes>
1000+0 records in
1000+0 records out
1024000 bytes transferred in 0.057 secs (17964912 bytes/sec)
24 count=2000 if=/dev/zero of=test.txt conv=fdatasync
2000+0 records in
2000+0 records out
2048000 bytes transferred in 0.105 secs (19504761 bytes/sec)
24 count=3000 if=/dev/zero of=test.txt conv=fdatasync
3000+0 records in
3000+0 records out
3072000 bytes transferred in 0.180 secs (17066666 bytes/sec)
24 count=4000 if=/dev/zero of=test.txt conv=fdatasync
4000+0 records in
4000+0 records out
4096000 bytes transferred in 0.171 secs (23953216 bytes/sec)
24 count=5000 if=/dev/zero of=test.txt conv=fdatasync
5000+0 records in
5000+0 records out
5120000 bytes transferred in 0.277 secs (18483754 bytes/sec)
24 count=6000 if=/dev/zero of=test.txt conv=fdatasync
6000+0 records in
6000+0 records out
6144000 bytes transferred in 0.252 secs (24380952 bytes/sec)
24 count=7000 if=/dev/zero of=test.txt conv=fdatasync
7000+0 records in
7000+0 records out
7168000 bytes transferred in 0.352 secs (20363636 bytes/sec)
24 count=8000 if=/dev/zero of=test.txt conv=fdatasync
8000+0 records in
8000+0 records out
8192000 bytes transferred in 0.327 secs (25051987 bytes/sec)
24 count=9000 if=/dev/zero of=test.txt conv=fdatasync
9000+0 records in
9000+0 records out
9216000 bytes transferred in 0.425 secs (21684705 bytes/sec)
24 count=10000 if=/dev/zero of=test.txt conv=fdatasync
10000+0 records in
10000+0 records out
10240000 bytes transferred in 0.458 secs (22358078 bytes/sec)
root@hammerhead:/data #

koeASOP 4.4.2 w/ Franco kernel + F2FS
[Nexus 5 Original Android Development] Enddo:
syntax error newline unexpected message with the last command(dd bs=1024 count=1000 if=/dev/zero of=tes>). maybe i need busy box or something?
[Nexus 5 Original Android Development] dennes544:
dd bs=1024 count=1000 if=/dev/zero of=test.txt conv=fdatasync

that's right
[Nexus 5 Original Android Development] dennes544:
Repeat this command and every time count +1000

dd bs=1024 count=1000 if=/dev/zero of=test.txt conv=fdatasync
dd bs=1024 count=2000 if=/dev/zero of=test.txt conv=fdatasync
etc..
[Nexus 5 Original Android Development] Enddo:
tada
[Nexus 5 Original Android Development] momomok:
Really tempted to try

Is it possible to backup /data using normal TWRP, then format /data as F2FS using the special TWRP that OP posts, then restore the backup using TWRP?

Will that reformat /data to ext4?
[Nexus 5 Original Android Development] dennes544:
I'm absolutely no idea, but i will check it as soon as posible
[Nexus 5 Original Android Development] slater_g:
Wait a sec... these results are better than the ones from koe1974 on the last page. If I am not mistaken that makes EXT4 (tested by Enddo) faster?
[Nexus 5 Original Android Development] Technecium:
It would be nice to see a more controlled benchmark as comparing my results against Enddo's is like comparing the same running shoes on two different people to decide which shoe allows you to run faster.

I don't think f2fs has been proven to be better than ext4. The benchmarks done on the raspberry pie show f2fs performs better in some situations.

To really find out if f2fs is beneficial on the n5 you'd have to check both read and write functions, along with different block sizes using the same device and IO scheduler.

Anyone know if Bonnie++ is available for Android? Actually it is... http://xdaforums.com/showthread.php?t=1169910

koeASOP 4.4.2 w/ Franco kernel
[Nexus 5 Original Android Development] Enddo:
what IO scheduler did you have set when you ran your previous test? im not sure if it made a difference, but im using deadline since it comes default with franco kernel

i did recently setup f2fs on my 2012 nexus 7 and can tell see an improvement instantly
[Nexus 5 Original Android Development] Luigi_2:
Franco 35 is up, someone pls compile it :D
[Nexus 5 Original Android Development] Technecium:
I was also on deadline. Yes, actually f2fs for the n7 is featured on xda portal today.

koeASOP 4.4.2 w/ Franco kernel
[Nexus 5 Original Android Development] mchj:
Delete plz
[Nexus 5 Original Android Development] Technecium:
Here is some testing I did with Bonnie++ The data was collected as fairly and unbiased as possible.

Attached files:

- notes.txt (Flashing and Testing procedures)

- bonnie_ext4.txt (Results of running bonnie 5 times on ext4 file system)

- bonnie_f2fs.txt (Results of running bonnie 5 times on f2fs file system)

This is not your typical Android benchmark application results so there is no 'one number' result, no bar graphs, etc.You need to read this README if you plan to make sense the data from the tests.

One last note. I am completely neutral regarding ext4 vs f2fs. These are the results I got. I did this in my spare time so others have something to go by. I encouraged others to do their own testing and post the results.
[Nexus 5 Original Android Development] Luigi_2:
http://www.xda-developers.com/android/speed-up-your-aging-nexus-7-2012s-storage-with-f2fs/

As seen in above article, the system partition is f2fs-formatted, can we have it :D?
[Nexus 5 Original Android Development] slater_g:
Where is the system partition F2FS? Reading the linked thread about N7'12, it clearly says to format data, not system.
[Nexus 5 Original Android Development] Luigi_2:
click the picture and see.
[Nexus 5 Original Android Development] slater_g:
Ah, my bad. :good:
[Nexus 5 Original Android Development] Enddo:
if you read the thread the OP talks about how it's essentially useless to format /system. continues by saying the moto g only has the /data partition formatted for f2fs, so he thinks it's good enough that way