Enable F2FS for USERDATA & CACHE

ccelik97

Senior Member
Feb 22, 2015
204
93
0
My brother has got a POCO F1 and, he wanted to format his userdata and cache partitions like me (Mi 6 user here, AEX Pie + Vantom Kernel) to F2FS on his POCO.
What I've tried (and succeeded) is, adding the lines from my fstab file to his fstab.



Here's the steps we've followed:
- We've installed 9.1.24 Global Developer fastboot firmware by using the MiFlashTool (because AEX 6.3's flashable zip gave an error and told us to update to that version in the output).
- Then we've installed OrangeFox 9.0.1 as it also supports F2FS.
- Then I've got that fstab file, added the 2 lines for userdata and cache into it for F2FS, from my fstab (same android versions and kind of identical partition tables like my Mi 6 so, we tried - and succeeded, please follow).
- Then we've formatted the userdata and cache partitions to F2FS in the recovery.
- Then we've flashed AEX 6.3, Sphinx Kernel (looks nice, I may get some ideas from that) and the flashable* (see the attachments, alongside the original fstab from that version) "FSTAB-EXT4&F2FS-encryptable=footer-BERYLLIUM.zip" that I've made for the fstab.
- Then the GApps (particularly, OpenGapps Nano variant) and the other stuff like fonts etc (not important to specify but meh).

Then the system booted just fine, we've tried everything we could imagine to test and it seems working totally fine.

* Because of I was just lazy (lol) and used that old ass ZipMe app to create the flashables below, before flashing them you have to mount Vendor partition from the Mount screen of the OrangeFox/TWRP to get the the new fstab file written successfully.
> Also note that because of the POCO lacks a proper encryption method on F2FS (just like my Mi 6) your userdata partition will remain unencrypted by using this fstab file.
> For any reasons if you'd want to have your original fstab file back (even though this new one would work just fine for default EXT4 too), you can use the other flashable that I've attached below.



I hope this would be helpful for anybody so sharing the steps and ideas.

I think the same idea could be applicable to the combinations of other kernels that support F2FS and (I don't know, if anybody tries it please tell in the comments) even for MIUI (with a kernel that supports both F2FS and MIUI of course).

If you have any questions or suggestions, (preferably) tell in the comments or if you really want, you can also send pm for various reasons.

I hope that support for F2FS gets improved over time so everybody gets to use it on their devices lol, it's the healthy decision for the flash based storages (check the up to date documentations before starting a flame war or I'll ignore your ignorance - I'm just trying to help here and I feel bad for having to state this here explicitly, on my own behalf).



Note that, I'm not responsible for any possible damages/data losses to your phone (you know the drill here at XDA)/thermonuclear war or whatever; so please use your own brain and make your preliminary research and take precautions before trying anything that you aren't familiar with. Thanks.
 

IronRUS

Member
Feb 14, 2019
11
0
0
Hello everyone, how to install FSTAB EXT4 file? I just can not. And you can throw this file into the firmware file?

---------- Post added at 12:12 PM ---------- Previous post was at 12:08 PM ----------

It's working on Havoc 2.2 (19.2.11) and kernel eXtremeKernel_V9.1.
Thanks for sharing it.
How did you establish FSTAB EXT4 that works for you?
 

MadMelman

Member
Aug 21, 2015
32
10
28
Working on firmware 9.2.18, Havoc 2.2, Sphinx 2.5 & Micro Gapps.
Awesome :D
Is it all under the hood changes?
I don't see any particular increase in speed.

And can the system be f2fs too?
Thanks and keep up the great work. :p @Ccelik9
 
Last edited:

thanhnvt194

Senior Member
Feb 21, 2015
1,144
454
113
Vancouver
Working on firmware 9.2.18, Havoc 2.2, Sphinx 2.5 & Micro Gapps.
Awesome :D
Is it all under the hood changes?
I don't see any particular increase in speed.

And can the system be f2fs too?
Thanks and keep up the great work. :p @Ccelik9
Well as i know ,you simply can't, every ROM installation will re-format /system to ext4 automatically
 

pipyakas

Senior Member
Apr 22, 2013
1,164
280
103
Working on firmware 9.2.18, Havoc 2.2, Sphinx 2.5 & Micro Gapps.
Awesome :D
Is it all under the hood changes?
I don't see any particular increase in speed.

And can the system be f2fs too?
Thanks and keep up the great work. :p @Ccelik9
You can check the filesystem in Android by some apps like DiskInfo
The system cannot be f2fs since most roms target an ext4 /system partition when installing, so it would always format the system partition to ext4. Eventhough you can backup and restore all of its data once you convert, it would be formated back to ext4 the next time you flash anyway
 
  • Like
Reactions: MadMelman and Jole7

pipyakas

Senior Member
Apr 22, 2013
1,164
280
103
aside from /cache you shouldn't use f2fs on any other partition really. Maybe put it on /data for a few benchmark run to laugh at the score, but the performance degradation is too high and unpredictable
 

ccelik97

Senior Member
Feb 22, 2015
204
93
0
aside from /cache you shouldn't use f2fs on any other partition really. Maybe put it on /data for a few benchmark run to laugh at the score, but the performance degradation is too high and unpredictable
Performance "degradation" because of formatting data to F2FS? Nope.
 
  • Like
Reactions: Jole7

ccelik97

Senior Member
Feb 22, 2015
204
93
0
Working on firmware 9.2.18, Havoc 2.2, Sphinx 2.5 & Micro Gapps.
Awesome :D
Is it all under the hood changes?
I don't see any particular increase in speed.

And can the system be f2fs too?
Thanks and keep up the great work. :p @Ccelik9
Well, your filesystem is itself is the one that's "under the hood". You may notice faster system bootups, app launches and also some in app responsiveness improvements if a particular app is constantly trying to access the storage to record "random" stuff into it's databases.

For system, nope as the others explained before me. I think that it's enough for cache and userdata partitions.
 
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