[GUIDE] Convert /data to f2fs with TWRP 2.8.+ [TF700T]

berndblb

Inactive Recognized Contributor
Nov 22, 2012
4,875
2,113
0
Los Angeles, CA
Prerequisites:
  • You need to be on the 10.6.1.14.10 bootloader
  • You need to know how to flash a recovery

Some background reading on f2fs: http://en.wikipedia.org/wiki/F2FS

Step 1:
Backup all your data off the tablet because it will get wiped!
!

Step 2:
Install a recovery that supports conversion to the f2fs file system


You can use the official TWRP 2.8.x from here:
http://forum.xda-developers.com/tra...overy-kang-twrp-tf700t-2-8-x-xarea51-t3049395
Do not use TWRP 2.8.5 - it has a bug with the f2fs conversion - or 2.8.6 for that matter. It has another bug: won't reboot to anything from recovery...

For Transformer users I would highly recommend to install @lj50036 TWRP Kang version from here:
http://forum.xda-developers.com/tra...overy-kang-twrp-tf700t-2-8-x-xarea51-t3049395
His Kang TWRP allows you to format/convert/backup external partitions or entire cards which will come in very handy for data2sd or rom2sd users.
It even supports the dock SD!

Step 3
Flash your chosen recovery in fastboot and reboot.


Optional but recommened
Since you are at it anyway I would recommend you format your /data partition before you convert to f2fs. The TWRP build-in "Format data" option does a "a secure erase" which trims and wipes every single block. A great way to start with a fresh and clean data partition. This process takes time - could be upwards of 60 minutes - do not interrupt it!!! You find the option under the Wipe menu


Step 4:
Enter TWRP, choose Wipe > Advanced Wipe


To Convert INTERNAL /data to f2fs
Check the box for "data"
Tap "change or repair file system"
Tap "Change file system"
Tap "F2FS"
Swipe the button

DATA2SD/ROM2SD users only:
To Convert EXTERNAL /data to f2fs (with lj's Kang TWRP TF700T only - official TWRP does not support this)
Check the box for Ext/data
Proceed as above

Step 5
Go back to TWRP Home screen, and reflash your ROM - which you have stored somewhere you did NOT wipe with the preceding steps!! Like: your microSD ;)


Notes:
  • With /data on f2fs you need to run your ROM with a kernel that supports that file system. Read the OP of your ROM thread
  • Convert ONLY /data to f2fs. Do NOT convert /system (or anything else for that matter)
  • If you forma /data back to ext4 for any reason it will take up to 90 minutes. Do not interrupt it!!!

DATA2SD/ROM2SD ONLY
If you have the official TWRP installed and do not want to flash lj's Kang TWRP, you can - as always - use the data2sd1.zip/rom2sd1zip to have TWRP act on your external partitions.
 
Last edited:

eRPeeX

Senior Member
Jun 14, 2011
1,654
587
143
Convert EXTERNAL /data to f2fs (lj's Kang TWRP TF700T only)
Check the box for Ext/data
Proceed as above

5. Step
Go back to TWRP Home screen, and reflash your ROM - which you have stored somewhere you did NOT wipe with the preceding steps!! ;)
  • reflash your ROM - which you have stored somewhere you did NOT wipe with the preceding steps!!
    --> ??? It must be on external, I presume?

  • Where could it be located? If on external i suppose it is on:
    --> ??? 14. FAT 32 : Size 16GB – this will be /dev/sdc1 in gparted and will be your sdcard for storage in Android
 
Last edited:

berndblb

