[Guide] Converting ANY ROM to All-F2FS Partitions - Working ROM list Included!

ronedogg

Senior Member
Nov 3, 2012
307
57
0
This is my first guide so if I left something out please tell me.

I do not take any credit for any of this work. I just read in a thread how another user did it. I tried it and it worked.

This isn't nessassarily the right way to do this but this is what I did, and all don't from my nexus 7.
I've only tried it on slimkat. I'm going to be testing more ROMs today.

Thanks to
Legolas93
Slimroms.net
ryanrudolf

Things you will need:
A file explorer (I use solid explorer)
Zip app to extract and compress ( included in solid explorer)
Modified TWRP recovery from this post.

1. Download the latest weekly build of Slimkat. http://slimroms.net and extract the zip file to a folder.

2. Next either download the last build from legolass of slimkat here and extract it to its own folder or download attached boot.IMG and updater-script. (Only 2 files that I found that needed to be updated.)

3. If you just decided to download the attached files, extract the archive and inside you will find 2 files. Copy boot.IMG into the root of latest slimkat that you already extracted, overwriting when prompted. Next copy updater-script to./META-INF/Com/Google/android. overwriting when prompted.

If you didn't download the files from the post and choose to do this manually. Just follow above directions and get the files from the latest slimkat f2fs. Same directories.

4. Now its time to zip up the archive so we can flash it. Zip the files so the root of the archive is the same as the one you extracted. Meta-inf, system, Boot.IMG and file_contexts.

5. Flash in twrp.

B]List of working roms.[/B]

Liquid Smooth
Slimkat
CyanogenMod (with method below)

Tested but not fully working.

Paranoid

Method for CM By ryanrudolf

CM Nightly with All-F2FS (Unofficial Method)

