yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] michael_ch:
At least with CyanogenMod, this is not a problem.

Have a look at the code:

mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata", "/data");
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/otasigcheck.sh");
sha1_check(read_file("/tmp/releasekey"),"7241e92725436afc79389d4fc2333a2aa8c20230") && abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");

What is happening? The installer will try to mount /data and run a script in-between. However, if that doesn't work, the installer continues without any harm. I have verified this (Maguro, /data on F2FS, /system on Ext4) and it's working.

Of course you will need to flash a kernel which supports F2FS after the upgrade (e.g. Fancy Kernel), but the procedure works with the original CM nightly zips.
[Samsung Galaxy Nexus] poo706:
Maybe I'm wrong then. I just know that when I first created my converter tool, I didn't have any code in it that looked for /data being mounted. Soon people started to report that they would get a Google logo bootloop using my converter on Slimkat and Vanir. So I looked at them specifically to see what was different and discovered the /data mounting. At that point I added the code to address /data and then those having issues said all was well again. If this is no longer an issue, I'm baffled as to why.

[poo]
[Samsung Galaxy Nexus] RoadToNever:
How do you deal with lack of MTP in recovery beside ADB commands?
[Samsung Galaxy Nexus] kerpert:
Hi all, I'm converting my Galaxy Nexus to F2FS, this is my first time with this new fs.

I don't understand if normal ADB, installed with Google SDK, can be used for this or if I need one modified.

I'm refering to that ADB in the post #1577 .

Is this different from that in the folder \adb\adt-bundle-windows-.........\sdk\platform-tools?
[Samsung Galaxy Nexus] kerpert:
I did it, F2FS is welcome.

I have had many troubles with making sideload working due to every time I enable it, my devices become unavailable, I killed and restarted adb many many times till my GNex was recognised.

I used adb downloaded with the last sdk tool.

Good feeling for the begin.
[Samsung Galaxy Nexus] dehein:
Had the same Problem. Could not fix it. Also have a bad USB port. So I blame the cable. Luckily USB otg adapter worked this time. Do I need a special twrp recovery or can I use the latest official one. I saw they fixed a bad bug in the latest one.
[Samsung Galaxy Nexus] RoadToNever:
Try Naked drivers. If all else fails you could use a USB flash drive w/ a USB-OTG adapter to transfer files in recovery.
[Samsung Galaxy Nexus] kerpert:
No, the official TWRP doesn't have F2FS enabled, you must use the modded version look this: http://www.trysoftcore.com/Recovery/TWRP-f2fs.zip
[Samsung Galaxy Nexus] DeadMetaler:
4.3

Please share any kernel with support f2fs for android 4.3.
[Samsung Galaxy Nexus] xaifer:
cm12

How can I add F2FS support to CM12?
[Samsung Galaxy Nexus] stuccamelo:
Hi, there is a method to use trim with a galaxy nexus with cm11 unofficial formatted in f2fs?

Is useful?

Sorry for noob question.
[Samsung Galaxy Nexus] bsmitty83:
No , TRIM isn't supported on f2fs , it has its own automatic version called garbage collection (GC) . it should run on its own , and I don't know of a way to manually run it.
[Samsung Galaxy Nexus] stuccamelo:
Thank you for the answer!
[Samsung Galaxy Nexus] Castor_Troyy:
Noob with the rooting scene, have flashed roms, some knowledge and use of adb/fastboot.

I cannot, for the life of me, figure how to convert to f2fs from ext4. The option for f2fs is just not there in TWRP>wipe>advanced wipe>repair or change file system>change file system...

Only choices are Ext2, Ext3, Ext4 and FAT.

I've searched a lot, even looking at other device instructions as a guide, but to no avail. Apologies if I've missed something that'd give me the answer.

Any help is appreciated.

twrp version 2.8.6.0

current rom - CM12.1 unofficial for samsung galaxy nexus (CDMA) - thread says it has f2fs support.

EDIT: got it...
[Samsung Galaxy Nexus] poo706:
If a ROM is F2FS, it will be explicitly stated. And to your second question, dude, read back like 5 posts. It's on the same page even.

