yashsingh1/xdaforums huggingface dataset:
[Nexus 6P Android Development] shadowstep:
I'm running the April official one. I don't flash RCs or weeklies. I will be dirty flashing monthly, whenever the official ones are released.
[Nexus 6P Android Development] Toutatis_:
Could you please detail your flashing steps?

My /data and /cache partitions are converted into F2FS (I check before flashing).

I wiped everything including internal storage, then flashed:

1. DU_angler_7.1.2_20170407-0538.v11.3-OFFICIAL.zip

2. BeansGapps-Mini-7.1.x-20170414.zip

3. flash-angler-20170419-2310.zip

During the first boot, at some point, the DU boot animation freezes, then bootloop... when rebooting to TWRP again, /data and /cache partitions are reverted to ext4.
[Nexus 6P Android Development] deani77:
From my last flash with DU it always

1. Clean wipe

2. Flash ROM, Gapps kernel and other mods

3. Convert /data and /cache to F2FS

4. Reboot
[Nexus 6P Android Development] Toutatis_:
Not working either...

Converting /cache partition to F2FS works fine but I'm getting the following error message when trying to convert /data partition to F2FS:

mkfs.f2fs -t 0 /dev/block/dm-0 process ended with

ERROR: 255

Unable to wipe data.

Error changing file system.

I'm not getting such error when converting to F2FS prior to flashing anything.

I read in the thread that someone had the same error because he was using an old version of TWRP, which isn't my case. I'm using twrp-3.1.0-7-angler-f2fs-20170311.img

Edit: Ok, I solved my problem by following these steps

All good now.
[Nexus 6P Android Development] larryatapproved:
I'm a little confused if there is a rom already installed and running. If I backup data, covert data and cache to F2FS, then move data back

to TWRP and restore it, will the rest of the rom still be as it was before, apps and all that? Or will I need to reflash the rom and set it all up again?
[Nexus 6P Android Development] designori:
confirm: f2fs working flawlessly with lastest pure nexus.

thanks flash!
[Nexus 6P Android Development] deani77:
You need to to reflash the ROM and everything but once you restore your data partition it will be the same as before...
[Nexus 6P Android Development] dr_rick13:
has anyone who was on PureNexus with F2FS before recently updated to latest ROM version? I'm curious about the process. Should I wipe everything clean again or is there a simpler way?

Thanks gents.
[Nexus 6P Android Development] Face_Plant:
The 4/23/17 release of Pure Nexus is signed with new keys, so it requires a clean wipe no matter what. You will have to wipe everything except for internal storage.

As for keeping F2FS, this is what I would do:

1. Make sure "use rm -rf instead of formatting" is checked in TWRP settings (only required if you're planning on formatting data, but I'd check it anyways just to be safe)

2. Wipe data, cache, dalvik, and system

3. Reboot back into TWRP and make sure data and cache are still F2FS

4. Install Pure Nexus, Bean's GApps, and an F2FS compatible kernel

5. Profit
[Nexus 6P Android Development] Face_Plant:
Which version of TWRP are you using?
[Nexus 6P Android Development] dr_rick13:
latest version, Flash's 3.1.0.7
[Nexus 6P Android Development] sengab1991:
I have converted cache and data to F2FS as steps in the thread OP when I checked file system type data is still ext4 but cache is F2FS :/ any help please

Also the backup of data by twrp that I made doesn't exists
[Nexus 6P Android Development] nathanchance:
As in just going into Wipe > Advanced Wipe and selecting data?

In TWRP: Go into Wipe > Advanced Wipe, select the partition you want to check, and choose Change filesystem.

In Android: type mount into a terminal emulator.
[Nexus 6P Android Development] dr_rick13:
Thanks for the reply man. I just ended up wiping the whole device and starting from scratch, took a bit of time but I got it done.
[Nexus 6P Android Development] DEVILOPS 007:
Do you not dirty flash then?
[Nexus 6P Android Development] Aswin08:
Sorry if its already answered, should i wipe my internal storage before converting to f2fs? or just system data?

And should I flash ROM and stuffs after converting or before? Answers in this thread are quite confusing...
[Nexus 6P Android Development] nathanchance:
Changing filesystem types automatically wipes the internal storage because formatting the whole userdata block.

