yashsingh1/xdaforums huggingface dataset:
[Nexus 6  General] elkay:
This isn't the "half storage missing" problem where a 64GB phone is seen as 32GB. It looks like I'm missing about 13GB on my 64GB. I had that missing 32GB problem the first time I went to unencrypted. This looks like something different. I think the filesystem just needs to be able to do a repair, but it can't. That fsck.f2fs won't execute for me.

Edit:

The original uncopied fsck.f2fs works:

/sbin # ←[6nfsck.f2fs /dev/block/mmcblk0p42

fsck.f2fs /dev/block/mmcblk0p42

Info: sector size = 512

Info: total sectors = 116702976 (in 512bytes)

[FSCK] Unreachable nat entries [Ok..] [0x0]

[FSCK] SIT valid block bitmap checking [Ok..]

[FSCK] Hard link checking for regular file [Ok..] [0x0]

[FSCK] valid_block_count matching with CP [Ok..] [0x90d4da]

[FSCK] valid_node_count matcing with CP (de lookup) [Ok..] [0x11335]

[FSCK] valid_node_count matcing with CP (nat lookup) [Ok..] [0x11335]

[FSCK] valid_inode_count matched with CP [Ok..] [0x7d9f]

Done.
[Nexus 6  General] DontPushButtons:
Formatting data as f2fs will format the entire userdata partition. You'll want to copy those Titanium Backup backups onto your computer before you format data.

Sorry if I'm late to this rodeo, just don't want you wiping out your storage before backing it up.
[Nexus 6  General] elkay:
Well, the file system is sound. I have something that ate a $%*^$ ton of my space, though. /data/ is showing 39GB used, even though I can't account for more than ~25GB of it. I'm going to have to go through folder by folder and see wtf happened.
[Nexus 6  General] gannjunior:
Hi,

I did everything, and it seems has gone fine.

But how can I check if it is really faster?

In the normal use nothing seems to be changed....

....tried androbench and it is slow like before to change xt4 into f2s: sequential read 73mb/s, seq. write 40mb, random read 17mb, random 15mb....
[Nexus 6  General] billycar11:
i think you are still encrypted with speeds like that for reads you should see 200+ and for writes 70+ when not encrypted and that's being conservative.
[Nexus 6  General] bbedward:
Could depend on the kernels version of f2fs. Some of the benchmarks you've seen with 5x faster writes are certainly inaccurate.

Also if the kernel/ramdisk doesn't mount with the nobarrier option (ext4 does by default on /data) then all the tests will be slower from what I've seen
[Nexus 6  General] gannjunior:
Hi

how can I check or set the "encryption" or the "no barrier option" ?

Thanks!
[Nexus 6  General] billycar11:
wipe data and internal storage and have a kernel with no forced encryption or flash this http://xdaforums.com/nexus-6/development/mod-disable-force-encryption-rom-kernel-t3000788 if you have a kernel with forced encryption or if you want stock kernel use this http://xdaforums.com/nexus-6/development/disable-forced-encryption-gain-root-t2946715
[Nexus 6  General] confanet:
Hi guys,

Just only one question about the procedure. Should I convert only data and cache? System has not to be converted if I have understood well, right?

Thanks
[Nexus 6  General] purian23:
Correct, just data/cache at this time.
[Nexus 6  General] Nickchapstick:
Was that sarcasm?
[Nexus 6  General] info[]box1:
Of course not, I always seen the term floating around. Didn't have any idea or clue what it was or did. (Pros or Cons) I meant that literally. That one reason I dislike texting, words can easily get misconstrued and cause a major misunderstandings (in personal life).

Carry on..

Edit: I don't use sarcasm as a dart, I just get extremely disrespectful and unruly. I am a adult so I am transparent and clear.
[Nexus 6  General] Nickchapstick:
Oh no I didn't misunderstand, I just meant there's not really any info on the difference. Or what it is.
[Nexus 6  General] info[]box1:
I meant the thread was well needed at least for me. And other users in the Nexus 6 community that different know what benefits it had. Also how to efficiently use it and or activate it. Etc etc