[poo]
[Samsung Galaxy Nexus] massoudsh:
ok, yes sir, sure...
[Samsung Galaxy Nexus] chongns:
Additional Info

Hi, i add in some problem i faced when do onmi rom

i think this 2 line give error when flashing zip

this line give bootloop.

if those line present and flashing without any issue to you, please let me know.

edit:- attach my updater script for omni-fml 4.4.2 05/31/14

reminder, please do not share the modded rom before get permission from the owner.
[Samsung Galaxy Nexus] bsmitty83:
You can remove the version check lines . as long as you know what version it is , it will flash then . as for the bootloop with that other line , I don't know .

Hack The Tuna
[Samsung Galaxy Nexus] jcooler:
LiquidSmooth f2fs -toro updater-script

I followed the above instructions to make the updater-script for LiquidSmooth toro version. I also removed the version check line, as [MENTION=4608636]bsmitty83[/MENTION] mentioned.

It has booted up fine, and I am going through initial setup now. Happy to have my favorite rom, and my new favorite file system working together!!!
[Samsung Galaxy Nexus] seriousia:
can format all partition to f2fs and then restore my old backup(twrp) rom n flash DirtyV kernel.

Will it work ??????????
[Samsung Galaxy Nexus] bsmitty83:
Not sure . but I'd say maybe , the ROMs fstab will still be ext4 , so I doubt it would boot , but flashing my kernel before you boot might work . but I guess you could try advanced restoring just the data and system from the nandroid , then flash the kernel . idk I haven't tried that yet , and my nexus is a paperweight until my new board arrives

Hack The Tuna
[Samsung Galaxy Nexus] akhi24nick:
For the carbon users who wanna experience f2fs :D

Here's the updater script to replace in the stock ROM file :D

And make sure u replace the boot.img too of Dirty V f2fs :D

Man its blazing :D
[Samsung Galaxy Nexus] chongns:
Big Thanks to the F2Fs Recovery Build

Hi All,

All and all this is happening. we "build" our own F2Fs base rom. haha :highfive:

this wouldn't happening if we do not have the F2Fs Recovery.

a BIG

THANKS

to our Developers

especially to [MENTION=2838735]aosp[/MENTION], [MENTION=4608636]bsmitty83[/MENTION] who introduce the recovery and kernel
[Samsung Galaxy Nexus] Hetalk:
Time to make people jealous on the FB sl9003 group :laugh::D
[Samsung Galaxy Nexus] seriousia:
Ok it didnt work.

dont know if recovery's restore function is broken, because even after the successful restore my system partition is empty only 'bin' folder is there.

:rolleyes::rolleyes::confused::confused::confused:

EDIT: my bad, system wasnt mounted :D :D
[Samsung Galaxy Nexus] chongns:
i think the recovery image is file system basic, there is the file name with "ext4" extension.

btw, anyone tried do recovery and restore on the Fsfs recovery ?
[Samsung Galaxy Nexus] xzilem:
Guys, there's a new version of official TWRP that support f2fs. TWRP 2.7.1.0

Edit: No option to change yet, we need to info them first about our devices support.
[Samsung Galaxy Nexus] DR3W5K1:
We already have a f2fs twrp FYI.
[Samsung Galaxy Nexus] xzilem:
Lol i already know that and i'm still using it since day one. :P This is from the official twrp.

Anyway i'm now using Latest omni-4.4.3-20140605v2-maguro-FML F2FS + Banks 4.4.3 gapps + latest DirtyV-R-5.31.14-f2fs-metaltest2-Synapsed boot.img.

Thanks for bringing F2FS to our devices [MENTION=2838735]aosp[/MENTION] [MENTION=4608636]bsmitty83[/MENTION] [MENTION=4544860]osm0sis[/MENTION] [MENTION=4328678]metalspring[/MENTION]