It doesn't (usually) matter what order you do it in but I do it after typically.
[Nexus 6P Android Development] joeyfong:
If you flash it after, you need to copy back the files after the file system change
[Nexus 6P Android Development] larryatapproved:
Thank you!
[Nexus 6P Android Development] Face_Plant:
Did you convert to F2FS after making the backup? If so, then that's why. Converting to F2FS wipes the entire data partition, including internal storage where your backup was.

What ROM and kernel are you using? They need to support F2FS in order for it to stick after converting. If you're using the latest Pure Nexus, the ROM supports F2FS, but the included kernel doesn't. You need to install an F2FS compatible kernel like Flash or Franco after flashing the ROM and converting to F2FS.
[Nexus 6P Android Development] Neejay:
I know I'm late, but I can tell a difference.

Granted, I did a clean install, but I fully restored my apps and their data via titanium backup. The apps open snappier, even after almost a week.

I don't think it was worth it to add the commits, build myself (just for f2fs), full wipe, backup and restore full sdcard, troubleshoot, etc etc

But if you're going to fully wipe and start over for whatever reason, you might as well convert over.
[Nexus 6P Android Development] sengab1991:
Converting data to f2fs didn't wipe the internal but didn't stick too.

So I wiped all and then converted data and cache to f2fs and then installed pure nexus latest and then gapps and flash kernel and rebooted.

I ended up stuck at boot animation screen and then rebooting (bootloop) :( I tried to flash again this didn't​ do the trick so I flashed stock android to save the day :( :(
[Nexus 6P Android Development] DEVILOPS 007:
Have you tried another ROM and kernel to confirm if it is the rom/kernel just incase there is a bug? Also if you are having problems still then try this. Download the stock OTA and extract the images and fastboot flash them all. That includes bootloader, radio, recovery, boot, system and vendor. Then format userdata via fastboot. Then flash twrp recovery image file and boot into it and format data. Then change data and cache to f2fs and flash your rom and kernel.
[Nexus 6P Android Development] Az Biker:
Just to clarify:

The OP says this:

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)

Another user who successfully used your instructions posted this:

Note, in TWRP settings, when formatting as F2FS make sure the "use RM-f when formatting" is not checked, but then when flashing the ROM, turn it back on to ensure that flashing the ROM does not revert /data or /cache to EXT4.

OP says to CHECK (turn on) rm-rf, and the other user says UNCHECK (turn off) rm-f (I presume the missing 'r' is a typo)

I'm certainly NOT pointing fingers or intending any disrespect to anyone, I just want to use the correct instruction. I figure the OP is correct, but since there IS a difference with the two instructions, I figured I'd ask before jumping in.

Thanks in advance.
[Nexus 6P Android Development] nathanchance:
For what it's worth, I NEVER do or restore nandroid backups. I always clean flash when something goes wrong and I never restore any sort of data when doing so. I just put in the OP what people tell me regarding that :silly:
[Nexus 6P Android Development] Az Biker:
[MENTION=6842057]The Flash[/MENTION] So if am not going to restore a nand, I leave the use rm-rf UNchecked, right? I'm not trying to be hard headed, I'm just a little slow when doing stuff for the first time :D

Update: Up and running PN, Flash kernel, F2FS data/cache, Magisk , so far so good! I never even saw a "use RM-rf" option :p

Thanks [MENTION=6842057]The Flash[/MENTION] for your hard work on BOTH the kernel and F2FS TWRP!
[Nexus 6P Android Development] AzraelsKiss:
I believe the poster was trying to say when you convert to f2fs, make sure "use rm -rf when formatting" isn't checked, so it does a proper format for the new file system, then check it back on before you wipe and flash to make sure it doesn't try to format and revert to ext4. But I've been wrong before...

Have a good one!
[Nexus 6P Android Development] :
Non English posts removed.
[Nexus 6P Android Development] Neejay:
This is exactly what I did for my last (and successful) attempt at the f2fs conversion, with the exception of restoring apps+their data via titanium backup.

The issues I had were always when I tried to restore nandroid backups of some sort. Clean install, zero issues.
[Nexus 6P Android Development] inimaitimepass:
By chance, is your device encrypted? I too faced the similar issue.

In TWRP once the conversion is done, and after rebooting, all the device settings stays intact and running mount command in terminal shows the the data partition is still in ext4.

What solved the issue was, formatting the internal storage to disable encryption. I ran "fastboot format userdata" in bootloader, then boot into the recovery and tried the conversion, rebooted and checked, data partition is in F2FS now.

Bottomline is. if device is encrypted you can't convert into F2FS, and once you are converted into F2FS, you cant encrypt the device. It's a tradeoff.

