[RECOVERY][All-F2FS] TWRP-2.7.0.0 with All-F2FS support [08/05/14]

legolas93

Senior Member
Jul 13, 2010
644
1,267
0
TWRP-2.7.0.0 with "All-F2FS" support

NOTE: I don't have a Nexus 7 3G to test this. It should work.
I made this because a lot of people asked me. Please report back after you tried it.​

I have modified the standard TWRP recovery to work with F2FS partitions.
This is for "All-F2FS" that mean that /system, /cache and /data are formatted with F2FS.
Keep in mind that this can work only with a compatible kernel and ROM.

What is F2FS?

F2FS (Flash-Friendly File System) is a flash file system created by Kim Jaegeuk at Samsung for the Linux operating system 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.

Download:
  • FormatPartitions.zip: Here
  • TWRP-recovery img: Here

Chagelogs:

- 08/05/14: Initial release

Here are some explanations. Read them

Recovery has the usual red back key to remember you that you are using a F2FS-recovery.
If wiping /system and /cache and making a factory reset from Wipe menu doesn't work, use FormatPartitions.zip. (<- READ THIS)
Instead wiping /data is fine within the wipe menu.

To switch your /system, /cache and /data partitions to F2FS follow instructions:
Keep in mind that you will lose all the files on the memory of your N7.