Thanks for teaching the step to convert the rom to F2FS [MENTION=4278473]Hetalk[/MENTION] and [MENTION=3060816]Punkiderma[/MENTION]
[Samsung Galaxy Nexus] osm0sis:
You forgot [MENTION=4328678]metalspring[/MENTION]! :p

I didn't really have anything to do with it. ;)

This unified ramdisk I'm working on will definitely help f2fs ramdisk support for kernel devs though. Once I'm done with it, THEN you can start showering me with f2fs praise. :p :good:
[Samsung Galaxy Nexus] metalspring:
Not so sure about some of those lines...

This will probably do nothing or cause issues since neither of those files would normally be included in a rom, you have to either manually add them yourself or compile from source with f2fs commits, you can always check by actually checking the size of those binaries if/when you boot-

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

And this probably requires mkfs.f2fs to be included in the ramdisk or rom (not sure), which isnt there unless you add it manually or compile from source

"run_program("/sbin/mkfs.f2fs", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system");"

And this should already be done in the updater script but shouldnt have an effect on f2fs anyway lol-

"symlink("mount.exfat", "/system/bin/fsck.exfat",

"/system/bin/mkfs.exfat");"

after

"symlink("mksh", "/system/bin/sh");"
[Samsung Galaxy Nexus] Shadow Death:
I think I'm going to hold off until I get my next phone ( m8 ) before I bother with f2fs. I've been seeing a lot of complaints about data corruption using f2fs. I'm not sure how much truth was there but... Better safe than sorry.... For me anyway.. I need my phone for important work stuff... Like last Friday my boss called me to tell me that I had 60 hours of PTO that I needed to take before the 29th.... Like I said.. Important work stuffs. Lol
[Samsung Galaxy Nexus] metalspring:
A little off topic, but hope to see you in the m8 threads then ;) lol

Btw, if the fsck.f2fs file isnt included in the f2fs roms, then I can certainly see how data might get corrupted (fsck.f2fs basically stands for file system check for f2fs, and is what should be checking that any partition formatted to f2fs isnt corrupted)
[Samsung Galaxy Nexus] Shadow Death:
Oh I will be come July 7th I'll have my upgrade.. I came from the T-Bolt where santod made most of the roms I rocked. It's a shame it doesn't have the m8. Either way.. I'll hang on to my Gnex for toying around with.

As for this.. This actually leads me to another thought. If I were to take a rom built based on ext4 and flashed it to a f2fs partition with a f2fs compatible kernel like DirtyV would that work or is there something in the rom it self that needs to be changed? I remember in the T-Bolt there was just a simple command in the updater script that needed to be changed as long as the kernel supported the file system.

Also: since this is the f2fs thread I figured this would be better here than cluttering up Smity's thread. The Philz touch ext4-f2fs recovery. I flashed it on my Toro like a fool and it wouldn't mount any of the partitions. I assume it's not for the Toro? It was a quick fix though "fastboot flash recovery .\TWRP-TUNA-F2FSALL.img"
[Samsung Galaxy Nexus] Hetalk:
LOL. I didn't do nothing. Just followed what [MENTION=3060816]Punkiderma[/MENTION] posted on slimkat thread and did it for paranoid. Am nowhere close to being a developer.:D

As stated on that post, I'm not sure what those commands actually do.

I've just outlined what I did following up on what [MENTION=3060816]Punkiderma[/MENTION] did. It booted for me and showed f2fs partition when checked from terminal emulator.

Just wanted to get a taste of f2fs with paranoid till rom developers make a f2fs compatible release. So far it works fine.

Hope it doesn't screw up my device.

Just wondering, is there another way to manipulate ROMs without building from source?
[Samsung Galaxy Nexus] metalspring:
apk hacking (I.e this is what themed apps pretty much are), modifying contents of rom zip, like adding/removing apps binary files or libs, changing init.d scripts or other init files, etc. However you are really limited with what you can do without building from source
[Samsung Galaxy Nexus] Hetalk:
I know, buddy. So much I'd love to build from source. :crying:

1 question. The way I changed updater script, would it create any serious issues? :confused:

