yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Original Android Development] drac0:
Yes performance boost is imminent and visible among everyday usage. Its been around a week or so since I'm with F2FS on both data/cache and its just beautiful using the device like that, I would recommend everyone to switch to F2FS to test and see the difference, also happy if I can help anyone do it by them selves, its not that hard to edit ramdisks.

Regarding /system I will test that one too, only now I'm using stock 5.0.1 but after a few more days I will switch to one of AOSP ROMs for full and make it F2FS-ALL just for the sake of testing and to see the real difference if any, and will report back. I've heard of system hiccups, lags and reboots if one is using F2FS with /system partition so we'll see. But then again looking from benchmarking or even tech perspective, having /system on F2FS its almost same as having it on EXT4 if not the same, since its only RO and not RW where actually F2FS beats EXT4 fs. Mabye like Kim said, if nothing its tech designed specialy for eMMC and will make it perform "better" and "longer" with less wear and tear. So yeah lets hope F2FS gets more attention cos it working perfectly. Cheers all! :good:
[Nexus 5 Original Android Development] nirmalsudharjanan:
i converted cataclysm 5.0.1 using F2FS tool and then flashed it along with kernel ,everything was ok and

it booted without any problem,now if i like to upgrade to 5.0.2 do i need to convert the nightly zip using F2FS converter and then flash it

or just simply flash it in recovery .
[Nexus 5 Original Android Development] drac0:
Haven't tried Cataclysm but I believe you can just flash the nightly, then reflash your F2FS kernel. If your kernel ramdisk is F2FS modified, it will see your already formatted F2FS partitions and boot just fine. Its the kernel that mounts your F2FS partitions.

But if it fails, then you may need to modify your updater-script as well, or convert your ROM, cos it might try to install by mounting EXT4 instead of F2FS, so yes you should convert your nightly zip again and reflash your kernel. Read the last 2-3 pages its all very well explained. Cheers!
[Nexus 5 Original Android Development] cocchiararo:
I tried the trick to rename the backup files, but that does not change the filesystem for me, it just tells me that the backup is made in for a different FS and that it might not work.

So i flashed your dummy (after changing the flash script, cause it checked for HAMMERHEAD), and then elementalx 3.05.

I then formated, and restored the renamed nandroid.

Now i am left in the google screen.

System is ext4, cache and data are F2FS.
[Nexus 5 Original Android Development] aR_ChRiS:
Is there a way I can modify a kernel (eg. Franco kernel) so that it can be f2fs compatible?
[Nexus 5 Original Android Development] dechronic:
The F2FS feature is built within the kernel. So in order to add it to a kernel you would have to build your own version of the kernel with the f2fs commits added in. However, a few kernels have the f2fs feature already such as Franco's. All that is needed is to modify the ramdisk which stipulates how the various partitions are mounted which is what I do.

If you are looking specifically for f2fs in Franco's kernel, search his thread as I posted links with various f2fs configurations of r69 kernel which already has f2fs support.
[Nexus 5 Original Android Development] cocchiararo:
Any idea why my FLO with /data and /cache formated to f2fs, your dummy ramdisk for the n5 and the latest elementalX remains in the google screen?

According to your troubleshooting that happens if system is set to f2fs and the ramdisk has no support, but system is ext4

Nexus 5 - Tapatalk
[Nexus 5 Original Android Development] aR_ChRiS:
Forgive me for being a noob, but I've tried your method through Android Image tools and tried to edit the fstab file but still kernel won't boot at all (stuck at Google Logo/bootloader).
[Nexus 5 Original Android Development] cocchiararo:
Ok...

I either understand incorrectly (which seems reasonable, flashing a boot.img, dummy or not, for the nexus 5 on the nexus 7 seems wrong), or you missed something, but using the dummy on the nexus 7 does not work.

I went to get the windows image kitchen, but i get "magic boot not found, error".

I give up for now.

EDIT:

OK, i lied, i can never give up it seems.

I kept trying and eventually, the boot.img was unpacked. I modified the fstab file, and repacked, flashed, flashed elementalX, and not it boots.

