[UNOFFICIAL] [07/19] TWRP 3.1.1 with F2FS support

Search This thread

DEVILOPS 007

Senior Member
May 24, 2016
3,866
1,668
Colchester
with latest version I can't format cache into f2fs, its giving me error 255... can u help me?
Yeah I know. I'm sorry about that, there must have been an issue in the boardconfig.mk somewhere. There seems to be another issue where it doesn't always recognise your phone's SDK after wiping system. I haven't had much spare time because of College but until I fix it I would recommend using The Flash's older TWRP build.
 

Az Biker

Sr. Mod / RC-RT Committees / Shred'r of MTBs
Staff member
@nathanchance

I'm going to flash latest angler Oreo on my 6P but I am still running it TWRP 3.1.1 w/ F2FS as my data partition is F2FS.

Will flashing the factory image overwrite that or do I need to revert it back first?

And stock format is EXT4? It's been a along time since I converted it :p

TIA!
 
Last edited:

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,106
29
Mesa, AZ
nathanchance.dev
@nathanchance

I'm going to flash latest angler Oreo on my 6P but I am still running it TWRP 3.1.1 w/ F2FS as my data partition is F2FS.

Will flashing the factory image overwrite that or do I need to revert it back first?

And stock format is EXT4? It's been a along time since I converted it :p

TIA!

You'll need to do the conversion procedure in the OP but select ext4 instead of f2fs.
 
  • Like
Reactions: Az Biker

Az Biker

Sr. Mod / RC-RT Committees / Shred'r of MTBs
Staff member
You'll need to do the conversion procedure in the OP but select ext4 instead of f2fs.

Once I convert, and it wipes the internal, 6P TWRP only has an image file to boot into, there is no zip file to install TWRP, or is this different than the 2 XL?

I mean after flashing the factory image, then booting into the device from fastboot with TWRP.IMG, then installing TWRP.ZIP... wait, there isn't a twrp.zip for angler...

I should've never stayed off the 6P as long as I did...

Thanks for the help!

EDIT: I figured it out, thanks again! :D
 
Last edited:

chrisxbell714

Senior Member
Mar 9, 2010
117
15
???

So....idk if anyone has used this thread and its recoveries for current builds of oreo roms... but...no matter what I do I cannot get F2FS to work with any oreo rom I throw at it. With the 3.2 f2fs recovery I flashed from this thread my internal storage gets deleted upon re-entering twrp...every single time. So I decided to flash the 3.1 twrp recovery to see if it made a difference...with 3.1, when I flash the august 13th build of resurrection remix in 3.1 it says and I quote "E3004: This package is for device: angler; this device is ." It literally tells me my device is "." . Ive been flashing since the motorola cliq. I have plenty of experience with custom roms and twrp. Something is F*cked up here LoL. And of course I have the latest bootloader, radio, and vendor image from august.

When I tried the 3.2 twrp from DEVILOPS 007, after flashing Resurrection Remix, gapps, Magisk, and Anykernel, it shows the boot animation then goes to a screen that says it failed to decrypt my phone and it tells me to reset my phone...

Is there a trick to this? I even tried the instructions for using F2FS by "secretcow" here https://xdaforums.com/showpost.php?p=69980946&postcount=2497. But I still cant get this to work.

I'm lost? This has never happened before with any other phone I have had.
 
Last edited:

chrisxbell714

Senior Member
Mar 9, 2010
117
15
...This recovery screwed some sh*t up. So after trying these recoveries and failing. The day after my last post I re-flashed back to the "stock" twrp that they have posted on twrp's site. I Have been running resurrection remix with magisk 16.7, open gapps, and anykernel for a while now. No issues. I decided last night i wanted to add fingerprint and pattern security. I set it up and went about my day. For whatever reason I started having wifi issues. Where my wifi literally wouldn't activate? Never happened before. Ever. With this phone. Just throwing this out there, I have NEVER had ANY decrypting issues with any roms or official recoveries. So...I rebooted to see if the wifi issue was fixed. Upon reboot....a screen came up...saying my phone couldn't be decrypted and the data was "Corrupt"? I have not backed up my apps with titanium. I have not backed up my texts or call log. NOTHING backed up because of how impulsive this issue was...Im a little frustrated but I understand at the same time. Apparently I'm going to have to start from scratch meaning...completely wiping my phone to stock. Re-Lock my device. Then go through the whole unlock bootloader re-rooting process because The recoveries I flashed from this thread has obviously screwed something up software wise. F*cked up man. But I understand I flashed experimental software that had little to no testing. I appreciate what the people in this thread has tried doing. But listen to my warning. IF YOU FLASH these experimental recoveries....something may go askew.