The ROMs been running awesome, so far.
[Samsung Galaxy Nexus] Punkiderma:
same here :D just compared some F2FS roms running on other device and followed this guide (so thanks to [MENTION=4933480]ronedogg[/MENTION] ) in order to understand where to start :D

Anyway, for me f2fs is very stable, the only thing I've noticed is that sometimes I have some app crashes that I didn't have while on ext4; however, they are not frequent and I don't know if this is f2fs related
[Samsung Galaxy Nexus] xzilem:
Yep, do we need to do the fstab thing? Anyway i didn't find any problem yet using f2fs rom convert by this thread steps.
[Samsung Galaxy Nexus] pianistaPL:
Do i need follow these steps? If i good understood this guide:

i have to only replace this:

Right? :D

I want to convert OmniROM btw.
[Samsung Galaxy Nexus] pianistaPL:
Nevermind, i'm already uploading Omni 06 june (with Android 4.4.3) converted to f2fs ;)

---------- Post added at 12:48 PM ---------- Previous post was at 12:23 PM ----------

Omni 06 june f2fs ;) http://xdaforums.com/showpost.php?p=53199657&postcount=263
[Samsung Galaxy Nexus] Punkiderma:
I've replaced onyl mount and format lines ;)
[Samsung Galaxy Nexus] Atento:
This is my doubt too. How does fstab work with the same lines for ext4 and f2fs? Maybe boot.img has a different fstab for f2fs. I didn't take a look but it's, probably, changed somewhere.
[Samsung Galaxy Nexus] metalspring:
fstab is in the ramdisk of the kernel (boot.img is kernel zImage + ramdisk), roms themselves have no fstab file, the KERNEL included with the rom does, so replacing the rom's stock boot.img with another one also changes all the .rc files, fstab files, and a few other things :P

This is everything that is in the ramdisk part of a boot.img, except fstab-f2fs.tuna which is just there so smitty can easily switch back and forth-

https://github.com/bsmitty83/DirtyV_tuna/tree/SmittyV-f2fs/ramdisk-DirtyV
[Samsung Galaxy Nexus] sagara.sandaru:
So is it safe to use a rom that not compiled for f2fs but edited update-script? Update script is the only difference between f2fs rom and ext4 rom. Am I right?
[Samsung Galaxy Nexus] metalspring:
It might work, but you'd still be missing things that might be important to making sure everything runs as intended on f2fs (see below commits for what I mean)

http://vaniraosp.goo.im/#/c/11922/1/device.mk

makes it so fsck.f2fs is added which checks for consistency and corruption in f2fs formatted partitions

Also adds mkfs.f2fs which can format partitions as f2fs and is tied in with fsck.f2fs

And also adds a couple other f2fs specific things which may help consistency and performance

http://vaniraosp.goo.im/#/c/11784/

Adds support for the blkid to recognize f2fs format

http://vaniraosp.goo.im/#/c/11783/

adds rom side support for mounting f2fs partitions
[Samsung Galaxy Nexus] Atento:
So, this means that the way we are joining files from Commotio to other roms is not 100% correct?

We are just replacing some files and, if I understood what you said, supporting f2fs is a little bit deeper than just replace files.
[Samsung Galaxy Nexus] metalspring:
Kind of, just changing the updater script so a rom boots with f2fs is essentially a hack to make it boot and may cause issues later on

It's basically a difference of working on f2fs vs actually supporting f2fs :p
[Samsung Galaxy Nexus] xzilem:
Well, it's better than to convert back to ext4 just to use my favourite rom. I'll lost all data again lol.:p
[Samsung Galaxy Nexus] bsmitty83:
Its easy to adb pull your entire sdcard to your computer , then format to ext/f2fs , then adb push it all back . it may take a minute but that's the beauty of android . there is always a solution to a problem

Hack The Tuna
[Samsung Galaxy Nexus] xzilem:
i already tries that but it always seem to be stuck in the process. i'm using windows 8.1 64bits.

so right now i just transfer all my sdcard using usb-otg to my pendrive.
[Samsung Galaxy Nexus] bsmitty83:
It takes a while to copy over everything