1. download latest CM nightly (here is link for CM Nightly already modified for ALL-F2FS http://d-h.st/9By )
2. download faux025 kernel.zip
3. open CM nightly zipfile, extract the boot.img
4. open faux025 zipfile, extract the zImage
5. unpack the boot.img in step3
6. replace the zImage in step5 with faux025 zImage (step4)
7. replace fstab.grouper with this one -


# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK


/dev/block/platform/sdhci-tegra.3/by-name/APP /system f2fs ro,noatime,nosuid,nodev,discard,nodiratime,inline_ xattr,errors=recover wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xat tr,errors=recover wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xat tr,errors=recover wait,nonremovable,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MDA
/dev/block/platform/sdhci-tegra.3/by-name/MSC /misc emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/LNX /boot emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/SOS /recovery emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/USP /staging emmc defaults defaults

/devices/platform/tegra-ehci auto vfat defaults voldmanaged=usbdisk:auto


8. repack boot.img. place it back in the CM nightly zipfile
9. on the CM nightly zipfile, edit updater script and look for these 3 lines -

mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
replace it with
run_program("/sbin/busybox", "mount", "/system");


and these lines too -
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");
replace with -
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/sdhci-tegra.3/by-name/APP");
run_program("/sbin/busybox", "mount", "/system");

10. save the updater script and put it back to the zipfile. CM nightly zipfile is complete and ready for flashing.
11. flash modded twrp with f2fs support. also download the formatpartitions.zip (credits to legolas http://forum.xda-developers.com/show....php?t=2678140)
12. boot to the modified twrp, flash the formatpartitions.zip. reboot back to recovery
13. flash the modified CM nightly zipfile
14. flash gapps.zip (i use slimroms minimal gapps)
15. Wipe > Format Data > yes
16. reboot
17. enjoy!


NOTE - everything is CM ramdisk, except for the fstab.grouper. If I use the original CM fstab.grouper and just edit to f2fs, it does not work.

Credits -
Legolas for the modified TWRP with F2FS
Faux for faux025 kernel with F2FS support
CM for the CM Nightlies
SlimRoms for the minimal gapps



[
 

Attachments

Last edited:

SkOrPn

Senior Member
Jun 3, 2007
2,934
933
193
Albuquerque, NM
www.planetamd64.com
Thanks again. I will give this a try very soon. Glad someone figured out what these devs are doing. I hope others will come in here and share even more information. :good:

EDIT: So, you managed to do all of this on your device? Wow nice work.
 
Last edited:

ronedogg

Senior Member
Nov 3, 2012
307
57
0
Thanks again. I will give this a try very soon. Glad someone figured out what these devs are doing. I hope others will come in here and share even more information. :good:

EDIT: So, you managed to do all of this on your device? Wow nice work.
Ryanrudolf in the all f2fs slimkat thread said what files he changed. I just followed his direction.
And yes I did all this from my n7.

No problem I'm glad I could contribute.

Sent from my Nexus 7 using XDA Premium HD app
 
Last edited:

ronedogg

Senior Member
Nov 3, 2012
307
57
0
Any ROMs u want me to test? I'm about to try paranoid 4.2 beta 2 (latest)

For all the other ROMs I'm going to remove the slimroms text that scrolls in twrp when installing. I'll update the op with unbranded updater file so they can try it on other ROMs and not get confused lol.

Sent from my Nexus 7 using XDA Premium HD app
 

SkOrPn

Senior Member
Jun 3, 2007
2,934
933
193
Albuquerque, NM
www.planetamd64.com
Any ROMs u want me to test? I'm about to try paranoid 4.2 beta 2 (latest)

For all the other ROMs I'm going to remove the slimroms text that scrolls in twrp when installing. I'll update the op with unbranded updater file so they can try it on other ROMs and not get confused lol.

Sent from my Nexus 7 using XDA Premium HD app
Yeah that would have been great, but the dev on my preferred ROM is already working himself to figure it out. I'm probably going to be testing his latest build here soon. I just want to know what you guys did so that next week, when I want to try another ROM I will have a larger menu to choose from ;)

If you want to mess around and test several ROM's I suggest you try AOSPAL SaberDroid in your list. There will be a new build here soon, maybe today I think.
 
  • Like
Reactions: ronedogg

carlo93

Senior Member
Jun 9, 2011
419
289
93
Hi there,
since i like cyanogenmod, i tried to apply your 'patch' to a cm build. (i just replaced some rows in the updater-script and replaced boot.img in the zip file)
It worked, since the rom booted up but it costantly throws 'Unfortunately, the process com.android.phone has stopped'...

I (hardly) managed to enable developer settings, adb and check mount command output (just to be sure that system, data and cache were mounted in f2fs) and they actually are f2fs.

I guess that com.android.phone message is a kernel related issue.
 
Last edited:

SkOrPn

Senior Member
Jun 3, 2007
2,934
933
193
Albuquerque, NM
www.planetamd64.com
Hi there,
since i like cyanogenmod, i tried to apply your 'patch' to a cm build.
It worked, since the rom booted up but it costantly throws 'Unfortunately, the process com.android.phone has stopped'...

I (hardly) managed to enable developer settings, adb and check mount command output (just to be sure that system, data and cache were mounted in f2fs) and they actually are f2fs.

I guess that com.android.phone message is a kernel related issue (i replaced boot.img with the one you attached).
That is a known issue with CM, not this mod. I get that same FC when I use CM11. Its not there on Slim, or Omni or AOSPAL, using the same mod.
 
Last edited:

ronedogg

Senior Member
Nov 3, 2012
307
57
0
Hi there,
since i like cyanogenmod, i tried to apply your 'patch' to a cm build.
It worked, since the rom booted up but it costantly throws 'Unfortunately, the process com.android.phone has stopped'...

I (hardly) managed to enable developer settings, adb and check mount command output (just to be sure that system, data and cache were mounted in f2fs) and they actually are f2fs.

I guess that com.android.phone message is a kernel related issue (i replaced boot.img with the one you attached).

Hmmm. I tried paranoid and got the same result but was keyboard throwing up error....

In the all f2fs slimkat thread another user said he tried cyanogen as well and got same error. Maybe this is just for slimkat, I thought we might have gotten lucky.

I'm going to try to compare the updater scripts for cm and pa with the slimkat script. See if there is something obvious we can change.
 

ronedogg

Senior Member
Nov 3, 2012
307
57
0
Actually I take that back, I never tried straight PA, just modified versions of it. I only get that message with CM11.
looking at comparing files now.

in cm latest nightly there is a line of code refering to f2fs already.

symlink("../bin/fsck.f2fs", "/system/bin/dump.f2fs");

not sure what that is.

im gonna upload a updated version of the script for cm. Using notepad ++ and compare plugin, should have something shortly that i can test.
 

ronedogg

Senior Member
Nov 3, 2012
307
57
0
after some testing I got paranoid to install. but when i install gapps package all kinds of errors get thrown up....

waaay over my head there. ill try again later tonight see what I can come up with. i might be close... I might be waaay off.

maybe someone will see this thread and give me some pointers.
 

SkOrPn

Senior Member
Jun 3, 2007
2,934
933
193
Albuquerque, NM
www.planetamd64.com
after some testing I got paranoid to install. but when i install gapps package all kinds of errors get thrown up....

waaay over my head there. ill try again later tonight see what I can come up with. i might be close... I might be waaay off.

maybe someone will see this thread and give me some pointers.
Haha, that's how I felt the weekend before last when I spent 20 straight hours trying to figure this out.
 

CptKlink

Senior Member
Aug 14, 2011
141
57
0
Edmonton
I have seen a few people ask for this so i'm going to try and edit the SlimRoms SlimBean 4.3.1 version of there rom to see if i can get this working on 4.3.1 Jelly Bean Roms.

I have already edited the fstab file in the SlimBean 4.3.1 kernel/boot.img and have already edited the updater script now just doing a backup of important stuff and going to give it a try
 
  • Like
Reactions: ronedogg and SkOrPn

SkOrPn

Senior Member
Jun 3, 2007
2,934
933
193
Albuquerque, NM
www.planetamd64.com
I have seen a few people ask for this so i'm going to try and edit the SlimRoms SlimBean 4.3.1 version of there rom to see if i can get this working on 4.3.1 Jelly Bean Roms.

I have already edited the fstab file in the SlimBean 4.3.1 kernel/boot.img and have already edited the updater script now just doing a backup of important stuff and going to give it a try
Good luck. :good:
 

ryanrudolf

Senior Member
Nov 12, 2012
263
148
0
Hi there,
since i like cyanogenmod, i tried to apply your 'patch' to a cm build. (i just replaced some rows in the updater-script and replaced boot.img in the zip file)
It worked, since the rom booted up but it costantly throws 'Unfortunately, the process com.android.phone has stopped'...

I (hardly) managed to enable developer settings, adb and check mount command output (just to be sure that system, data and cache were mounted in f2fs) and they actually are f2fs.

I guess that com.android.phone message is a kernel related issue.
same i got that error too on the latest nightly of CM.

will try more on weekend

Sent from my C6503 using Tapatalk