These kernel now a days comes with so many features. I haven't fully got a grip on ext4 yet. I remember when BFS jumped on the screen with mathkid95 kernels on my galaxy nexus.

No worries...

Carry on, I am subscribed to the thread and reading.

---------- Post added 9th May 2015 at 12:08 AM ---------- Previous post was 8th May 2015 at 11:59 PM ----------

@Nickchapstick

At least the thanks button for the OP.. Since you going to bat about an 8 word reply on page 1, that clearly [MENTION=1481114]purian23[/MENTION] [MENTION=2632235]bbedward[/MENTION] saw no issue or negative pont indeed with.. Now that I think about it. Shhh.. If your not part of the development team or donation supporter.. Fall back solider.!!
[Nexus 6  General] bbedward:
I didn't see a clear explanation on how to do it anywhere, so I made one. I told people how to do it correctly and that's it. I didn't comment on what the best file system is it how much better it is. That's for you to find out if you're daring to follow the instructions I provided.

I mean, if that's the information you want me to provide than maybe you can tell me your preferred brand of formula (gerber, similac, enfamil?)
[Nexus 6  General] Nickchapstick:
I didn't say your post lacked information that was promised. I didnt say you were obligated to give us the information as to everything about F2FS. what I did say is that your post it didn't have the information the other guy thanked you for. So I was pointing out that he was very appreciative but about something that was not provided to him. Has nothing to do with you Mr OP. And that is my point which was apparently missed.
[Nexus 6  General] info[]box1:
I use his Zen kernel as a daily driver. So I follow his thread religiously and he linked us Zen kernel user to this thread to give more insight of a new feature. A feature that's new to a lot of us. So came over to say thank and show my support. **You clearly apparently missed my intention on my reply. And became an alleged offender whom you intended to sentence a verdict on. Let be friends first before firing a arrow at me. I'm cool as ice water, ask around. Many will inform you of my resolve and character.
[Nexus 6  General] Nickchapstick:
I've really lost interest. Have a nice day. BTW while doing all this I did the steps and shall let you know how this helps my phone. I appreciate the time put into making g a post that I'm sure will benefit a lot of people. Here's to the future of Android.
[Nexus 6  General] bbedward:
I'm all about helping anybody and everybody in the community. As well as anybody interested in making their own project for the community. Both of those are well documented.

Most people here don't know his to get the f2fs tools any ROM or switch to it. Someone asked me, so I decided to make an easy guide for all the curious people who want to try f2fs.

Anybody with constructive suggestions to improve the guide I'm fine with, but anything of "oh he didn't provide this information" "he didn't post any test results" "he should add this information it isn't really clear" I'm going to take offense to and that's all there is to it.

I have my kernel that I openly help community members understand issues with or help then with any concerns. As well as helping other developers clearly understand what I'm doing through a drastically different git management setup as well as directly answering questions and pointing out suggestions. I have two guides for the community , one to disable forced encryption and this one to setup f2fs correctly.

I admit this one and the encryption one get neglected a bit, but I provide all information that's required to accomplish such tasks.

I don't know if f2fs is going to make your phone better or worse, I don't know numerically how much faster disabling encryption will make your phone, nor can I tell you that -zen kernel is the best thing for the device (I think it is of course). I can only do so much in given people information, products, etc. It's up to them to do their research and figure out what's best.
[Nexus 6  General] info[]box1:
I read the instructions every other day or so. I haven't fully got a comfortable degree to it yet. That's how I am more cautious then curious. Once I feel it imma go for it and execute the convert to F2FS. I like that the fact the post 1 of the thread is here and I read it over and over. Study it, till I'm confident.
[Nexus 6  General] brando56894:
Its really not that big of a deal buddy hahaha When you flash a ROM in TWRP just go into the wipe menu, select "change FS", and then select cache and data and then select F2FS, flash the ROM and a kernel that supports it, then boot up! The binaries should be installed since they check the filesystem but I keep forgetting to install them and it still works fine.

---------- Post added at 02:13 PM ---------- Previous post was at 01:50 PM ----------