But i have the same issue another guy in the elementalx thread has, my tablet thinks it is encrypted.
[Nexus 5 Original Android Development] dechronic:
Sorry I was very these past few days with work and changing an engine mount on my car today.

I am glad you got that far. The encryption error is because it is not mourning the data partition correctly. Check that your file system matches your fstab for the /data partition.
[Nexus 5 Original Android Development] cocchiararo:
No problem, i love learning these things xD

I copied your line for data and cache from this thread in previous posts.

Partitions are in f2fs and I believe that you provided the correct info for f2fs.

Another guy that flashed a dummy boot.IMG that you provided (he said) for the nexus 7, has the same issue.

Nexus 5 - Tapatalk
[Nexus 5 Original Android Development] dechronic:
OK let me check something in a few moments. Just got home.
[Nexus 5 Original Android Development] cocchiararo:
Take your time, I am not home and will not be there till way later or tomorrow

Nexus 5 - Tapatalk
[Nexus 5 Original Android Development] cocchiararo:
I double checked and i had copied the right lines.

Just to be sure, i did it again.

Still, all is fine in TWRP, but after it boots it asks for the encryption password.

Will have to wait now.
[Nexus 5 Original Android Development] dechronic:
Dummy Boot Files for Elemental X or Uber for Nexus 5 or Nexus 7 2013

The difference with these dummy boot files over the previous ones is that it has the ramdisk lines for BOTH ext4 and f2fs which will boot your phone no matter which partition is ext4 or f2fs.

This is thanks to [MENTION=5105835]Cl3Kener[/MENTION], the creater of UBER kernel and the Optipop ROM. [MENTION=5105835]Cl3Kener[/MENTION] used both ext4 and f2fs lines in his kernel for the ROM. I should have probably considered the possibility but he already has, so all credits to him.

I have also tested it on my Nexus 5 and it functions properly.

NOTE: These are only dummy kernel files with the ramdisk modified to be used by kernels such as ElementalX & UBER. They are based on the 5.0.1 kernels that are provided with the stock factory images. On their own, they should boot if all of the partitions are ext4 but will NOT boot any f2fs partitions unless you flashed ElementalX or UBER over it.

PROCEDURE: For use with ElementalX or UBER kernel.

1. Download and install the flashable zip for your device via a custom recovery.

2. Flash a kernel of your choice that uses the ramdisk of the previous kernel, like ElementalX & UBER.

Download for Nexus 5 dummy kernel for ext4/f2fs partitions

http://d-h.st/H5d

Download for Nexus 7 2013 dummy kernel for ext4/f2fs partitions

http://d-h.st/fpy

EDIT: Changed Nexus 7 download link, previous uploader-script assert was set to hammerhead instead of flo.

There is a problem when the dummy files boot in that they cause the Android OS to covert the /cache and sometimes /data partitions back to ext4 although it was f2fs.
[Nexus 5 Original Android Development] cocchiararo:
The new zip failes to flash, but after putting it in the old zip, it flashed, booting took a long time (might have cicled the google screen twice), but it now works!
[Nexus 5 Original Android Development] dechronic:
My bad on the Nexus 7 file. I had the assert still set to hammerhead, changed it to flo. Can you test the file again from the new download link in the same post to see if it installs?

Thanks in advance.
[Nexus 5 Original Android Development] cdonald:
Boots, but my N7 then thinks its encrypted and prompts for a pw

Sent from my Nexus 5
[Nexus 5 Original Android Development] cocchiararo:
I left home now, but your new boot image on my zip works. Will test (way) later.

Nexus 5 - Tapatalk
[Nexus 5 Original Android Development] dechronic:
That is not supposed to happen.

That happens when the /data parition is not mounted correctly. The ramdisk is set to work with both ext4 and f2fs. I will check around and see if my ramdisk entries are different from other kernels that are f2fs enabled.
[Nexus 5 Original Android Development] cdonald:
Thanks for your efforts. For the N7, the only kernel I know that is F2FS enabled is Glitch. Have never had an issue with it running smoothly on F2FS, but I'd love to get a dummy one working so I can use ElementalX

*it seems when I flash your file my cache/data go back to ext4 for some reason