Hack The Tuna
[Samsung Galaxy Nexus] seriousia:
I dont know why but adb doesn't give me more than 3 MB/s transfer speed. :(:(
[Samsung Galaxy Nexus] Bosio91:
Very basic question here, but I just want to be sure... Do we need to format data, including titanium backups, media, etc., before flashing any f2fs rom over an eve rom? Thanks!

---------- Post added at 10:51 PM ---------- Previous post was at 10:49 PM ----------

It would be great if someone could post the necessary steps to take when flashing a f2fs rom for the first time :)
[Samsung Galaxy Nexus] bsmitty83:
There is a few guides here for converting .

But to answer your first question , yes you have to wipe data completely , you will lose all data unless you back it up externally on a computer or otg .

The steps in simplest form are

1. Flash a recovery that will convert ext to f2fs

2. Back up your data ( optional )

3. Format system , cache , and data partitions to f2fs

4. Using adb side load or adb push , load a f2fs compatible ROM .

5. Profit .

Hack The Tuna
[Samsung Galaxy Nexus] jesan9:
how can i convert PA Gapps from ext4 to f2fs? or recommend me gapps for f2fs... i can't find any... thx
[Samsung Galaxy Nexus] clnzx2:
Banks gapps work
[Samsung Galaxy Nexus] jesan9:
oh thx... this one works? because is in nexus 5 forum.. http://xdaforums.com/google-nexus-5/themes-apps/gapps-t2012857
[Samsung Galaxy Nexus] chongns:
The adb speed depend on usb port speed.
[Samsung Galaxy Nexus] AbhishekS:
When switching to f2fs, everything is wiped. Even the data/media/0 folder.

Now the question is that I have wiped this folder in the past too. After restoring the contents, the dates of the photos and videos aren't the same. They all get arranged to their file names and not the dates as the date for every file becomes the date on which you restore these files.

Any way by which I can restore these contents without messing about the dates of my photos and videos?
[Samsung Galaxy Nexus] chongns:
PA Gapps work out of the box.:fingers-crossed:
[Samsung Galaxy Nexus] Sdobron:
Is there any concrete evidence of improved performance? I'm not sold from what I've read and not sure if converting is worth it at the moment.
[Samsung Galaxy Nexus] Hetalk:
Just a few benchmark results and user experience.

Both might be placebo.

Trust your judgment.
[Samsung Galaxy Nexus] mrgnex:
Well you have nothing to lose right? It can only be better..
[Samsung Galaxy Nexus] ashclepdia:
I feel like one of the main benefit of f2fs is that flash memory will not wear as fast, leaving it for better performance in long run, AND maybe some immediate benefits.

it was designed for flash memory chips and I have even switched to it on my Linux laptop that I have booting from.ssd..
[Samsung Galaxy Nexus] DR3W5K1:
I use zram which seems to work much more seamlessly than before.
[Samsung Galaxy Nexus] michierusama:
Hi... I want to convert CM11 M7 build to fully support f2fs... Will this guide here be enough or do it needs some advanced coding? Thanks.
[Samsung Galaxy Nexus] bsmitty83:
It should be enough . as of now the ROMs built for the nexus don't have proper f2fs support , but it will still work . its mainly about flashing the right kernel/ramdisk , and changing the updater script in the ROM zip to mount f2fs instead of ext

Hack The Tuna
[Samsung Galaxy Nexus] poo706:
What constitutes proper support?

[poo]
[Samsung Galaxy Nexus] metalspring:
http://vaniraosp.goo.im/#/c/11784/

http://vaniraosp.goo.im/#/c/11783/

http://vaniraosp.goo.im/#/c/11922/

especially note this-

http://vaniraosp.goo.im/#/c/11922/1/device.mk
[Samsung Galaxy Nexus] michierusama:
:eek: so vanir got support?
[Samsung Galaxy Nexus] metalspring:
Kind of, the device.mk part isnt merged yet so none of those packages would be included, plus you do need the fstab stuff for f2fs to work (which can be included in a kernel ramdisk)