I'm using the MultiROM version of TWRP so I have the tools available but I booted into CleanROM and I just noticed that I don't have the binaries under /sbin, I was also thinking that it would be a good idea to make a zip of these that people could flash after installing a ROM.
[Nexus 6  General] Ferenczy68:
I just used these same directions to convert my d2spr to F2FS, the only change made was using the correct recovery for it. Easy Peasy Lemon Squeezy, thanks OP :)
[Nexus 6  General] ars2015:
Hi,

I am trying to use f2fs in Android M. I have used Zen kernel. For lollipop, the zen kernel and Zen boot image works fine. But with Android M, when I boot up, I get to see the animation only. I have followed each and every step in recovery for f2fs conversion of the partitions. Is this zen kernel and its boot image for f2fs has any dependency on the System.img that I am using for android M? Also, I tried doing the same thing with the nexus 6 kernel available in the google site., but it never worked for f2fs... atleast with zen kernel, I get to see the animation. Is there any boot img for Android M, which works with zen kernel.
[Nexus 6  General] scryan:
The boot image basically is the kernel. And until someone shows otherwise... I really doubt you can use an LP kernel for M.
[Nexus 6  General] Scary Guy:
I know this is old but I wanted to share sine I just got a Nexus 6. I tried the official TWRP and didn't see any F2FS support. I flashed this without issues and am running Beanstalk 7.1. Can't see any problems so far. Thanks!
[Nexus 6  General] ozzmanj1:
I was about to look into this for nitro rom
[Nexus 6  General] TheArkive:
I've tried this with Nitrogen OS and Flash Kernel (1.4 at the time and F2FS compliant) and [url="http://xdaforums.com/nexus-6/themes-apps/recovery-twrp-3-0-f2fs-multirom-t3313292&sa=U&ved=0ahUKEwjE2YGFh-fQAhUCzRQKHXj1BxYQFggLMAA&usg=AFQjCNFu9oQaunbeeSoNwc3rLbtdnp5NHw]TWRP 3.0.0-0[/url] (modded with F2FS found this under Nexus 6 apps & themes). I can verify that all the way through install of my Zips (ROM, kernel, other mods) my F2FS in /data and /cache is maintained up until boot.

F2FS tools are found with my chosen version of TWRP so the adb commands in the OP do work as well...

After first boot on clean install its automatically put back to ext4, according to adb after first boot... or is simply mounted as ext4??

I've read that "the ROM must support it" and though this thread seems to approach this topic from a ROM-independent perspective... So I'm hoping I'm closer than I realize...

I checked my fstab and saw that /data and /cache are listed with ext4 and f2fs entries. The ext4 entries are listed first in both cases. Does this explain the apparent automatic conversion back to ext4?

Does it make sense to copy over fstab with ext4 lines for /data and /cache commented out?

Edit: Lastly, your instructions don't mention the installing of chosen rom... Many roms come with their own kernel. I imagine installing of rom would come first and then custom kernel with F2FS? Did I guess that right?

I know how to backup my stuff and I'm a clean install nazi... So my only issue is getting f2fs to stick after clean install > boot.

Edit2: Oh, I think your steps are for after installing chosen ROM?
[Nexus 6  General] bbedward:
IIRC it doesn't matter having both lines in the fstab, it will mount the correct one regardless.

Where you're having an issue is likely with the f2fs tools. If fsck.f2fs is missing/invalid/wrong then it will revert back to ext4.

Also - not only do the f2fs tools have to be present and executable, they have to be the correct version. So if you mkfs.f2fs with version 1.0 for example, then fsck has to be the same version - 1.0.