Inactive Recognized Contributor
Nov 22, 2012
4,875
2,113
0
Los Angeles, CA

  • It's the second partition if you are running data2sd/rom2sd
    data2sd:
    1. partition fat32 = your microSD storage
    2. partition f2fs (or ext4) = /data

    rom2sd
    1. partition fat32 = microSD storage
    2. partition f2fs or ext4 = /data
    3. partition ext4 = /system

    [*]reflash your ROM - which you have stored somewhere you did NOT wipe with the preceding steps!!
    --> ??? It must be on external, I presume?
    The fat32 partition on the microSD (or just plain microSD if you don't run data2sd/rom2sd) is probably the safest place, yes.

    Where could it be located? If on external i suppose it is on:
    --> ??? 14. FAT 32 : Size 16GB – this will be /dev/sdc1 in gparted and will be your sdcard for storage in Android
Yes
 
  • Like
Reactions: eRPeeX

eRPeeX

Senior Member
Jun 14, 2011
1,654
587
143
It's the second partition if you are running data2sd/rom2sd
data2sd:
1. partition fat32 = your microSD storage
2. partition f2fs (or ext4) = /data

rom2sd
1. partition fat32 = microSD storage
2. partition f2fs or ext4 = /data
3. partition ext4 = /system


The fat32 partition on the microSD (or just plain microSD if you don't run data2sd/rom2sd) is probably the safest place, yes.


Yes
So for f2fs you always need a Gparted formatted SD.
f2fs only on internal /Data is not possible?
 

eRPeeX

Senior Member
Jun 14, 2011
1,654
587
143
I just only converted Internal /data to f2fs.
Flashed beta 4.
Seems to be possible to have f2fs only on internal.
 

berndblb

Inactive Recognized Contributor
Nov 22, 2012
4,875
2,113
0
Los Angeles, CA
f2fs only on internal /Data is not possible?
Sure it is. Read step 4
I just only converted Internal /data to f2fs.
Flashed beta 4.
Seems to be possible to have f2fs only on internal.
Where does it say you can't????????????????

Edit: Ahhh! I see where your thinking went off track. You thought you had to convert both internal and external data for f2fs to work, right?
Nope - external data only concerns data2sd/rom2sd users. Edited OP to make that clear - I hope. ;)
 
Last edited:
  • Like
Reactions: eRPeeX

eRPeeX

Senior Member
Jun 14, 2011
1,654
587
143
Where does it say you can't????????????????

Edit: Ahhh! I see where your thinking went off track. You thought you had to convert both internal and external data for f2fs to work, right?
Nope - external data only concerns data2sd/rom2sd users. Edited OP to make that clear - I hope. ;)
Yes, you could read my mind. ;)
 

kenryan

Senior Member
Nov 20, 2012
58
16
0
Just thought I'd share my experience, in case someone else makes the same mistake I did ...

I put the card into my computer and ran gparted to create the partitions. I fiddled with it for a while, resizing partitions while trying to decide how much space to allocate to each and what format to use for /data. I ended up with what graphically looked like the right layout:

I---sdcard---II--------------data--------------II---system---I

The rom2sd install seemed to go fine (Crombi-kk at the time). However I couldn't get it to boot.

Turns out in my fiddling I managed to get the second two partition table entries switched - partition 1 was fine, partition 2 pointed to the rightmost block graphically, parition 3 pointed to the middle block. I don't really know whether it was the installer or TWRP that got confused, or if it installed ok but the boot got confused.

In any case, deleting the partitions and re-creating them in order worked.
 

rdsandy

Member
May 3, 2015
6
0
0
I have Zombi-X on a TF700T. I picked the F2FS option during install but didn't realize I had to have the /data partition formatted to F2FS first. So I'd like to minimize my update time. Can you tell me if this is how to proceed?

I have TWRP 2.8.4.0 already installed,

When you say backup data do you mean do a TWRP backup of the system/data/boot or just the /data section?
Or do you mean copy files to an SD card or PC?

I would then do the "optional" format of the /data partition using the existing data format ext4.

Then choose Wipe > Advanced Wipe

Check the box for "data"
Tap "change or repair file system"
Tap "Change file system"
Tap "F2FS"
Swipe the button

"Go back to TWRP Home screen, and reflash your ROM"

Do I have to do this? I don't want to change anything, the original install had F2FS enabled?

If I do have to do it, do you mean TWRP "restore" the ROM backup (system/boot/data) or actually TWRP
"install" the ROM zip file?

Then I would TWRP "restore" the /data backup and the tablet would work like it did before the reformat or would I have to reinstall apps, photos etc.?

Thanks for your help.
 

berndblb

Inactive Recognized Contributor
Nov 22, 2012
4,875
2,113
0
Los Angeles, CA
The easiest would be if you nandroid system/boot/data to your microSD. You gotta have it off internal storage. Nothing in internal /data will survive a format.
Then do the formatting and convert to f2fs
Restore your nandroid
You may get a warning from TWRP that the nandroid is off a different file system but you can safely ignore it.
Now, I do not quite remember where in Aroma the f2fs option was, but I think it's on that page about data journaling... So I'm not sure what selecting that option in Aroma actually does and if it gets implemented when the preinit script finds an ext4 partition instead.
But you can try it. Just restore the nandroid, pay attention during boot and read the script under the penguins.
If then your nandroid doesn't run as expected, reflash the rom with the same options, then restore only data from the nandroid you made earlier (during restore just uncheck boot and system). That also would give you an identical installation to what you have now.
 
Last edited:
  • Like
Reactions: rdsandy and lj50036

rdsandy