Sent from my Nexus 5
[Nexus 5 Original Android Development] dechronic:
It shouldn't. The zip just installs the kernel. It doesn't change partition formats

---------- Post added at 05:09 PM ---------- Previous post was at 04:55 PM ----------

Thanks I have confirmed the issue. I will edit the post. There is definitely a problem. I found my /cache partition was ext4. Changed it to f2fs then on reboot, the phone reboots and it is changed back to ext4. So it seems that modification does not work the way I thought it would.
[Nexus 5 Original Android Development] notbrodie:
[MENTION=5594433]dechronic[/MENTION]

w/r/t the nexus 7 2013: you might could take a look at how glitch kernel works with f2fs. i just flashed it and it works like a champ.
[Nexus 5 Original Android Development] dechronic:
Nexus 7 2013 (flo) dummy kernels for f2fs for ElementalX or UBER

There are three dummy files with the ramdisk modified for use with ElementalX and UBER for the Nexus 7 2013 (flo).

Using the LRX22C (5.0.1) stock kernel as the base.

PROCEDURE:

1. Format your partitions to f2fs that you want to use (data & cache are recommended.)

NOTE: Formatting the /data partition will cause you to lose all of your user apps, settings and /sdcard files.

2. Flash the dummy file according to what you have formatted as f2fs.

3. Flash your kernel of choice that uses the ramdisk such as ElementalX or UBER.

F2FS for /data partition only

http://d-h.st/FuW

F2FS for /data & /cache partitions

http://d-h.st/HopL

F2FS for /system, /data & /cache partitions

http://d-h.st/KMZ

---------- Post added at 08:11 PM ---------- Previous post was at 08:06 PM ----------

Thanks. That is good for others to know.

ElementalX and UBER work as well but require a previous kernel that has f2fs lines in the ramdisk which could be problematic coming from a different custom kernel. The reason I provided the dummy stock files for those that need it.
[Nexus 5 Original Android Development] notbrodie:
just tried this with elementalx kernel. same problem. boots up and thinks it's encrypted. i dirty flashed my rom, then flashed the data+cache dummy, then flashed elex.
[Nexus 5 Original Android Development] cocchiararo:
Back to square 2.

I flashed your boot.img and then elementalx.

Changed partitions to F2FS, rebooted, it now asks for decrypt password again.
[Nexus 5 Original Android Development] dechronic:
which partitions are you changing to f2fs and which boot.img are you using.

After booting the first time, reboot into recovery and run this adb command via a pc and tell me the result:

adb shell "mount|grep f2fs|grep -oe /userdata -oe /system -oe /cache"/

or

from a terminal run:

mount|grep f2fs|grep -oe /data -oe /system -oe /cache
[Nexus 5 Original Android Development] cocchiararo:
flo_dummy_boot_f2fs_cache+data
[Nexus 5 Original Android Development] dechronic:
I have tried to read up everything I can for the Nexus 7 2013 but I can't see why it isn't mounting the /data partition. If it was the Nexus 7 2012 (grouper) I could understand.

By all accounts it should mount it correctly,
[Nexus 5 Original Android Development] cocchiararo:
Ok then.

Will try that other kernel that was mentioned, and if it works, i will inspect their boot.img.

Have you tested it with the current elementalX? (i was under the impression that you were using it on the n7 2013)
[Nexus 5 Original Android Development] dechronic:
I have a Nexus 5 and a Nexus 7 2012 which uses a tegra3 chip. Both I have running with f2fs. The Nexus 7 2013 uses a Qualcomm chip just like the Nexus 5 and therefore uses the same ramdisk entries. So in short, no I don't have one but it should work.
[Nexus 5 Original Android Development] cocchiararo:
I see.

Maybe it is an elementalX limitation?

Glitch kernel (which uses its own ramdisk) works, and the fstab line is the same you told me to use.
[Nexus 5 Original Android Development] dechronic:
I am starting to think so, although it says in the OP that it was supported since version 2.7
[Nexus 5 Original Android Development] drac0:
Why dont you guys just try with another kernel, modified Franco or Code_Blue or whatever, just to isolate the problem. :p
[Nexus 5 Original Android Development] airon11:
I have a n7 2013 (Flo) with KitKat purity installed.I extracted the purity kernel and modified by myself the ramdisk and then flashed my modified on device and then elementalx kernel over it.I just modified the cache line in fstab and made parameters like the n5 dummy kernel...