EDIT: I forgot to add that trying to make a backup with twrp after this decrypting issue...twrp literally couldn't back up my data instead it came up with an error.
EDIT AGAIN...I just did a full wipe and reflashed resurrection, gapps, magisk, and anykernel...my phone failed to decrypt...WTF? I'm on official 3.2.3 twrp...I havent fully factory reset my phone to stock yet...I needed my phone right now. I will respond back after fully going flashing to stock...I work overnights and its 1:48 pm EST so maybe tomorrow...?
EDIT a third time: Why did TWRP come up with my set unlock pattern after fully wiping my phone? Im in a WTF state right now.

Thank you again for the people who tried making this possible but...its just too buggy for any user to use...even after flashing back to an official recovery. Its not your fault you didn't know.
 

Attachments

  • double-facepalm.jpg
    double-facepalm.jpg
    40.2 KB · Views: 137
Last edited:
  • Like
Reactions: shaikhalid007

chrisxbell714

Senior Member
Mar 9, 2010
117
15
Alright so whoever has problems after flashing this recovery I know a way to fix any issues you may have. Follow this guide carefully.
Here's what you do.
1. BACKUP YOUR INTERNAL STORAGE TO YOUR PC if you have anything worth saving!
2.Download minimal ADB and Fastboot from here (https://xdaforums.com/showthread.php?t=2317790) I personally install it to the root of my C: drive.
3. Go to fastboot on your phone. Go to the minimal adb and fastboot directory and right click and run as administrator the file "cmd-here.exe"
type fastboot devices to make sure your device is shown. Then type...
fastboot erase system
then
fastboot erase userdata
then
fastboot erase cache
then
fastboot erase recovery
4.Download TWRP from here (https://dl.twrp.me/angler/) then rename it to recovery.img then copy "recovery.img" to the minimal adb and fastboot directory and then run the command...
fastboot flash recovery recovery.img
5.Here we go...download whichever stock zip from this site that suits you (https://developers.google.com/android/images#angler) I used the august zip because resurrection hasn't updated to September yet but choose whichever you want then extract the contents to your "minimal adb and fastboot" directory, make sure when you extract the zip that you copy the contents of the folder inside the zip to the minimal adb and fastboot directory and NOT JUST THE FOLDER!
After you extracted the contents of the stock firmware, then run...
"flash-all.bat" in fastboot. You will probably get some minuscule errors about system and data etc...trust me let it do its thing. It'll take a couple minutes to complete the process. If it ended well your phone will reboot and the command prompt will close on its own.
6.Your phone has now rebooted and will come up with the usual sceen saying it cant be checked for corruption blah blah etc etc, let it do its thing. You will finally see the stock boot animation. Let it load until it gets to the setup screen. I waited about 2 minutes then turn off your phone by holding the power down button. Wait about 30 seconds when it goes black then hold power and volume down to get to fastboot.
7.RE-FLASH TWRP using
fastboot flash recovery recovery.img
8.Download the corresponding 3 images from here...bootloader, vendor, radio... (https://kantjer.com/image/) rename them to bootloader.img, vendor.img, radio.img it just makes it easier. Then copy them to the Minimal adb and fastboot directory.
flash them in fastboot using the commands...
fastboot flash bootloader bootloader.img
then
fastboot flash vendor vendor.img
then
fastboot flash radio radio.img
9.ALMOST DONE! Reboot to recovery through fastboot by using the volume keys.
10. Copy all of your internal storage goodies back to your phone! MAKE SURE YOU DO A FULL WIPE WHILE IN TWRP BEFORE FLASHING ANY CUSTOM ROM!

You should be back to normal. I know I am! I took a lot of time typing this out to make it as simple as possible! Please thank me but especially the devs for the software that they have proudly contributed and please show appreciation to the Android community!
 
Last edited:

AzraelsKiss

Senior Member
Apr 16, 2011
1,141
1,453
Owenton, KY
Alright so whoever has problems after flashing this recovery I know a way to fix any issues you may have. Follow this guide carefully.
Here's what you do.
1. BACKUP YOUR INTERNAL STORAGE TO YOUR PC if you have anything worth saving!
2.Download minimal ADB and Fastboot from here (https://xdaforums.com/showthread.php?t=2317790) I personally install it to the root of my C: drive.
3. Go to fastboot on your phone. Go to the minimal adb and fastboot directory and right click and run as administrator the file "cmd-here.exe"
type fastboot devices to make sure your device is shown. Then type...
fastboot erase system
then
fastboot erase userdata
then
fastboot erase cache
then
fastboot erase recovery
4.Download TWRP from here (https://dl.twrp.me/angler/) then rename it to recovery.img then copy "recovery.img" to the minimal adb and fastboot directory and then run the command...
fastboot flash recovery recovery.img
5.Here we go...download whichever stock zip from this site that suits you (https://developers.google.com/android/images#angler) I used the august zip because resurrection hasn't updated to September yet but choose whichever you want then extract the contents to your "minimal adb and fastboot" directory, make sure when you extract the zip that you copy the contents of the folder inside the zip to the minimal adb and fastboot directory and NOT JUST THE FOLDER!
After you extracted the contents of the stock firmware, then run...
"flash-all.bat" in fastboot. You will probably get some minuscule errors about system and data etc...trust me let it do its thing. It'll take a couple minutes to complete the process. If it ended well your phone will reboot and the command prompt will close on its own.
6.Your phone has now rebooted and will come up with the usual sceen saying it cant be checked for corruption blah blah etc etc, let it do its thing. You will finally see the stock boot animation. Let it load until it gets to the setup screen. I waited about 2 minutes then turn off your phone by holding the power down button. Wait about 30 seconds when it goes black then hold power and volume down to get to fastboot.
7.RE-FLASH TWRP using
fastboot flash recovery recovery.img
8.Download the corresponding 3 images from here...bootloader, vendor, radio... (https://kantjer.com/image/) rename them to bootloader.img, vendor.img, radio.img it just makes it easier. Then copy them to the Minimal adb and fastboot directory.
flash them in fastboot using the commands...
fastboot flash bootloader bootloader.img
then
fastboot flash vendor vendor.img
then
fastboot flash radio radio.img
9.ALMOST DONE! Reboot to recovery through fastboot by using the volume keys.
10. Copy all of your internal storage goodies back to your phone! MAKE SURE YOU DO A FULL WIPE WHILE IN TWRP BEFORE FLASHING ANY CUSTOM ROM!

You should be back to normal. I know I am! I took a lot of time typing this out to make it as simple as possible! Please thank me but especially the devs for the software that they have proudly contributed and please show appreciation to the Android community!

Although your method is very thorough, it seems a bit overly complicated to me... First of all, if you want to be completely thorough, you may want to explain the ways to put the device into fastboot in step three. I wholeheartedly agree that if you're having issues with your device after using custom ROMs/recoveries, you should try flashing back to stock and start over, but it shouldn't be absolutely necessary to wipe those partitions, because flash-all.bat should wipe the necessary partitions. Also, it shouldn't be necessary to flash TWRP before flashing stock, because flash-all.bat will flash the stock recovery anyways. Same goes for flashing bootloader, vendor and radio after flash-all.bat has already flashed all three.

Personally... I prefer to follow @Heisenburg's guide at https://xdaforums.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928 when flashing back to stock, or most any other tip or trick related to the N6P. But that's just me.

Finally... If you were only having decryption issues, you may have only needed to format userdata with "fastboot format userdata" to remove encryption rather than completely reflash stock, but as I said, I do recommend reflashing to stock if nothing else seemed to help.

Have a good one!
 

shaikhalid007

Senior Member
Sep 15, 2017
149
20
Alright so whoever has problems after flashing this recovery I know a way to fix any issues you may have. Follow this guide carefully.
Here's what you do.
1. BACKUP YOUR INTERNAL STORAGE TO YOUR PC if you have anything worth saving!
2.Download minimal ADB and Fastboot from here (https://xdaforums.com/showthread.php?t=2317790) I personally install it to the root of my C: drive.
3. Go to fastboot on your phone. Go to the minimal adb and fastboot directory and right click and run as administrator the file "cmd-here.exe"
type fastboot devices to make sure your device is shown. Then type...
fastboot erase system
then
fastboot erase userdata
then
fastboot erase cache
then
fastboot erase recovery
4.Download TWRP from here (https://dl.twrp.me/angler/) then rename it to recovery.img then copy "recovery.img" to the minimal adb and fastboot directory and then run the command...
fastboot flash recovery recovery.img
5.Here we go...download whichever stock zip from this site that suits you (https://developers.google.com/android/images#angler) I used the august zip because resurrection hasn't updated to September yet but choose whichever you want then extract the contents to your "minimal adb and fastboot" directory, make sure when you extract the zip that you copy the contents of the folder inside the zip to the minimal adb and fastboot directory and NOT JUST THE FOLDER!
After you extracted the contents of the stock firmware, then run...
"flash-all.bat" in fastboot. You will probably get some minuscule errors about system and data etc...trust me let it do its thing. It'll take a couple minutes to complete the process. If it ended well your phone will reboot and the command prompt will close on its own.
6.Your phone has now rebooted and will come up with the usual sceen saying it cant be checked for corruption blah blah etc etc, let it do its thing. You will finally see the stock boot animation. Let it load until it gets to the setup screen. I waited about 2 minutes then turn off your phone by holding the power down button. Wait about 30 seconds when it goes black then hold power and volume down to get to fastboot.
7.RE-FLASH TWRP using
fastboot flash recovery recovery.img
8.Download the corresponding 3 images from here...bootloader, vendor, radio... (https://kantjer.com/image/) rename them to bootloader.img, vendor.img, radio.img it just makes it easier. Then copy them to the Minimal adb and fastboot directory.
flash them in fastboot using the commands...
fastboot flash bootloader bootloader.img
then
fastboot flash vendor vendor.img
then
fastboot flash radio radio.img
9.ALMOST DONE! Reboot to recovery through fastboot by using the volume keys.
10. Copy all of your internal storage goodies back to your phone! MAKE SURE YOU DO A FULL WIPE WHILE IN TWRP BEFORE FLASHING ANY CUSTOM ROM!

You should be back to normal. I know I am! I took a lot of time typing this out to make it as simple as possible! Please thank me but especially the devs for the software that they have proudly contributed and please show appreciation to the Android community!
Bro one question . does f2fs have a huge impact on performance. To be specific gaming performance???
 

chrisxbell714

Senior Member
Mar 9, 2010
117
15
c
Bro one question . does f2fs have a huge impact on performance. To be specific gaming performance???

Honestly it has performance gains when writing to emmc. It can increase write speed tremendously. But it "CAN" reduce read speeds. According to benchmarks (i prefer real world performance) You could get maybe 5-25% less in read speeds depending on what you are doing although you could see read speed increases in certain events. Overall it is a better file system in terms of performance compared to ext4. I love f2fs but its limited to earlier versions of android currently for our phone...lets face it our phone is getting out of date. Time to upgrade soon...

Look here for benchmark readings of ext4 vs f2fs https://xdaforums.com/showthread.php?t=2697069

---------- Post added at 03:07 PM ---------- Previous post was at 03:01 PM ----------

Although your method is very thorough, it seems a bit overly complicated to me... First of all, if you want to be completely thorough, you may want to explain the ways to put the device into fastboot in step three. I wholeheartedly agree that if you're having issues with your device after using custom ROMs/recoveries, you should try flashing back to stock and start over, but it shouldn't be absolutely necessary to wipe those partitions, because flash-all.bat should wipe the necessary partitions. Also, it shouldn't be necessary to flash TWRP before flashing stock, because flash-all.bat will flash the stock recovery anyways. Same goes for flashing bootloader, vendor and radio after flash-all.bat has already flashed all three.

Personally... I prefer to follow @Heisenburg's guide at https://xdaforums.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928 when flashing back to stock, or most any other tip or trick related to the N6P. But that's just me.

Finally... If you were only having decryption issues, you may have only needed to format userdata with "fastboot format userdata" to remove encryption rather than completely reflash stock, but as I said, I do recommend reflashing to stock if nothing else seemed to help.

Have a good one!

I already know some of what I have put might be unnecessary but I prefer to be extremely thorough and ocd with my phones. Better safe than sorry. After flashing the flash-all.bat my phone wouldn't boot. I had a similar issue with another phone. So I put in to the guide to flash twrp before and after. I have always liked a clean slate before flashing anything including stock roms. I know a phone cant boot without recovery and I dont know if these custom recoveries on this thread messed with my recovery partition so I added flashing twrp. I have experienced dramatic issues with not being thorough in the early ages of android scratching my head wondering what in the hell could have gone wrong following someone else's guide. I just aim for perfection that's all. I do appreciate the feedback though. Im just really OCD lol
 
Last edited:

shaikhalid007

Senior Member
Sep 15, 2017
149
20
c

Honestly it has performance gains when writing to emmc. It can increase write speed tremendously. But it "CAN" reduce read speeds. According to benchmarks (i prefer real world performance) You could get maybe 5-25% less in read speeds depending on what you are doing although you could see read speed increases in certain events. Overall it is a better file system in terms of performance compared to ext4. I love f2fs but its limited to earlier versions of android currently for our phone...lets face it our phone is getting out of date. Time to upgrade soon...

Look here for benchmark readings of ext4 vs f2fs https://xdaforums.com/showthread.php?t=2697069

---------- Post added at 03:07 PM ---------- Previous post was at 03:01 PM ----------



I already know some of what I have put might be unnecessary but I prefer to be extremely thorough and ocd with my phones. Better safe than sorry. After flashing the flash-all.bat my phone wouldn't boot. I had a similar issue with another phone. So I put in to the guide to flash twrp before and after. I have always liked a clean slate before flashing anything including stock roms. I know a phone cant boot without recovery and I dont know if these custom recoveries on this thread messed with my recovery partition so I added flashing twrp. I have experienced dramatic issues with not being thorough in the early ages of android scratching my head wondering what in the hell could have gone wrong following someone else's guide. I just aim for perfection that's all. I do appreciate the feedback though. Im just really OCD lol

But the performance may differ from device to device
Those benchmarks are true. But not accurate for this phone
I want your experience was the gaming performance better???
Because i play pubg like 4 hrs a day. I have ctt mod installed. 2 big cores disabled to prevent over heating.
Getting decent performance. But not on par since i m a pro player i wish to get better performance thanks for your reply
 

chrisxbell714

Senior Member
Mar 9, 2010
117
15
But the performance may differ from device to device
Those benchmarks are true. But not accurate for this phone
I want your experience was the gaming performance better???
Because i play pubg like 4 hrs a day. I have ctt mod installed. 2 big cores disabled to prevent over heating.
Getting decent performance. But not on par since i m a pro player i wish to get better performance thanks for your reply

Sorry for the wait. I have ctt with magisk...what a difference, no more throttling. Still how are you not getting overheating issues? I have my phone at 3 cores at 1.2 ghz (it performs pretty damn well) and playing certain games the temp goes over 60c! I don't throttle anymore but the phone is to hot for the battery to last. I replaced my battery in November last year I already have to replace it again...it dies at around 20% due to the heat overtime. But...in terms of frames per second I don't see any gains at all UNLESS the game writes a lot of information to your emmc/internal storage otherwise If you want a more "fluid" gaming experience then set the gpu governor to performance and set it to 600mhz and increase cpu frequencies if you have it underclocked. Otherwise f2fs will not show any FPS improvements. F2fs is more for write operations not read and...when battlegrounds is loaded its loaded to the ram not on the fly like for most applications/games. Sorry to say in MOST cases ram(to a phone) is stuck at whichever setting the chipset sets it at, there are no options for ram overclocking unless your a software engineer/coding professional. If its a home computer....that's a different story. F2fs is more for file operations.
 
Last edited:

shaikhalid007

Senior Member
Sep 15, 2017
149
20
Sorry for the wait. I have ctt with magisk...what a difference, no more throttling. Still how are you not getting overheating issues? I have my phone at 3 cores at 1.2 ghz (it performs pretty damn well) and playing certain games the temp goes over 60c! I don't throttle anymore but the phone is to hot for the battery to last. I replaced my battery in November last year I already have to replace it again...it dies at around 20% due to the heat overtime. But...in terms of frames per second I don't see any gains at all UNLESS the game writes a lot oinformation to your emmc/internal storage otherwise If you want a more "fluid" gaming experience then set the gpu governor to performance and set it to 600mhz and increase cpu frequencies if you have it underclocked. Otherwise f2fs will not show any FPS improvements. F2fs is more for write operations not read and...when battlegrounds is loaded its loaded to the ram not on the fly like for most applications/games. Sorry to say in MOST cases ram(to a phone) is stuck at whichever setting the chipset sets it at, there are no options for ram overclocking unless your a software engineer/coding professional. If its a home computer....that's a different story. F2fs is more for file operations.
Thanks for your very explaining explanation. Now i understand.i have also replaced battery once.now it dies at 50 percent i m going to replace it once more before given up on 6p.and i m also running ctt mod alongside elementalx.can you post screenshots of your setup??
Thanks again
 

chrisxbell714

Senior Member
Mar 9, 2010
117
15
Thanks for your very explaining explanation. Now i understand.i have also replaced battery once.now it dies at 50 percent i m going to replace it once more before given up on 6p.and i m also running ctt mod alongside elementalx.can you post screenshots of your setup??
Thanks again

Yeah Ill definitely send some screens. I use EX Kernel Manager. You can buy it from play store.
 

Attachments

  • Screenshot_EX_Kernel_Manager_20180913-121259.jpg
    Screenshot_EX_Kernel_Manager_20180913-121259.jpg
    181.3 KB · Views: 105
  • Screenshot_EX_Kernel_Manager_20180913-121313.png
    Screenshot_EX_Kernel_Manager_20180913-121313.png
    234.2 KB · Views: 104
  • Screenshot_EX_Kernel_Manager_20180913-121322.png
    Screenshot_EX_Kernel_Manager_20180913-121322.png
    233.6 KB · Views: 96
  • Screenshot_EX_Kernel_Manager_20180913-121330.png
    Screenshot_EX_Kernel_Manager_20180913-121330.png
    216.5 KB · Views: 116
  • Screenshot_EX_Kernel_Manager_20180913-121339.png
    Screenshot_EX_Kernel_Manager_20180913-121339.png
    218.3 KB · Views: 92
  • Screenshot_EX_Kernel_Manager_20180913-121353.png
    Screenshot_EX_Kernel_Manager_20180913-121353.png
    253.5 KB · Views: 97

chrisxbell714

Senior Member
Mar 9, 2010
117
15
Thanks but.how is your battery temp so low?? My battery temp when idle is 35 c and when using 37-40

As of right now i'm in an A/C'd room so my cpu temp is low. BUT don't look at my battery temp because I got scammed on amazon...They showed a pic with a battery sensor with my replacement but when I got the battery in my hands there was no sensor...so the battery temp remains the same at all times.
 

shaikhalid007

Senior Member
Sep 15, 2017
149
20
This is my setup
Elementalx
Ctt mod
 

Attachments

  • Screenshot_EX_Kernel_Manager_20180913-220140.png
    Screenshot_EX_Kernel_Manager_20180913-220140.png
    194.5 KB · Views: 97
  • Screenshot_EX_Kernel_Manager_20180913-220129.png
    Screenshot_EX_Kernel_Manager_20180913-220129.png
    215 KB · Views: 91
  • Screenshot_EX_Kernel_Manager_20180913-220104.png
    Screenshot_EX_Kernel_Manager_20180913-220104.png
    249.4 KB · Views: 93

Top Liked Posts

  • There are no posts matching your filters.
  • 67
    Introduction

    Hello all, this is my version of TWRP for the Nexus 6P, which includes the ability to convert your /data and /cache partitions to F2FS. This will stay inline with TWRP's changes for the most part, the changes will be listed below.

    What in the world is F2FS?

    From Wikipedia:

    F2FS (Flash-Friendly File System) is a flash file system initially developed by Samsung Electronics for the Linux kernel.

    The motive for F2FS was to build a file system that, from the start, takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.

    F2FS was designed on a basis of a log-structured file system approach, which it adapted to newer forms of storage. Jaegeuk Kim, the principal F2FS author, has stated that it remedies some known issues of the older log-structured file systems, such as the snowball effect of wandering trees and high cleaning overhead. In addition, since a NAND-based storage device shows different characteristics according to its internal geometry or flash memory management scheme (such as the Flash Translation Layer or FTL), it supports various parameters not only for configuring on-disk layout, but also for selecting allocation and cleaning algorithms.
    Before diving into this, I would recommend reading the official F2FS documentation to understand why this may be good for you. This is potentially unstable, F2FS is a file system that is very much in active development. There is a reason that most OEMs go with ext4 out of the box. But I digress, I am NOT here to sell you on F2FS; it makes zero difference to me if you use it or not, I am merely providing you with a tool to do so.


    Changelog + differences

    Differences:
    • f2fs-tools bumped to 1.7.0 (Omni's 6.0 branch is on 1.4.0)
    • TWRP app installation offer disabled by default


    Conversion procedure

    1. Download TWRP from the link above
    2. Grab a kernel that supports F2FS (I use my own as I know it works)
    3. Back up any important data as this will wipe your entire internal storage
    4. Boot into the bootloader and flash the recovery
    5. Boot into TWRP and go into Wipe > Advanced Wipe
    6. Select Data and then hit "Change or Repair File System"
    7. Hit Change File System
    8. Choose F2FS and slide to confirm
    9. Repeat the previous three steps for cache
    10. Reboot and move all of your files back over (if restoring through TWRP, make sure to check the option to use rm -rf instead of formatting)
    If you have any issues with this, you may need to ask your ROM developer to merge the two commits below.

    Bug reports

    You are NOT in ANY circumstance to report ANY bugs to the TWRP team.

    • If you have an issue with flashing something in TWRP, copy the recovery log to your sdcard and post it here.
    • If swapping to F2FS does not stick, try formatting your data with TWRP (Wipe > Format Data) or fastboot format userdata first.
    • If your phone does not boot after swapping to F2FS, either your kernel or ROM does not have proper support; post in their thread.
    Additionally, check out some of these helpful posts:


    Adding support to ROM

    In order to properly support the initial conversion to F2FS, please add these two commits to your source:
    https://github.com/omnirom/android_system_core/commit/1c6700a8fb31c6e314df4f031fa23fa9178c7ca7
    https://github.com/omnirom/android_system_vold/commit/c879edb2fecae709f404c2d71c1d47ceac3a325e

    The reason some people have issues converting is fs_mgr will try to read the block device as ext4 and destroy the f2fs block. This commit skips that check, allowing F2FS to pass through.

    Sources

    TWRP is licensed under GPLv3, meaning my changes must be disclosed. I also inline a custom kernel so that source is included as well. I also add in the other repos I modify.

    33
    Version 3.1.1-8 now available!

    Image: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-8-angler-f2fs-20170512.img
    MD5: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-8-angler-f2fs-20170512.img.md5sum

    Changelog:
    Code:
    805a5dfe 3.1.1
    0afc1fdc Fix reboot when no OS is present
    84d61ce3 Update TWRP to AOSP 7.1.2
    6355b56c Adopted Storage: backup keys but do not wipe them
    b5ecaad2 ADB Backup: fix adb restore issues
    26
    Update!

    Bumped to version 10, with the following changelog:
    • Updated to the latest Flash Kernel, which has several f2fs, ext4, and dm block commits
    • Update decryption libs to latest N image
    • Removed SuperSU from recovery ramdisk
    • Fixed backlight dimming issue

    Downloads

    Image: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-10-angler-f2fs-20170527.img
    Checksum: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-10-angler-f2fs-20170527.img.md5sum
    26
    Alright guys, new build is up. This should be much more stable than it was since it's built off of Omni's 6.0 branch (thank you so much to @jcadduono for pointing me in the right direction). Here's what's been tested and verified working:
    • F2FS tools (1.7.0, both make.f2fs (log) and fsck.f2fs (log) work fine for me)
    • The Nethunter kernel zip @t83wood had issues with flashing (log)
    • ElementalX zip (log, boot fine for me on Pure Nexus)
    • Encryption (decrypts with or without the security enabled on boot option)

    Everything should be 100% good now, though if it isn't, I NEED a recovery.log (Advanced > Copy Log). Hope you all enjoy!

    @chevycam94, change the zips back to the previous way they were, we now have working Busybox :p
    20
    Update!

    Standard update, upstream fixes and such. The primary reason for this post is to notify you that your custom themes may or may not work, given the TWRP theme version has been bumped from 2 to 3. I know for a fact @z31s1g has some test themes for this here. Other than that, everything works perfect. Enjoy!