(Guide) Convert EXT4 to F2FS on lavendar

mrtausif2004

Senior Member
Mar 20, 2007
279
25
0
Hi,

I made this guideline for those who want to convert filesystem from EXT3 / EXT4 to F2FS on lavendar, for amazing speed & performance.

I already had MIUI EU beta working on my phone.

Note: Internal data storage will be wiped. Make sure to have a backup.

Steps:
1. Install Orange Fox Recovery (latest one)
2. Reboot to recovery
3. Go to Manage Partition
4. Select "Cache" and click orange tick button, then choose F2FS as the file
system and proceed.
5. Again, select "Data" and click orange tick button, then choose F2FS as the file
system and proceed.
6. Reboot to Recovery again.
7. Install a custom kernel which support F2FS (i.e Evira)
8. Install Universal F2FS support patch file. (otherwise causing boot loop)
9. Reboot

Enjoy the speed.>>>>>>>>>>>
 

Attachments

White_Lion

Member
Mar 25, 2015
44
5
0
Hi! Filesystem F2FS keeps always even if you make full wipes + format data? For example, if i do the process but later i want to change my device's ROM, system will still have F2FS after wipes and format data? Sorry i've never changed my device's Kernel so i don't know if the system keep the new kernel (and the F2FS support patch file mentioned in this post) after a wipe + format data or they have to be re-flashed. Thank you in advance.
 
Last edited:

Plast0000

Senior Member
Aug 8, 2014
52
5
0
Giza
Did as instructed. got a boot loop : (
Are you sure that fstab flags are properly set? I don't see 'nofail' option or maybe there's some other option that substitutes?
I use miui eu 9.8.9
I reformatted back to EXT4 and it boots again.

If you are not so sure (neither am I, I will go research mount command options) then I recommend 3 separate zips
One that's F2FS only for cache and data
One that's all EXT4 for cache and data in case someone needed to revert without reflashing rom
And one that's F2FS cache and EXT4 data because migrating data partition can be a lengthy process for some people. But formatting cache is always easy.
 
Last edited:

jalzate94

New member
Aug 11, 2019
1
0
0
Did as instructed. got a boot loop : (
Are you sure that fstab flags are properly set? I don't see 'nofail' option or maybe there's some other option that substitutes?
I use miui eu 9.8.9
I reformatted back to EXT4 and it boots again.

If you are not so sure (neither am I, I will go research mount command options) then I recommend 3 separate zips
One that's F2FS only for cache and data
One that's all EXT4 for cache and data in case someone needed to revert without reflashing rom
And one that's F2FS cache and EXT4 data because migrating data partition can be a lengthy process for some people. But formatting cache is always easy.
I had the same problem, to solve it do the partitions process, flash first evira, reboot to recovery again and flash the patch. It worked for me and booted succesfully into the rom. I use xiaomi eu 9.8.9 too.
 

Plast0000

Senior Member
Aug 8, 2014
52
5
0
Giza
I had the same problem, to solve it do the partitions process, flash first evira, reboot to recovery again and flash the patch. It worked for me and booted succesfully into the rom. I use xiaomi eu 9.8.9 too.
So I do it like this?
1- change partition fs
2- reboot into recovery
3- flash evira
4- reboot into recovery
5- flash fstab.zip
6- reboot into rom
 

Plast0000

Senior Member
Aug 8, 2014
52
5
0
Giza
Last edited:

gardiol

Senior Member
Feb 23, 2011
441
237
73
San Carlo Canavese
photos.gardiol.org
See, F2FS works on NAND flash memories.... Lavender ilis NOT a NAND flash, so there is no advantage in using it. At least this is the rationale if I am not wrong.

As speed goes, F2FS is no benefit as your link said, but also for the wear and tear there is not much benefit

Sent from my Note 5 / 5 Plus using XDA Labs
 

Plast0000

Senior Member
Aug 8, 2014
52
5
0
Giza
See, F2FS works on NAND flash memories.... Lavender ilis NOT a NAND flash, so there is no advantage in using it. At least this is the rationale if I am not wrong.

As speed goes, F2FS is no benefit as your link said, but also for the wear and tear there is not much benefit

Sent from my Note 5 / 5 Plus using XDA Labs
Hmm? according to mi website and wikipedia it uses eMMC 5.1 which is a NAND storage. why wouldn't it work?
As for my link they all agree that F2FS is a bit slower for read but hellalot faster for write. overall gain is considerable.
 
  • Like
Reactions: Kuato and fakeke

vexa

Senior Member
Sep 16, 2013
158
222
0
Denpasar, Bali
Hi! Filesystem F2FS keeps always even if you make full wipes + format data? For example, if i do the process but later i want to change my device's ROM, system will still have F2FS after wipes and format data? Sorry i've never changed my device's Kernel so i don't know if the system keep the new kernel (and the F2FS support patch file mentioned in this post) after a wipe + format data or they have to be re-flashed. Thank you in advance.
No, the data partition will be converted back to ext4 everytime you do "format data".
Not formatting your data could keep the f2fs status, but it's risky to not formatting data when changing ROM in lavender due to it's strict encryption issue.

Did as instructed. got a boot loop : (
Are you sure that fstab flags are properly set? I don't see 'nofail' option or maybe there's some other option that substitutes?
I use miui eu 9.8.9
I reformatted back to EXT4 and it boots again.
Miui.eu ROMs doesn't fully support F2FS. The rom does, but the kernel doesn't.
You need to make sure both the ROM and kernel has F2FS support.
if one of them don't, you'll get bootloop. :eek:

So I do it like this?
1- change partition fs
2- reboot into recovery
3- flash evira
4- reboot into recovery
5- flash fstab.zip
6- reboot into rom
I've been on F2FS since.. April I think, and I've installed and tried so many roms without any problem.
here's what I normally do and it works all the time:

- Make sure data & cache are ext4
- format data
- reboot recovery,
- wipe cache, dalvik, system, data, internal,
- flash firmware
- flash ROM
- flash gapps (optional)
- flash magisk
- flash kernel that has f2fs support (optional, if the rom's kernel doesn't support F2FS)
- reboot system

————————————————————————
it's necessary to install the rom in EXT4 because automatic encryption doesn't work in f2fs partition (I think... based on my experience). granted, you can do the encryption manually from settings, but it's require to have 80%++ battery and the more stuff you have in your internal, the longer it'd take to manually encrypt the device. automatic encryption is just easier to do. You can leave your internal decrypted as well, but you won't be able to use your fingerprint or any screen lock methods. That's just how redmi 7 family works.
————————————————————————

- once you get into system, reboot to recovery once again
- convert cache & data to f2fs
- flash magisk
- flash universal f2fs patch
- reboot

now your /data and /cache are in f2fs.

If you're already on a rom and kernel that support f2fs, you can just do the later half of this tutorial without the need to reinstall rom and everything, but you'd lose all your data. good luck!
 
Last edited:
  • Like
Reactions: Josueden69
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