The device then stays in boot logo forever...

If I flash only.mod kernel (with no f2fs support) it doesn't reach even bootlogo...so I think the problem may really be elementalx .quite strange since in n5 I use without problems elementalx...
[Nexus 5 Original Android Development] cocchiararo:
as i said, i flashed GLITCH kernel on my n7 with f2fs in both /data and /cache and it is working fine.
[Nexus 5 Original Android Development] airon11:
What happens if you flash elementalx kernel over working glitch? Since elemental uses installed ramdisk and modify it if the problem we have is the ramdisk should work,..if not working it is possible that the problem is in f2fs support for elementalx...quite strange since elementalx has working f2fs in n5..
[Nexus 5 Original Android Development] dechronic:
Good idea. You can try that and see how it goes.
[Nexus 5 Original Android Development] Tanged:
Has anyone found a fix for the cache reverting back to ext4 after changing it to f2fs?
[Nexus 5 Original Android Development] drac0:
Have you tried everything we talked about it here, backing up and renaming backup name, wiping /cache partition, formatting partition into f2fs, checking once again is it really formatted to f2fs, and only then restoring backup as f2fs? Also using dummy kernel + your desired kernel or using only your ramdisk modified kernel after all that? Still going back to ext4?
[Nexus 5 Original Android Development] Tanged:
Thanks for your help, but it sticks on f2fs now, don't know how but randomly did ?
[Nexus 5 Original Android Development] drac0:
Great, glad you got it working in the end, now go enjoy F2FS! Cheers! :good:
[Nexus 5 Original Android Development] Wakamatsu:
As a practice, I don't bother backing up my cache. It makes sense when you do a file system conversion. Let the cache rebuild itself and save yourself one thing to worry about.
[Nexus 5 Original Android Development] cdonald:
Has anyone given this a go yet? If not, then I might try it tonight to see what happens

Just installed ElementalX over a sabermod feanco for flo that had F2FS support and everything booted and is working fine. Very interesting

Sent from my Nexus 5
[Nexus 5 Original Android Development] notbrodie:
it didn't work for me. elementalx bootlooped. i had to reflash glitch to get it working again. not sure what elementalx is missing, but glitch works fine with f2fs. i'll probably stick with it unless i see a f2fs commit with elex
[Nexus 5 Original Android Development] cocchiararo:
i did not bother trying that cause i was 99% sure a kernel with its own ramdisk would not play nice with elementalx on top.

Glitch it is for the nexus 7 2013.

Now i want to convert NXE7.2.4 to have my system partition in f2fs in my nexus 5 too xD
[Nexus 5 Original Android Development] cdonald:
Yeah, although it worked for me, I have the same concerns as you. Glitch has been working well!

Sent from my Nexus 5
[Nexus 5 Original Android Development] halfbytecode:
I'm wondering why the system partition formatted to F2FS, on lollipop, does not apparently work with selinux set to enforcing. It does not really make sense to me, and moreover it used to work on kitkat. Anybody know what's going on here?
[Nexus 5 Original Android Development] cocchiararo:
Frak...

NXE rom has a weird (for me at least) installation method.

The .zip has a system.new.dat file and a /system folder with scripts that are invoked from other scripts in the zip that "restore" the .dat.

This is preventing me from setting /system as F2FS because the restore sets the partition back to EXT4.

If anyone knows how to fix this...

Maybe make a nandroid of the system partition, rename it, convert to F2FS and restore?
[Nexus 5 Original Android Development] drac0:
Exactly that, try it! :good:
[Nexus 5 Original Android Development] cocchiararo:
Failure.

I either botched the boot.IMG modification, using elementalx express (forgot to get the normal one), or something else left me on the google logo screen (thus happens if the ramdisk has the wrong setting for /system or the kernel does not support it, supposedly)
[Nexus 5 Original Android Development] cocchiararo:
any recomendastion for a kernel wich has a boot.img included and supports F2FS?