My idea with the tuna specific commit is including the packages part but making it so a kernel with an f2fs ramdisk would only require changing the updater script for it to work on f2fs :P
[Samsung Galaxy Nexus] morfances:
Newbie questions: to flash a ROM F2FS I have to use a particular recovery?

A kernel F2FS can be flashed only on rom F2FS?

Also, if you then want to come back from a rom F2FS a ext 4 I have to do some special procedure?

Thanks in advance Xd
[Samsung Galaxy Nexus] Punkiderma:
1. Yes, you can find them inside dirtyV thread . There are TWRP and CWM philz version inside the thread.

2.yes,and ATM I know only dirtyV that supports f2fs. Maybe also Franco kernel and ASKP, but I'm not sure, check

3.backup everything, reformat partition with ext4, flash your rom

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
[Samsung Galaxy Nexus] movelbit:
hi.

I have completed the f2fs procedure, but first run is taking ages. I done the modification in the rom (cm-remix)

Is the first time delay normal? Thanks.
[Samsung Galaxy Nexus] Punkiderma:
Have you put a f2fs compatible boot.img inside the zip? (like smittyV kernel)
[Samsung Galaxy Nexus] pattyboi:):
Could someone be kind enough to make me a updated script for shiny ROM (TORO) to be mounted /format to f2fs I don't have computer access right now and I'd be very greatful
[Samsung Galaxy Nexus] movelbit:
I did all over from the beggining and it worked second time.

Thanks! Great ! :=)
[Samsung Galaxy Nexus] michierusama:
I get lost trying to converting a rom. I want the CM 11 m7 maguro but I just get lost after the step 7.
[Samsung Galaxy Nexus] BestBrd:
Can someone post vanir update script? I don't have my PC ATM...
[Samsung Galaxy Nexus] massoudsh:
...and cm11 4.4.3 plz.
[Samsung Galaxy Nexus] latenightchameleon:
If anyone's interested, here's latest f2fs-compatible slimkat (5.8).

Changes from the original:

-f2fs support

-DirtyV Superram kernel

-A bunch of system apps removed for max lightweightness (feel free to re-add from the original if necessary)

-Added titanium backup & AdAway

-DPI changed to 320

Works buttery smooth and superfast.

Download from dropbox:

db.tt/auEvFdom
[Samsung Galaxy Nexus] :
Tried the guide but the ROM didnt flash. Cm11 M7.
[Samsung Galaxy Nexus] Tribes11:
Is it possible to make a 4.3 ROM compatible with F2FS?

I mean like a LiquidSmooth, SlimBean or some other ROM with custom features...

Since KitKat have the issue with the music stuttering when locking the device with power button and some other issues for me like random reboots, someone know is this is possible?
[Samsung Galaxy Nexus] bsmitty83:
I don't see why not , my kernel (specifically the zimage ) should work on 4.3 , not sure about the ramdisk , but I'd try it and see . just do the same thing to the ROM updater script as you would a 4.4 ROM .

the ramdisk might work too , usually its not compatible trying a 4.3 ramdisk on 4.4 , but vice versa might work .
[Samsung Galaxy Nexus] israelian:
I see many people posting showing f2fs don't significantly impact disk performance. is worth it converting to f2fs? :confused:
[Samsung Galaxy Nexus] rajputrajat:
f2fs is developed for flash memory devices (taking into consideration this very technology), so even if there is no seeming benchmarking benefit, surely there are other parameters which would help in better battery or flash memory life.

we use it, since most of us always thrive to live on cutting edge technology.

One more thing, as this is new there would be lot of improvement and optimization scope.

so it is up to you if you are want to play with this new toy.

Just my opinion :)
[Samsung Galaxy Nexus] Tribes11:
Thanks for that, unfortunately I don't have the required skill to do it, otherwise I would gladly do it and share with the community a 4.3 ROM enabled for F2FS using your Kernel.

However, if I change the updater-script what command line should I be using instead of make-ext4?