Member
May 3, 2015
6
0
0
The easiest would be if you nandroid system/boot/data to your microSD. You gotta have it off internal storage. Nothing in internal /data will survive a format.
Then do the formatting and convert to f2fs
Restore your nandroid
You may get a warning from TWRP that the nandroid is off a different file system but you can safely ignore it.
Now, I do not quite remember where in Aroma the f2fs option was, but I think it's on that page about data journaling... So I'm not sure what selecting that option in Aroma actually does and if it gets implemented when the preinit script finds an ext4 partition instead.
But you can try it. Just restore the nandroid, pay attention during boot and read the script under the penguins.
If then your nandroid doesn't run as expected, reflash the rom with the same options, then restore only data from the nandroid you made earlier (during restore just uncheck boot and system). That also would give you an identical installation to what you have now.
Perfect, thanks. I will let you know my results. Might be a few days away.
 

kevinthefixer

Senior Member
Oct 26, 2014
288
64
0
IIRC the option is to turn on/off data journaling (one or two "l"s?) on ext2/3/4 partitions, with a final option of "f2fs user" where journalling is unnecessary. But it will not automatically format to f2fs in any case.
 

diver864

Member
Feb 5, 2008
17
2
0
Hello. Yesterday I rebuilt my TF700 from the ground up. My intent was to get to Zombi-Rom with data2sd, to get a performant system. Here's what I did:
- started with twrp 2.8.6.x and Zombi-Rom beta 6, internal data, nice but laggy
- created two partitions on my samsung class 10 microSD card using gparted: 1. FAT32 at approx 4GB, 2. F2FS at approx 24GB
- flashed lj's kang twrp 2.8.6.1 recovery to replace 'standard' twrp 2.8.6.x
- formatted internal data using the kang twrp to f2fs (but it only took a second?) (I think this step was unnecessary, I meant to go to data2sd...)
- i *think* i formatted the new f2fs partition on the ext sdcard again using kang twrp, but don't recall. Rem: it was formatted f2fs by gparted already...I may have assumed I didn't need to do it again.
- flashed Zombi-Pop Android 5.1 beta 6, choosing the only kernel which has _that in the name
-- choosing f2fs
-- choosging data2sd (the ultimate goal of the exercise - get rid of TF700's awful lags/freezes)
-- choosing overclock (said it was required since _that kernel is selected)
-- choosing rest of default options

However I find performance is worse? I am sure I have done something wrong.

I have no data to protect or worry about tryig to restore. Before I do it all over again, do the steps above look correct, or am I making a mistake somewhere?

Thanks in advance.
 
Last edited:

berndblb

Inactive Recognized Contributor
Nov 22, 2012
4,875
2,113
0
Los Angeles, CA
Some people - me among them - have reported that data2sd doesn't work that well with ZOMBi-POP anymore. I do not get any performance improvement out of it with the same card that did well on other roms.
Could also be just your specific card - hard to tell.
I see no mistakes in your procedure but did you at any point do the secure erase the "Format Data" option provides? Read the "Optional but recommended" section in the OP.
Try different kernels. I like the Omni kernel best so far.
So my advice is: format internal data, then convert it to f2fs again, flash the rom with the omni kernel and all tweaks.
My TF700 runs very well with those options but it's still slower than my TF701 or my HTC M8 (there's actually no comparison to the latter..) and it always will be.
This is a what - almost 3 year old device now. These roms improve it by 300% but nothing will turn the TF700 into a smooth-as-silk-under-any-circumstances device....
 
  • Like
Reactions: lj50036

sbdags

Inactive Recognized Contributor
Jun 24, 2007
12,753
15,556
0
Kenilworth, Coventry
Some people - me among them - have reported that data2sd doesn't work that well with ZOMBi-POP anymore. I do not get any performance improvement out of it with the same card that did well on other roms.
Could also be just your specific card - hard to tell.
I see no mistakes in your procedure but did you at any point do the secure erase the "Format Data" option provides? Read the "Optional but recommended" section in the OP.
Try different kernels. I like the Omni kernel best so far.
So my advice is: format internal data, then convert it to f2fs again, flash the rom with the omni kernel and all tweaks.
My TF700 runs very well with those options but it's still slower than my TF701 or my HTC M8 (there's actually no comparison to the latter..) and it always will be.
This is a what - almost 3 year old device now. These roms improve it by 300% but nothing will turn the TF700 into a smooth-as-silk-under-any-circumstances device....
Same here Bernd - I see no improvements with data2sd anymore on zombi-pop.

I think we got internal running as sweet as can be :)
 
  • Like
Reactions: lj50036

diver864

Member
Feb 5, 2008
17
2
0
Bernd and dags,

thanks for the input, and again for all the great work to get it running the way you and your teammates have. Wish I had your know-how. At any rate I re-built it as originally posted and it's now working well. Backed that up and am trying it on internal today.
 

diver864

Member
Feb 5, 2008
17
2
0
One more, maybe trivial question - the version of Nova Launcher says 'mod'. I can't install any other wallpaper with it. (I use Nova all the time, never seen this before.) Do you know if there something in the mod that makes it the default zombi-rom wallpaper or nothing?