Will run with F2FS for a couple of days to check whether it is worth to sacrifice the encryption or not.

[MENTION=6842057]The Flash[/MENTION] Can you pls update the OP with this info, (if it is not already there)??
[Nexus 6P Android Development] burningcreation:
I am running PureNexus. If I want to change my kernel can I just restore to the default boot.img and then change to another as I normally would or will I run into problems because I am now on F2FS?

I hope that makes sense. Thanks!
[Nexus 6P Android Development] nathanchance:
Yes but the new kernel need to support F2FS as well.
[Nexus 6P Android Development] Relentless D:
What am I missing?

I was having a few issues with my phone so I wanted to head back to stock for a fresh start. Figured it would be a great time to try converting to f2fs.

I flashed the stock 7.1.2 image. Phone booted up fine, everything as expected.

Rebooted to bootloader and fastboot flashed modified twrp (3.1.0-7).

Went in to recovery, converted data and cache to f2fs

Rebooted back to recovery and verified file systems were still showing f2fs

Flashed latest purenexus (4/23), beans Gapps and latest flash kernel (verified all 3 checksums matched)

Bootloop.

I let it sit for 30 mins and it never boots.

Back to recovery and now data is showing as ext4?

I tried wiping, reflashing, etc... no go.

I converted cache back to ext4 but it still won't boot after reflashing the rom again.

The only way I can get this sucker booting right now is with a full stock image.

Am I missing something?
[Nexus 6P Android Development] JRJ442:
Are you flashing SuperSU as well?
[Nexus 6P Android Development] Relentless D:
Nope. Just those three files.

Also just verified that the checksums on all three are correct.
[Nexus 6P Android Development] JRJ442:
Do you have "rm -rf instead of formatting" enabled in TWRP?
[Nexus 6P Android Development] Relentless D:
I've seen a lot of chatter about that the last few days but it is not enabled and I have never enabled it.
[Nexus 6P Android Development] JRJ442:
Yeah I was gonna say be sure that's disabled. I'm out of ideas then.
[Nexus 6P Android Development] Relentless D:
I do appreciate you jumping in and trying to help me out though! : )

---------- Post added at 08:51 AM ---------- Previous post was at 08:36 AM ----------

Got it working.

I noticed that after flashing when I went back into recovery and it was showing as ext4 again all the default android folders (ringtones, podcasts, etc...) were there. I did a format data in twrp, rebooted, change cache and data partitions back to f2fs, moved my files back over, flashed them and everything booted up as expected.

YMMV but I'm running now.
[Nexus 6P Android Development] inimaitimepass:
NVM
[Nexus 6P Android Development] enormous:
The exact same thing was happening to me. This really helped. Thanks!

Now with bullet points:

Flash TWRP with f2fs support

Reboot recovery

Format data in TWRP

Reboot recovery

Make changes to data and cache partition (switch to f2fs)

Copy zip files back to device

Flash PN, Gapps, Kernel, etc

Reboot system
[Nexus 6P Android Development] Az Biker:
The only thing I see that you did diff than me is I just installed Flash's TWRP via flashing the image in TWRP.

Not sure if/ how that would make any diff, but I followed the same steps as you without any issues. I didn't flash Magisk until after I started setting up the phone.
[Nexus 6P Android Development] Ozark_8125:
If I'm reading you correctly, a clean flash is taking your data and/or cache back to a ext4 format. I know you're running now, that's great, but I'm guessing the only caveat is for folks clean installing is to convert data and cache to f2fs

after

flashing the rom (probably also rebooting to recovery after flashing rom / gapps / Su / kernel) and verifying data and cache are still in f2fs format. I got a warning message when restoring my ext4 data parition after changing to f2fs that my data was in ext4 format, but it booted up just fine (I ran a f2fs repair from twrp just to make sure it was ok before booting up into the rom the first time after restoring).
[Nexus 6P Android Development] xflowy:
What's it with that option? What does it do? When i convert to f2fs for the first time, it should be off, right? But then i leave it enabled forever during flashing and wiping for new roms, for example?

Thanks much! :)
[Nexus 6P Android Development] JRJ442:
The only time you need that option enabled is if you're restoring a data backup made in TWRP that was made while the file system was ext4. Otherwise it's not needed and has caused issues for some people causing data to revert back to ext4. So, unless you're restoring a backup that you made before you switched to f2fs, leave it off. It's not needed.
[Nexus 6P Android Development] drewski_1:
the post you quoted explained it.