I want to rule out elementalX having issues.

I added the line [MENTION=5594433]dechronic[/MENTION] provided to the boot.img from my rom (same boot.img i modified to get /data and /cache support), and it is not working, so i guess...
[Nexus 5 Original Android Development] drac0:
Havent tried EX so I cant say with certainty, could be its using updater-script to point to EXT4 instead of F2FS so it cant boot. With some of those I've tried with N5 among others Franco was working without any problem only modifying ramdisk, and Code_Blue already has it modified. If none of above mentioned works, it seems I cant help too much on this one and the problem stays with EX. Maybe you guys ask dev about it to include F2FS in his kernel like Code_Blue has done it, that would solve many problems. Cheers!
[Nexus 5 Original Android Development] cocchiararo:
i either botched the ramdisk modification (not probable) or elementalx has issues with f2fs-all, cause racer kernel works.

I checked the scriopt, it uses busybox for mounting.
[Nexus 5 Original Android Development] shevich:
what is the procedure when updating roms on all-f2fs? i heard it is a bit trickier than just wiping dalvik and cache
[Nexus 5 Original Android Development] dechronic:
I use ElementalX with F2FS. However, it doesn't need any modification for it to work as it uses the ramdisk of the currently installed kernel to make the ramdisk. So there are two suggested ways to approach make EX work with F2FS.

1. Backup the kernel (boot.img) of the ROM you are using and modify it for F2FS-all, flash it and then without rebooting, flash ElementalX.

OR

2. Flash one of the dummy f2fs files I have linked or attached in this thread and then flash ElementalX.

NOTE: If a previous custom kernel was installed, most, if not all custom kernel developers, highly recommend that the ROM you are using be re-flashed before installing their custom kernel.

So if you are going to use 1. Then re-flash the ROM, extract the boot.img from the zip, modify the ramdisk with f2fs entries, flash it and then immediately flash ElementalX.

Some custom kernels, may have a version with the ramdisk entries already in place.
[Nexus 5 Original Android Development] cocchiararo:
in my n5, with NXE rom, elementalX failed to work with the same boot.img that racer kernel did work with F2FS-all.

I modified that boot.img, no previous kernel flashed.
[Nexus 5 Original Android Development] dechronic:
I will look for that ROM and try it this evening and see what result I get.

---------- Post added at 06:26 AM ---------- Previous post was at 06:21 AM ----------

PS. Where can I download the NXE ROM from?
[Nexus 5 Original Android Development] cocchiararo:
development seems stagnant now

https://nxrom.us/

i did not flash their custom kernel, just rom + gapps
[Nexus 5 Original Android Development] dechronic:
Thanks, I downloaded it.

I will look at it later today. It is 7am here so it will be about 12 or so hours from now as I use my N5 as my daily driver.
[Nexus 5 Original Android Development] drac0:
This has been widely discussed already, read the last 10 pages or so. You will need to modify updater-script, depending on what ROM and what kernel you are using. Cheers.
[Nexus 5 Original Android Development] nunojsa:
Hi,

I have just a couple o question. If using 1, do i need to wipe /data or any other partition? And, can you point to a thread or something like that on how do i modify ramdisk with f2fs entries?

If using 2, and again the same question, do i need to wipe /data or any other partition?

Thanks in advance!
[Nexus 5 Original Android Development] Pretoriano80:
None of those options require a /data wipe, only when you switch from EXT4 to F2FS your internal storage will be completely wiped.

For example ElementalX still doesn't have F2FS support in the ramdisk (fstab. hammerhead is where you need to do the changes) but other kernels are already F2FS compatible (and EXT4).

As for modifying the ramdisk there are several tool for boot images unpacking (for various OS), just have a look in the general Android Development forum here on XDA.

Just a warning, lately i tried F2FS for a couple of weeks and ended up with a corrupted partition several times so be careful because you will loose all your data every time you encounter such an issue. I'm pretty experienced with F2FS in general but this time i still have no clue what caused the corruption issue, but happened mostly when i was trying to switch kernels (btw i also use Multirom here). Anyway it's yiur call but make sure you have a Nandroid backup on a safe storage bafore going to F2FS.