You need:
- Two files you can download above (img and FormatPartitions.zip)
- A ROM with "All-F2FS" support (Make your ROM with Convert To F2FS)
- GApps (i think you want PlayStore.) Usual GApps. Slim AiO work well.

  • Copy a ROM with "All-F2FS" support to your N7
  • Copy GApps to your N7
  • Copy FormatPartitions.zip to your N7
  • Reboot in bootloader
  • Flash this recovery with Fastboot (Maybe Flashify works too)
  • Reboot in new recovery
  • Flash FormatPartitions.zip
  • Reboot recovery (It's needed for some reasons..)
  • Flash ROM
  • Flash GApps
  • Go to Wipe Menu and Format Data (Not a simple wipe)
  • Reboot
  • Done.

It's easier than it seems :)



To restore partitions to stock:


- Download a standard TWRP
- Download RestorePartitions.zip

Hope i dind't any errors writing this down. I personally tested this procedure.
Enjoy. :D
 

b4b4.4l1

Senior Member
Aug 27, 2012
133
20
48
Medan
Ah, about time. I'm gonna try this right away and report back. I've tested back and forth and f2fs does boosts our tilapia device performance quite a lot(according to the benchmarks results at least :p)
 

Fransis88

Senior Member
Apr 19, 2011
321
45
0
Hello you legolas, first thanks for sharing your wonderful work
I currently use f2fs 2.6.3 with support for data only, which had so far for tilapia.
I have a question to see if you can help me.
this recovery is worth for what we have f2fs only data? or I have to use a rom reformatted partitions in all f2fs?
I also see an app, which it seems the rom install on it, and it alone will reformat all partitions f2fs? is that easy?
thanks

edit:
I already am with f2fs in data, backup would have to do if I convert the data back to the rom "full f2fs"?
 

b4b4.4l1

Senior Member
Aug 27, 2012
133
20
48
Medan
Hello bro. Tried to flash just a moment ago. I got stuck at Google logo, it's not even booting :s

Btw, I also notice cache is unable to be mounted. Any idea bro?

EDIT: My bad, I used the wrong boot image :silly: Now it's working :D
 
Last edited:

Fransis88

Senior Member
Apr 19, 2011
321
45
0
I turned the tablet to f2fs ... and now I do not start the roms not know I had to convert them too. the problem is that now I can not install the restore partition because this new version 2.7.0 of recovery can not mount usb. with the above if I had problems, I had a flash drive prepared with kernels and roms. but not able to mount it. I do not want to use adb to put stock the tablet, you can help me?

Enviado desde mi Nexus 5 mediante Tapatalk
 

Fransis88

Senior Member
Apr 19, 2011
321
45
0
I turned the tablet to f2fs ... and now I do not start the roms not know I had to convert them too. the problem is that now I can not install the restore partition because this new version 2.7.0 of recovery can not mount usb. with the above if I had problems, I had a flash drive prepared with kernels and roms. but not able to mount it. I do not want to use adb to put stock the tablet, you can help me?

Enviado desde mi Nexus 5 mediante Tapatalk
I correct myself. I can mount the pendrive and have already restored the partitions. truth is that the recovery does not mount pendrive well sometimes, and you have to restart the recovery several times till you drop mount the pendrive.
but if it works, but not quite right
 

sudipt123

Senior Member
Apr 27, 2010
96
13
0
Can we use the modified Slimkat ROM for grouper (new kernel) slimkat 3.8 with this recovery?

Sent from my Nexus 7 using XDA Premium HD app
 

aosp

Inactive Recognized Developer
Aug 12, 2010
2,135
4,994
0
Add settings to enable/disable f2fs forcing mode so we can switch on …
…the fly. Force will force all wipe/format calls to use f2fs or ext4 depending on the selection. Also added code to ensure settings are re-written back to internal sd after a super wipe. Also removed fstab code to determine the mode since we now have a setting for it

http://goo.gl/NTamfl

Add code to analyze the fstab to determine whether we are in f2fs mod…
…e or ext4 mode

http://goo.gl/MJXQpE
 
  • Like
Reactions: fantabrothe

xaver54645

Senior Member
Jul 30, 2008
99
12
0
Working very well here :good:

Using SlimKat build 5 official. I flashed the recovery image with Flashify, rebooted into recovery, applied formatpartitions.zip, rebooted again, flashed ROM and Gapps.

I just had to format /data two times and reboot after the first "format" because it said "/data not found".
 

andreapier

Senior Member
Feb 7, 2011
407
161
0
Can someone please post a step-to-step guide on how to get a rooted stock 4.4.3 image with F2FS file system? Or maybe a zip to flash?
Thanks

PS: a link on how to get the job done in very well accepted to!
 

fidoedidoe

Senior Member
Mar 27, 2011
241
125
63
Apologies for being (slightly?) off topic, but the opening page says this is to be used with suitable kernel and ROM. I'm having a hard time trying to find f2fs kernel/rom for my N7 3G (tilapia). Can anyone suggest (or report success with) which tilapia kernel(s) ROMs can be used use (ideally without the need for purchase of "Convert F2FS")...much appreciated.
 
  • Like
Reactions: andreapier

aneto

Senior Member
Oct 24, 2006
85
8
8
Barcelona
questions regarding CM11 and Convert to F2FS

Does Convert to F2FS suppor CM11 for tilapia?
If I use Convert to F2FS the will I need a patched kernel? or does the app just do the job?

Regards
 
  • Like
Reactions: sudipt123

sudipt123

Senior Member
Apr 27, 2010
96
13
0
Can we use the latest TWRP tilapia recovery 2.7.1.0 to format the data, cache and system partitions to f2fs? also after we convert the ROM which kernel can we flash, will the stock kernel work?
 

Loganberry

Member
Mar 3, 2013
37
8
8
Wow. It couldn't be easier.

I used ConvertToF2FS to modify the latest official SlimKat build (5961 at time of writing), and used your modified TWRP to install it on my 2012 Nexus 7 3G ("tilapia"), following your step-by-step instructions in the first post in the order given. It all worked first time.

Thanks! Yesterday my N7 was sluggish with the stock ROM; today it feels like a new device.
 

punshkin

Senior Member
Jan 6, 2010
1,021
257
0
Thank you for the tutorial. I was wondering, is it possible to restore a non-F2FS nandroid backup if i flash a F2FS kernel right after restoring?
 

Balza76

New member
Sep 23, 2012
2
0
0
I used ConvertToF2FS to modify the latest official SlimKat build (5961 at time of writing), and used your modified TWRP to install it on my 2012 Nexus 7 3G ("tilapia"), following your step-by-step instructions in the first post in the order given. It all worked first time.
I've done the same and it works too but now I have some problems with 3G connection: everything is ok with WiFi connections but if I turn off WiFi and try to connect with 3G my Nexus reboots randomly. Sometimes after 2 or 3 minutes, sometimes after 10 but one thing is sure, I cannot use the tablet with 3G on.

Have you experienced something similar? The same happened with "pre-AllF2FS kernel" (Slimkat installed on a Ext4 fs with only data in f2fs format).

I've also tried to install the latest AOKP and Paranoid roms, converted with Convert To F2FS app, but they stuck during first booting animation...

Any help would be really appreciated! Thanks. :good:
 

aneto

Senior Member
Oct 24, 2006
85
8
8
Barcelona
I've done the same and it works too but now I have some problems with 3G connection: everything is ok with WiFi connections but if I turn off WiFi and try to connect with 3G my Nexus reboots randomly. Sometimes after 2 or 3 minutes, sometimes after 10 but one thing is sure, I cannot use the tablet with 3G on.

Have you experienced something similar? The same happened with "pre-AllF2FS kernel" (Slimkat installed on a Ext4 fs with only data in f2fs format).

I've also tried to install the latest AOKP and Paranoid roms, converted with Convert To F2FS app, but they stuck during first booting animation...

Any help would be really appreciated! Thanks. :good:
Me too. After converting CM11 M9 with convert to F2FS, and following all the steps in OP, stuck on bootanimation.
If I flash slimkat converted it works, but no 3G. After compare the update script of Slimkat original and converted i found thos 4 lines changed:

original lines
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/UDA", "/data");
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
format("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");

replaced for:
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/sdhci-tegra.3/by-name/APP");
run_program("/sbin/busybox", "mount", "/system");

Then I download the original CM11 M9 and replaced the 4 lines in update script.

For the kernel, after flash the manually converted rom and GAPPs, then I flash M-Kernel compatible with All-F2FS.

It works for me!