In the instructions I just have it get copied over from the recovery which should avoid that issue - unless of course the recovery is missing the fsck in the first place or it is compiled from a different version than the mkfs program (more likely the former since they're compiled as a bundle).

The f2fs kernel driver is also a factor depending on what stock/custom kernel there is there could be an incompatibility between driver and tools - typically backwards compatibility is OK. Forward compatibility is not.
[Nexus 6  General] bbedward:
I don't know the details whether or not disk format has changed in f2fs or what versions that has happened if any. Usually happens in the early days of a filesystems life. Stock N6 kernel has an early version of f2fs
[Nexus 6  General] TheArkive:
[MENTION=2632235]bbedward[/MENTION]

would you mind if I make my own post for an f2fs "how to" and reference your post?

I've found a combination that works with a recovery + kernel + rom (finally) after several failed attempts. I was going to post it here but with all the research I've done it feels appropriate to make another thread and to summarize (and have updated links to a combination of rom + kernel + recovery that works).

is that ok with you?

---------- Post added at 02:15 AM ---------- Previous post was at 02:14 AM ----------

yah ... and that bit you just mentioned about the different versions being a show-stopper..... that is probably what I was running into with Nitrogen OS + Flash Kernel...
[Nexus 6  General] bbedward:
Go for it.

Maybe include a bit that makes it compatible with any ROM. I believe the only change needed is in fstab
[Nexus 6  General] TheArkive:
[MENTION=2632235]bbedward[/MENTION]

haha ... actually, "compatible with any rom" doesn't seem to be possible with my knowledge ... I haven't found the exact issue yet, but Nitro OS + Flash Kernel didn't work for me at all, and my fstab looks the same except for:

- the one that works has this line:

/devices/*/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usb:auto

- the other one has this line:

*block/sda* auto auto defaults voldmanaged=usbdisk:auto,noemulatedsd

Edit: This one difference doesn't seem to account for NOT reverting /cache and /data back to ext4. I'm stumped as to what ties the two together...

Maybe I'll send you my research first?? It'll be what I was going to post....

I did manage to get Nitro OS + MagiKernel though ... no apparent reason for the success though, but it is very reproducible.

EDIT2: I'll go ahead and post my findings and hopefully we'll be able to add the missing pieces together...
[Nexus 6  General] TheArkive:
[MENTION=2632235]bbedward[/MENTION]

Found my next step and first hurdle all in one...

My main goal is to get Flash Kernel running with Nitrogen OS 2016-11-19 (Android 7.1). The Flash has already said that he had no issues with getting crDroid to boot up with /cache and /data as F2FS with his kernel on crDroid (though he hasn't mentioned what recovery he uses). I wonder... can I copy mkfs.f2fs & fsck.f2fs from crDroid and overwrite any given f2fs tools in a recovery (in /sbin/) that already has them? And then copy those files to /system/bin/ (and of course chmod a+x on both inscances)?????

I've already tried this once, no dice so far... but i didn't actually do chmod 755 either so I wonder if maybe I should at least try that first (and that will be my next experiment)...

Is that logic at all feasible? Or is implementing f2fs tools in a recovery a bit more complicated?
[Nexus 6  General] bbedward:
That would work fine as long as /sbin is writable in the recovery.
[Nexus 6  General] TheArkive:
How would I know if it is or isn't? And if it isn't, how can I make it so?

heh... really not trying to ask too much... just following the bread crumbs :D

Edit: I used adb to copy the tools over... no other msgs, so it looked like it worked... but got a soft brick... trying again from stock...

EDIT2: Can I check version of f2fs tools on adb???
[Nexus 6  General] bbedward:
It would probably give an error if it didn't write successfully. You can do a quick and dirty verify the timestamp of the file or check /proc/mounts to make sure / (or /sbin if it's there) is writable.

It's been awhile since I've had my Nexus 6 now...but afaik my steps were pretty bullet proof as long as the fstab had an f2fs line (and the kernel supported it of course)
[Nexus 6  General] TheArkive:
Thanks! Making good headway!

BTW... as far as I can see your steps are bullet proof, but finding a match of kernel and recovery is the trick... very very tricky in fact... especially with the new updated nougat releases, etc...

I've managed to delete the f2fs tools from /sbin/ ... so far so good, i'm going to copy crDroid's f2fs tools over, chmod 755, then try again with all the converting and stuff... *whew* ... pulse running high!

EDIT: I'm hoping my soft brick was a result of having formatted to f2fs using earlier tools, then booting up with later tools (fingers crossed) ... trying conversion again... the copy to /sbin/ worked!

---------- Post added at 05:42 AM ---------- Previous post was at 05:36 AM ----------

Ok next herdle:

mkfs.f2fs -t 0 /dev/block/mmcblk0p38 process ended with ERROR: 134
Unable to wipe Cache.
Error chainging file system.

So dang close... and now looking up error 134...

EDIT2: silly me ... just had to reboot into recovery again to allow the new tools to take effect.... oy .... thanks for tolerating my silly!

EDIT3: ok... now the timestamp is showing July 8, so I'm trying something else... may not be the right version... ugh... looks like recovery noticed an intruder and overwrote the tools...

EDIT4: ok... yah, the recovery is reverting to older files. the ones I copy over don't stay... so now I'm trying to find where they are copied from...
[Nexus 6  General] TheArkive:
[MENTION=2632235]bbedward[/MENTION]

Just for documenting sake... TheFlash mentioned he used the same recovery as I did, which would imply a version mismatch between his kernel and the chosen recovery solution. Yet when he loaded up crDroid the f2fs partition wasn't converted back to ext4. This doesn't follow the logic in your thread, nor what i experienced with MagiKernel and TWRP 3.0.2-0 by xanaxdroid with Nitrogen OS.

Any ideas?

I flashed crDroid just to extract the f2fs tools. I then tried flashing Nitrogen OS and Flash Kernel then copying over the required f2fs tools to /system/bin/ and set perms. I noticed one odd thing...

Nitrogen OS seems to have fsck.f2fs and make_f2fs, but not mkfs.f2fs

I haven't found much info on "make_f2fs". Is this an older tool?

If the kernel support and rom have the same version of f2fs tools would the recovery need to have the same version just to format /cache and /data to f2fs?
[Nexus 6  General] TheArkive:
[MENTION=2632235]bbedward[/MENTION]

I take it the kernel driver is usually part of a custom kernel? And must be the same or earlier version than the tools?

If you have time, any feedback on my last post would be much appreciated!
[Nexus 6  General] forgottenhacker:
Im really confused so do we push fsck.f2fs and mkfs.f2fs manually or is that done automatically when you switch to f2fs. Does the latest version of Multirom v33 support f2fs tools. Planning to switch today, i noticed that the f2fs option is available in change fs tab.
[Nexus 6  General] TheArkive:
As I understand it, when using a ROM that doesn't have f2fs tools built in, you must manually push the f2fs tools.

This won't guarantee f2fs functionality though. The f2fs support in the kernel (driver) must also be present and compatible with the tools.

Getting the right version of tools and finding the right kernel is the trick...
[Nexus 6  General] TheArkive:
[MENTION=2632235]bbedward[/MENTION]

Earlier you mentioned "a change in fstab to make it compatible with any rom". Which change were you referring to?

Flash Kernel does modify fstab. The lines it adds I think were identical to the lines MagiKernel added. I'll have to double check though.

Just wondering if there was a particular property or setting you had in mind for the fstab lines.
[Nexus 6  General] forgottenhacker:
....What kernel are you guys using I'm on PureNexunls Currently on Android n, I have attempted to switch to f2fs last night and screwed up somewhere since these instructions were written in 2015 and the downloads and kernels are outdated...Help?
[Nexus 6  General] TheArkive:
First things first:

- Did you make a backup?

- Do you know how to go back to your previous configuration?

- Can you get your phone working again at all, or are you dead in the water?

The answers to these questions will change the help you get to be more specific ;)
[Nexus 6  General] forgottenhacker:
ayy sorry man, I ended up restoring to factory and then flashing my stuff the way it was before i screwed around with it, pardon my tpos as i only have one functioning hand for now...Back to when f2fs was my thing,Phone boots but acts really jumpy and when i boot back to twrp it then shows up as ext4, but i know that something not right as it feels different. Loss of files after flashing, multiple bootloops when trying to flash rom. I don't know what to say at this point, I can try again but I will end up where i was before. Previously what happened is that the kernel I was using (FLASH) always put me into a bootloop unless i booted into rom then flashed it, but now the dev (i think) has fixed the issue...can you please provide your setup (rom/twrp/kernel) so I can see where I might have screwed up.