[Nexus 7 Developer Discussion [Developers Only]] ss2man44:
Back story:

I bought a Moto X during the $100 off promotion and while I was waiting for it to be delivered, I read reviews and poked around online for interesting things about the phone. As an 8GB Nexus 7 owner, the one thing that caught my eye the most was this section of the Anandtech review discussing internal storage performance. Considering how badly my N7's storage performance degraded and how unbearably slow it has become, I felt like it could make good use of this "flash friendly file system." Some Googling revealed that the F2FS driver was developed by Samsung and actually contributed to the official kernel, where it was implemented somewhere around 3.8. I've done some development for an HTC phone in the past, but never for the Nexus 7, so I went and researched the kernel. Because Google's Tegra 3 kernel is based on 3.1, I had to start working on backporting the driver, when I discovered this repository of backports for F2FS. It provides patches for 3.0 and 3.2, but not for 3.1, so I manually applied appropriate changes from each. When I flashed the kernel and booted, it seemed to work, so I went ahead and injected the kernel into the latest TWRP image as well. I also modified the fstab for both the recovery and ROM and compiled Cyanogenmod's f2fs-tools for Android and statically linked them before injecting them into TWRP as well. I then booted into recovery, formatted /data (TWRP knew to use mkfs.f2fs), and booted back into Android. Success, it worked! I've been using my Nexus 7 like this since Friday evening and it's been so much more usable. Not perfectly "like-new" smooth, but it doesn't hang as often or as long.

I haven't seen anyone actually try this yet so I'm hoping my effort will be able to make a difference for N7 owners fed up with slow performance. Switching to f2fs is as easy as flashing a modified kernel and recovery, then doing a factory reset. Also, any interested developer is more than welcome to use anything I post here.

Basically, I took the official Tegra 3 kernel and did this:

KERNEL PATCH

Then modified the stock ROM's fstab like this:

FSTAB

Then I gave TWRP statically-linked f2fs-tools binaries:

F2FS-TOOLS

Then I reformatted /data and away it went:

I'm going to reboot into Linux and attach my boot/TWRP images for you guys to test out. Until then, I'd love to have some feedback.

What do you think about using f2fs on the Nexus 7?

Is it worth it?

What kind of impact on performance or battery life do you think this will have?

Did I do something seriously wrong with my kernel/fstab?

Am I absolutely insane and dangerous to everyone's Nexus 7 tablets and their puppies?

Image Downloads

Android File Host | Google Drive

Instructions:

WARNING: This process obviously will wipe your data. Make a NANDroid backup beforehand and save it to your computer. While I personally use this, I take no responsibility for damage done to your device.

Flash boot and recovery like usual:

$ fastboot flash boot boot-F2FS.img
$ fastboot flash recovery openrecovery-twrp-2.6.3.1-grouper-F2FS.img

Format Data in TWRP

Reboot

Done!

Note that these are for the latest official 4.4.2 build KOT49H.

Let me know how your performance and battery life change after applying this. Storage performance should noticeably increase and battery life change should be negligible.