when unchecked, wiping will physically format vs. the -rf will just recursively erase the files.

when you are restoring an Ext4 Nandroid to a F2FS partition, this unchecked can change the filesystem back to Ext4 so you need to check the box to just erase and preserve the F2FS formatting.
[Nexus 6P Android Development] trimeistr:
Can anyone confirm if encryption works with F2FS? If my device is encrypted and I do a clean flash, it goes into EXT4 during the boot. If I convert to F2FS while not being encrypted and clean flash it works, but as soon as I encrypt the device it refuses to boot again.
[Nexus 6P Android Development] sp0rky:
I am having the same problem. Bootlooped.

So i went back to recovery. Wipe everything except internal storage. Then converted DATA and CACHE to F2FS.

Copied all the files while in TWRP.

Flash PN. GAPPS. Flash.

Reboot system. stuck in bootloop again.

I would rinse and repeat. Go back into recovery. Find that its back to ext4. changed it to F2FS and copied and reinstall everything... UGH!!!!
[Nexus 6P Android Development] Relentless D:
Did you try formatting data like in the post you quoted?
[Nexus 6P Android Development] sp0rky:
Thanks for replying. After being at it and refusing to give up.. i spend 3 hours and i found this post.

https://xdaforums.com/showpost.php?p=72061874&postcount=35742

I added the step to my repetoir fastboot format userdata.

and i added Wiping everything but internal storage after changing filesystem. and did exactly everything. now im up and running. reinstalling everything
[Nexus 6P Android Development] Lucius1972:
Converting to F2FS will remove the encryption possibility, it's a sacrifice you need to make but therefore you gain more speed and snappiness. Up to you to decide what's more important for you.
[Nexus 6P Android Development] Mrcactuseater:
Is that a confirmed fact, because my old Nexus 5X ran encrypted F2FS
[Nexus 6P Android Development] JRJ442:
Yes. Because to my knowledge there are no kernels that support f2fs and force encryption. The main kernels I know of that support it are no-force encrypt.
[Nexus 6P Android Development] trimeistr:
Is is the kernel that has to support it? Would be amazing if someone could add it to their kernel. Not running encrypted will have to do for now though. Snappier phone effects my daily, while not being encrypted might maybe affect me once if I'm unlucky.
[Nexus 6P Android Development] nathanchance:
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:

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
[Nexus 6P Android Development] xSilas43:
You can encrypt your phone at any time on any kernel, these kernels just don't FORCE you to be encrypted.
[Nexus 6P Android Development] nathanchance:
For what it's worth, I tried to force encrypt with f2fs yesterday and it did not work. The primary reason being that it formats data to a dm block device and the tools to do that expect an ext4 image. I'm sure there are ROM side commits to support force encryption with f2fs but I haven't looked.
[Nexus 6P Android Development] xSilas43:
I still seem to be having issues restoring an adb backup I made with this latest version just recently. It says that it restored System in 0-1 second and just hangs there.
[Nexus 6P Android Development] nathanchance:
I'll see if I can build from Omni's 7.1 trees sometime this week and see if that fixes it.
[Nexus 6P Android Development] tr1gg3r.man:
Dang [MENTION=6842057]The Flash[/MENTION] you stay busy, a kernel, a ROM and TWRP... c0de much? =P

Thanks for all your hard work and contributions. ?
[Nexus 6P Android Development] nathanchance:
I do what I can where I can :D
[Nexus 6P Android Development] Face_Plant:
Don't forget his SD Card FS Magisk module
[Nexus 6P Android Development] Az Biker:
There's a reason he's called "The Flash" :p
[Nexus 6P Android Development] dr_rick13:
will I be OK if I just fastboot this recovery over the current one that's also F2FS?
[Nexus 6P Android Development] DorianX:
You can even flash it with your current TWRP, you don't need to use fastboot

Enviado desde mi Nexus 6P mediante Tapatalk
[Nexus 6P Android Development] drewski_1:
Yes.
[Nexus 6P Android Development] dr_rick13:
thanks man. Any tips on how to do clean update on PureNexus when I am already F2FS?
[Nexus 6P Android Development] burningcreation:
Exactly what I did. Works perfectly. Thanks Flash!
[Nexus 6P Android Development] AzraelsKiss:
Should be the same as any other clean flash... Except a custom kernel is required, rather than optional.

Have a good one!
[Nexus 6P Android Development] drewski_1:
as has been stated, it's pretty standard.

just make sure that in settings the option for "Use rm -rf instead of formatting" option is checked so you don't accidentally reformat which could put you back to Ext4.
[Nexus 6P Android Development] ZawZaw:
Hi.. [MENTION=6842057]The Flash[/MENTION]

Where source I can build TWRP?

Omni -b 7.1?

Please help me.

This link is right?

https://github.com/omnirom/android

•••
[Nexus 6P Android Development] Grassinator:
5/12 TWRP Recovery Issues

Grand Masta Flash...

1st and foremost I want to thank you for all of your support and AMAZING work you've done for this wonderful device... You have truly made our experience far superior to what it could have been (AKA STOCK)

I have been running your divine Flash kernel (5/1) on Chevy's latest Cortex ROM which has recently integrated F2FS support. Was, without a doubt, the BEST performance and configuration this device has ever seen. I just noticed today that you have updated your kernel and am attempting to clean format and flash this masterpiece but unfortunately have received a 2 day ticket to bootloop city! :rolleyes:

I have attached my TWRP logs and would greatly appreciate any assistance you could provide. Thank you again for all you do!

~Giuseppe
[Nexus 6P Android Development] DEVILOPS 007:
Can I ask, why is your sdcardfs module? Thanks [MENTION=6842057]The Flash[/MENTION]
[Nexus 6P Android Development] nathanchance:
There's a reason I haven't responded to you, I haven't had time.

Use this manifest: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni

Unfortunately neither of those logs help me. I need a full dmesg and logcat. I had no issues with booting f2fs with the latest kernel and neither did a few of my friends.

I don't understand the question and my module thread is probably a better location for this.
[Nexus 6P Android Development] DEVILOPS 007:
Sorry, I meant what is not why is. Stupid autocorrect. I'll check your module page out. Thanks.
[Nexus 6P Android Development] aamadorj:
Just a heads up: there's a new The Flash TWRP for angler at the usual location.. Version number is 3.1.1-9 and date is 20170518.
[Nexus 6P Android Development] ZawZaw:
Thank You very Much Sir. :D

•••
[Nexus 6P Android Development] HikingMoose:
Anyone know why I get this error if I try to flash anything now? Even kernels I just used a day ago are coming up with this error.
[Nexus 6P Android Development] JRJ442:
It looks like you've turned on zip verification in TWRP Settings. Turn it back off.
[Nexus 6P Android Development] opz187:
haha I'm thanking you because it's just f'n funny
[Nexus 6P Android Development] HikingMoose:
I actually did, just to get it to flash. But I figured that wasn't safe. If it was supposed to be off by default, how did it turn itself off? I haven't gone into twrp settings for anything, so I know it wasn't something I changed. I'll leave it off if it's supposed to be, I just thought it might not be safe to turn it off, if it's supposed to be on.
[Nexus 6P Android Development] nathanchance:
You only want to turn that option on if you are flashing a signed package and want to check its integrity (like an OTA update or something). It's safe to have it disabled.
[Nexus 6P Android Development] nathanchance:
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
[Nexus 6P Android Development] nathanchance:
I have uploaded instructions on how to build my TWRP to GitHub: https://github.com/nathanchance/android_device_huawei_angler/blob/android-6.0/README.md
[Nexus 6P Android Development] ZawZaw:
EDIT : Done

•••
[Nexus 6P Android Development] ZawZaw:
Hi...Sir [MENTION=6842057]The Flash[/MENTION],

I built TWRP 3.1.1 with F2FS support from omni minimal source for bullhead using your commits.

Finished.

Therefore, I will proper credit you on my thread. :o

Thanks Sir.

Respect You!

•••
[Nexus 6P Android Development] Lucius1972:
For the ones who didn't notice, there is a new build available 3.1.1.11. You can find it in the usual TWRP download folder of Nathan.
[Nexus 6P Android Development] nativesmiley:
Hello. I would like to know how I would revert back to ext4. Thank you.
[Nexus 6P Android Development] nathanchance:
Same steps to get to F2FS but substitute it with EXT4.
[Nexus 6P Android Development] nativesmiley:
Can I still use the current TWRP in this thread?
[Nexus 6P Android Development] aamadorj:
Yes!!
[Nexus 6P Android Development] nathanchance:
Yes, I use ext4 personally.
[Nexus 6P Android Development] xflowy:
you are not on f2fs?
[Nexus 6P Android Development] DEVILOPS 007:
That's what he said. You are not on xda?