yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] desiromeo719:
Question: Im running the latest multirom twrp and there are options to switch to f2fs. Is doing that, the same as flashing the formatpartition.zip? If I only want to switch the /data partition to f2fs, will I only have to flash a compatible kernel? No need to convert the rom to f2fs? Would I get most of the benefit of f2fs this way, without most of the hassle?
[Nexus 4 Original Android Development] diogo.sena:
yes, you only need this recovery to switch, and a compatible kernel..
[Nexus 4 Original Android Development] desiromeo719:
So to get this right. If I'm running latest multirom twrp, go switch all partitions to f2fs then flash f2fs compatible rom and kernel. If only switching /data partition to f2fs then flash regular rom and f2fs compatible kernel?

Would otas work if I were to use Mahdi rom? Would i have to download full updates and convert each one to update properly?
[Nexus 4 Original Android Development] diogo.sena:
i use cyandelta to update cm11, only data in f2fs, but cyandelta flashes kernel for me after each update..

don't know about madhi otas, but you probably need to flash kernel manually after each update..
[Nexus 4 Original Android Development] desiromeo719:
gotcha...because your only using /data f2fs your otas work fine. If I were to do the same I would only have to flash a compatible kernel after each update. If I were to go full f2fs I would need to convert each update to f2fs and flash compatible kernel. I did buy the convert to f2fs app but im not sure if I want to do that for each update...any added benefit to go full f2fs?

edit- What about cache? can I convert that to f2fs and leave /system ext4, without having to convert the rom?
[Nexus 4 Original Android Development] diogo.sena:
Yes! Forgot that, I'm using f2fs for cache too, exact the same behavior, the problem lies in converting system.. too much trouble for questionable benefit..

Enviado de meu Nexus 4 usando Tapatalk
[Nexus 4 Original Android Development] desiromeo719:
Also, will I be able to use my titanium backup simply be renaming the extension from ext4 to f2fs? What is the best way to restore all my data? Can I adb pull then push back to the phone after the conversion?

wait what am I talking about...I read somewhere how to fix the titanium backup restore...maybe I was thinking restoring a nandroid with twrp by renaming the ext to f2fs...

edit- also do the moto x and moto g have all f2fs or just f2fs for data?
[Nexus 4 Original Android Development] diogo.sena:
Titanium, Just restore,

Nandroid, you need to rename...

I used mtp and nandroid...

Enviado de meu Nexus 4 usando Tapatalk
[Nexus 4 Original Android Development] desiromeo719:
Thank you for the help, but im stuck. I wiped and partition data and cache to f2fs and left system ext4. I then flashed Mahdi latest followed by PA gapps and a compatible kernel...but the phone refuses to boot past the 4 color dots animation. Ive given it 10 mins since it was a clean install thinking it will take time but it wont boot...sometimes it stutters making me think its doing something but nope. Any help?

Ive tried Hellsdoctor and franco sabermod 208 which both should be f2fs compatible...
[Nexus 4 Original Android Development] ljames_21:
TWRP 2.7.1 is out. Are we getting it? :D
[Nexus 4 Original Android Development] jmtjr278:
It has f2fs support built in according to the changelog
[Nexus 4 Original Android Development] ljames_21:
You meant we do not need a special version of the recovery for all-f2fs? Just fastboot the recovery.img to the phone and it will work?
[Nexus 4 Original Android Development] legolas93:
Yes. First post updated with latest version. :D

No. Take the latest All-F2FS version.
[Nexus 4 Original Android Development] jmtjr278:
Thanks. That was probably my problem. Love your app too!
[Nexus 4 Original Android Development] vrehenriqu:
Hi guys!

Is there any 4.4.3 custom ROM compatible with F2FS?

Thanks!
[Nexus 4 Original Android Development] jmtjr278:
Sure, they all are if you convert them to f2fs and flash them using the proper recovery
[Nexus 4 Original Android Development] dezful:
I'm sorry for asking silly question :silly:

What apps is this?
[Nexus 4 Original Android Development] vrehenriqu:
Hi!

Is the any Wifi fix still required?

I Tried two ROMs: "Pure Stock 4.4.3 F2FS version Flashable Zip" and Also Carbon ROM 4.4.3 nightly converted with F2FS App.

I did several install attempts and Wifi is not working, on both...

This is how I did:

Download compatible ROM

Download FormatPartitions.zip

Download "special" TWRP for All-F2FS: openrecovery-twrp-2.7.1.0-mako-All-F2FS.img

(This is different for that of simply F2FS)

Copy FormatPartitions.zip and ROM on Phone

Flash "special" TWRP with Fastboot

Flash FormatPartitions.zip with new Recovery

Reboot Recovery

Flash ROM with new Recovery

(Flash GApps with new Recovery)

Flash compatible Kernel (F2FS) for Carbon ROM. Tried JolieHasYou (based on Matr1x)

Go to Wipe Menu and press Format Data (The Big BUTTON!) (You will LOSE all your Data! Music, Movies etc!!)

Reboot

Had to go back to a EXT4 filesystem to get Wifi working... (keeped the F2FS recovery TWRP)

Any clue?

Thanks.
[Nexus 4 Original Android Development] sychim:
It's DiskInfo Pro:

https://play.google.com/store/apps/details?id=me.kuder.diskinfo.pro
[Nexus 4 Original Android Development] fr3quency:
Doesn't TWRP 2.7.1.0 support F2FS on its own? [MENTION=2743057]legolas93[/MENTION]
[Nexus 4 Original Android Development] fr3quency:
Can anyone tell me what file system the mmcblk0p20 is? vfat or ext4?
[Nexus 4 Original Android Development] jkyoho:
mine is ext4.
[Nexus 4 Original Android Development] badaas:
Its suppose to but apparently doesn't. There is a 2.7.1.1 fix but not out for mako ATM.

Sent from a relic Xoom flying on bigPart KKrack ...
[Nexus 4 Original Android Development] NABENDU1:
Okay here is the process !! Works just fine for all aosp based Roms

1) Use my windows script to convert your fav ROM to full f2fs

2)install rom & gapps

3)reboot

4)go back to recovery

5) flash the following kernel

http://d-h.st/t34( thanks to that French guy whose name I don't know)

6) reboot

7) enjoy
[Nexus 4 Original Android Development] vrehenriqu:
What's the kernel you mention? The link above is Broken...

Enviado do meu Nexus 4 através de Tapatalk
[Nexus 4 Original Android Development] Rohit02:
just try this d-h.st/t34
[Nexus 4 Original Android Development] T-luvR:
hi guys I tried a lot to convert liquid smooth to f2fs but every time i got stock in google logo! and at last had no way except installing purity!

and also how can i convert my favorite kernel to f2fs?
[Nexus 4 Original Android Development] Rohit02:
Liquidsmooth is aosp or cm? use the app it works perfectly fine and flash a f2fs 4.4.3 based kernel too..
[Nexus 4 Original Android Development] T-luvR:
Is cm but some files are merged from aosp and mahdi rom is this way too i think!

---------- Post added at 03:36 PM ---------- Previous post was at 03:34 PM ----------

Also do I have to format data after installing rom each time :D
[Nexus 4 Original Android Development] Rohit02:
Like Mahdi.. then i used to convert mahdi with aosp boot.img.. try that.. ow.. i habve no idea.. Or last try both ways n see wat boots.
[Nexus 4 Original Android Development] T-luvR:
Thank u Ill try now:D and do i have to format data each time ?!
[Nexus 4 Original Android Development] Rohit02:
No mate.. its a one time process.. once you have converted your file system to f2fs you just need to flash the f2fs roms you like.. read op again.
[Nexus 4 Original Android Development] :
Merely stopping by to say thanks for this thread. I am able to give my kernel and twrp f2fs support, but was on a hunt to make my 4.2.2 Rom f2fs compatible across the board. Your work has showned me exactly what I need to do to make this possible for my K2_CL (HTC One SV) variant. Kudos my friend. Working on the necessary scripts right now.
[Nexus 4 Original Android Development] Bladyle:
Hello,

I'm using F2FS on my tablet and now I want to give it a shot on my nexus 4. The problem is that I'm stock ROM user so can I make a zip with latest stock 4.4.4 and just root it and import busybox and then convert it with this script? Did anyone try this combination? Do you think I'll have any problems booting it?

Thanks :)

wrong thread sorry :)
[Nexus 4 Original Android Development] loveuhp:
How to fornat all f2fs ???

And now can i convert slimkat 4.4.4 to all f2fs ???
[Nexus 4 Original Android Development] emanuele252:
hi. i have a question: can i use f2fs with art?
[Nexus 4 Original Android Development] nexuses:
In the OP the demonstration is about how to convert all phone partitions to F2FS completley.

And read this to know the compatible ROM's

http://xdaforums.com/showpost.php?p=52123745&postcount=2

Of course you can, i'm on it now:cowboy:
[Nexus 4 Original Android Development] PowurPlayr:
GNEX?
[Nexus 4 Original Android Development] joefso:
how about f2fs for all partitions except for /system, where ext4 preforms better?

this does not seem to work anymore with the latest cm11, PA or slimkat
[Nexus 4 Original Android Development] masternothing:
Will we get new twrp f2fs?;)
[Nexus 4 Original Android Development] gharrrrrr:
No. Never. Why would anyone upgrade to latest release? That is just silly isn't it. Thanks for the pointless question though. Really helped this "development" thread.
[Nexus 4 Original Android Development] masternothing:
God. I'm just asking because nobody posted since august...
[Nexus 4 Original Android Development] :
Your remark doesn't help either nor does mine which as I am writing this.

Stick to the thread champ.
[Nexus 4 Original Android Development] jimyiak:
I tried to go back to ext4 but i couldn't start my phone..something about decrypt my device came up after boot animation..then i went back to f2fs recovery and flash a non f2fs rom via sideload and now i have data and system ext4 but cache is f2fs..is that normal?i flash f2fs compatible kernel and boots fine...can i try non f2fs kernels??wow and i couldnt even flash the cometely stock rom via nexus toolkit...can anyone tell me how to get rid of f2fs completely??

sent by nexy 4
[Nexus 4 Original Android Development] Rohit02:
flash factory image you should be able to flash it.. backup all your media files. if you dont know commnands to flash stock, google

learn

if not use wugfresh toolkit.
[Nexus 4 Original Android Development] a g bell:
Could you not save all you want off your phone to pc flash latest twrp recovery format phone sideload ROM you can even use flashify to install twrp
[Nexus 4 Original Android Development] jimyiak:
I tried with wugfresh toolkit and the phone didn't boot,something about decrypt and asked a password..i tried via sideload too but in the end i flashed latest twrp and change the filesystem of the partition to ext4 from twrp menu...and flashed purity but with sabermod franco kernel which is f2fs compatible..i'll try tomorrow a non f2fs kernel to see if it will boot..

sent by nexy 4
[Nexus 4 Original Android Development] spider623:
the scripts Google gives with the image doesn't flash data
[Nexus 4 Original Android Development] ljames_21:
hi [MENTION=2743057]legolas93[/MENTION], TWRP Recovery 2.8.0.1 has been out for a while, are we getting it?
[Nexus 4 Original Android Development] jkyoho:
check this post from multirom . you will find what you need there.

see the 1st/2nd post from op

http://xdaforums.com/showthread.php?t=2472295
[Nexus 4 Original Android Development] agent00f:
Bricks device!

Converted SlimROM 5.8 or whatever latest one is from 9/22, flashed it with gapps (over older 4.4.2 build). Now device is bricked (flashes some lines and other bizzareness with screen).

Can boot to fastboot screen.
[Nexus 4 Original Android Development] agent00f:
Replying to myself. Recovered via fastboot with Google provided 4.4.4 image. This is probably the only way given bootloader/recovery was broken.

I'm giving up on the auto f2fs conversions. Too much risk for the modest reward.
[Nexus 4 Original Android Development] pawan1993:
There's your problem. You dirty flashed over 4.4.2 with a 4.4.4 ROM. Now that you're on 4.4.4 you can have a go at flashing SlimKat again and it should work.
[Nexus 4 Original Android Development] agent00f:
No, there's no significant change with 0.0.x revisions, and I've done the 4.4.4 dirty flash over far older versions with zero issue on other ROMs and devices.

Again, this hard-bricked everything incl the recovery, which implies core incompatibilities involving the f2fs patch.
[Nexus 4 Original Android Development] icu64:
Does anyone know if CyanogenMod 11 is already f2fs compatible or should I mod it?
[Nexus 4 Original Android Development] fr3quency:
I simply change those two lines in " META-INF\com\google\android\updater-script":

format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");

TO

run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");

AND

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");

TO

run_program("/sbin/busybox", "mount", "/system");

Then when you flash it, you need to also flash a kernel that supports F2FS such as HellsDoctor #2 R25 (#3 R1-R5 do not support f2fs yet) or AK kernel.
[Nexus 4 Original Android Development] lordvj:
Does the latest version work on slimkat with f2fs?
[Nexus 4 Original Android Development] arvindgr:
In lollipop or for future M releases, can we development of F2FS???
[Nexus 4 Original Android Development] fr3quency:
No love for CM11? It's time... now that M5 is out. :P
[Nexus 4 Original Android Development] jolinnard:
Maybe tonight I have some time to download source and play with it.

Same as before :P but it's easier than Matr1x...
[Nexus 4 Original Android Development] fr3quency:
Then please work your magic. :P
[Nexus 4 Original Android Development] jolinnard:
Hellsgod b46 t4 CM /data and /cache

Hellsgod b46 t4 CM full partitions (system, data and cache)

Hellsdoctor R29 full partitions in f2fs

Both CM's are untested by me. So, flash at your own risk ;)
[Nexus 4 Original Android Development] jolinnard:
New selectable zip

Hi!

After code a little bit, I make a zip that is "selectable". Is not as advanced as "aroma" but it should work and it will be easy to understand:

- Download the zip: HellsDoctor R29 for the moment

- Rename with desired partitions to mount as f2fs. For instance if you want all f2fs:

HellsDoctor_R29-F2FS-selectable.zip --> HellsDoctor_R29-F2FS-data-cache-system.zip

or if you want only /data:

HellsDoctor_R29-F2FS-data.zip

or data and cache:

HellsDoctor_R29-F2FS-data-cache.zip

The order as well as punctuation are not important (don't use spaces btw). But remember to write the correct words, only these 3 are accepted:

system

data

cache

Basically all the job consist to generate a fstab during the flash process by this script kernel/smart-fstab-generator.sh. Feel free to adopt it if you desire.

Greetings
[Nexus 4 Original Android Development] Flak:
Slim was great before, freaking unbelievable with all f2fs.
[Nexus 4 Original Android Development] slickw:
Awesome.

looking forward to it :D
[Nexus 4 Original Android Development] beskalL:
Is this compatible with multirom?
[Nexus 4 Original Android Development] hazard66:
perfect!!!!

thanks!!!
[Nexus 4 Original Android Development] hrishi420:
So if i want to use franko f2fs enable kernel than first do as you said(repartition to f2fs by zip provided by you and than flash f2fs enable franko kernel).
[Nexus 4 Original Android Development] jolinnard:
Nope, the selectable zip should only work in HellsDoctor, because every dev make his own tweaks in init.rc or init.d scripts (and maybe in other places). If you want to use a Franco (which is already patched with f2fs) kernel and you want to make it selectable, you need to check updater-script and all the flash process in his zip. I could check it if you want. Is there a Franco kernel patched with f2fs?
[Nexus 4 Original Android Development] hrishi420:
Yes...patched by xcstacy

Link http://xdaforums.com/nexus-4/development/sabermod-franco-kernel-r201-6-jan-14-t2548897

Please do it for AOSP variant of franko
[Nexus 4 Original Android Development] fr3quency:
2 questions. If I want to flash the new ALL-F2FS recovery do I type:

"fastboot flash boot bootFS.img

fastboot flash recovery bootFS.img"?

(bootFS=the all F2FS recovery)

Secondly, if I want to flash a custom kernel that supports f2fs for all partitions such as the HellsDoctor that [MENTION=2002216]jolinnard[/MENTION] posted, in which step do I flash it? :P Before flashing FormatPartitions.zip or afterwards, when flashing the ROM?
[Nexus 4 Original Android Development] xtrymind:
Recovery always with fastboot flash recovery

It doesnt matter before or afterwards, it's same

ah actually before you reboot to system ?
[Nexus 4 Original Android Development] Blackherted:
Got a question about this... anything special about the rom? Or can I use any version of slimkat with it? Because I wouldn't want to depend on people in order to update my rom :) thanks!
[Nexus 4 Original Android Development] XanSama:
I agree, it would be great to know what exactly has been changed in the SlimKat in the OP so that we can apply the modification to future updates ourselves.

Perhaps legolas93 can provide us with a commit/diff/config change that we can use for a reference? Was it just a direct pull of the commit listed in the OP?
[Nexus 4 Original Android Development] BlueFlame4:
Hey all,

Is there a safe way to go back to EXT4 at the moment? I read that there are still problems with the backup-zip a couple of pages back. I'd like to format everything to F2FS (/system, /data, /cache) just for benchmarking purposes and will then decide if I go back or not. So a safe way back would be mandatory :D

Thank you! :)
[Nexus 4 Original Android Development] NeBouse:
I believe flashing back a "regular" recovery (not a F2FS one) and formatting everything with it should do the trick.
[Nexus 4 Original Android Development] jolinnard:
Basically, the only difference is in updater-script (/META-INF/com/google/android/updater-script). You have to change these lines:

format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");

by this:

run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
run_program("/sbin/busybox", "mount", "/system");

In fact, I'm running a weekly release (Slim-mako-4.4.2.build.4.2-WEEKLY-3743.zip) with this changed and it works fine ;)

I don't tried, but should be like [MENTION=2360351]NeBouse[/MENTION] say. If not, we could make a flasheable zip to format all partitions in ext4.
[Nexus 4 Original Android Development] roddem:
There is , i did so ! just format the partitions and they will be back to ext4 ! flash normal recovery and kernel later!

done!
[Nexus 4 Original Android Development] jolinnard:
Do you figure out what kernel is this?

JolieHasYou-cfs_v13.5-selectable.zip

Anybody wants to try it?
[Nexus 4 Original Android Development] Shooting Star Max:
I tried to do what you said about modifying updater-script, but my Nexus 4 gets stuck in Google logo after flashing that. Did I miss something?
[Nexus 4 Original Android Development] XanSama:
I assume you mean change those lines and swap the kernel for one with F2FS support?

My understanding is that the three things required are:

1) F2FS support in the kernel itself.

2) Modified fstab in the ramdisk (packaged with the kernel usually).

3) For the filesystem to actually be (or get) formatted to F2FS.

It appears as though #1 can be attributed mainly (perhaps completely?) to the commit listed at the bottom of the OP., and #3 can be attributed to the lines you provided for the update script. This leaves only #2 completely unexplained (and #1 a little vague).

Based on this, we could probably just grab the boot image and the updater script from the ROM in the OP and stick it in the weekly to have it work, but then we're left with the old kernel.

It would be awesome to have a list of ALL the changes made to the ROM in the OP for reference purposes, but at the very least some coverage of #2 would help.

Did you flash a kernel with F2FS support? Sounds like you may not have, or the formatting may not have worked properly.
[Nexus 4 Original Android Development] Shooting Star Max:
Yes, I flashed a F2FS kernel. In fact, I am using that kernel with the F2FS version of SlimKat posted in the OP, so I couldn't figure why the newest SlimKat version doesn't work even after modifying those 2 lines in the updater script.
[Nexus 4 Original Android Development] slickw:
Awesome !!! thanks so much

I will try it tonigh :D

Edit:

IT WORKS

thanks so much

oh and its Matrix btw ;)
[Nexus 4 Original Android Development] tarroyo:
Have u successfully modded Franco kernel to work with F2FS?
[Nexus 4 Original Android Development] jolinnard:
Ok, lets do a recap please.

We have 3 partition that can be formatted into f2fs: /system (where ROM lives), /data (or userdata, emulated sdcard etc) and /cache

f2fs is not included in stock kernel, so we need a custom kernel patched with f2fs

We need to setup the correct fstab (the filesystem table). This table is inside boot.img (the kernel partition) and it has to fit exactly. What I meant is if you want to have all partitions in f2fs, or only one or two...

Because of that, many users start to change only /data partition, so in this situation you can use every ROM you want (because all ROMs format /system into ext4 filesystem), but you have to flash a f2fs enabled kernel and set /data into f2fs in fstab. Same if you want /cache too.

But if you want /system in f2fs, you need to check updater-script into ROM zip. Because, like I said, most of the ROMs specifically format into ext4. This can be changed easily modifying these lines:

format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");

to:

run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");

run_program("/sbin/busybox", "mount", "/system");

The kernel part is the other important part. We need the perfect partition table, so this is what my selectable script does: simply renaming the zip, it setup the correct entry in fstab according the partition you want to mount as f2fs. A couple examples with HellsDoctor selectable:

- You format /data and /cache in f2fs, you can flash the ROM you want (/system will remain in ext4, stock). Then you download my selectable zip: HellsDoctor_R29-F2FS-selectable.zip, you rename it in HellsDoctor_R29-F2FS-data-cache.zip and you are done. Flash zips in the typical order: ROM + GAPPS + (renamed)kernel.

- You only want system into f2fs. Well, you don't have to format anything from recovery, because ROM does it every time. So you need to change updater-script of your favorite ROM or you can use Slimkat posted in the OP, or another one that has these 2 lines in f2fs. Rename HellsDoctor_R29-F2FS-selectable.zip into HellsDoctor_R29-F2FS-system.zip and flash as always: ROM + GAPPS + (renamed)kernel

- And so on...

It's a bit complicated for me to explain this easily in English ... but I'm trying to. Thanks for your patience ;)
[Nexus 4 Original Android Development] diogo.sena:
hellsdoctor have some universal method for fstab i think, can you take a look at that?
[Nexus 4 Original Android Development] jolinnard:
No, as far as I know...
[Nexus 4 Original Android Development] diogo.sena:
there's only one version for all layouts, for sure it's a universal method, ( I'm using it by the way )

Enviado de meu Nexus 4 usando Tapatalk
[Nexus 4 Original Android Development] jolinnard:
You meant one of those? http://goo.im/devs/Barome/mako/HellsDoctor

Because inside the zips there are no modifications in fstab file...
[Nexus 4 Original Android Development] diogo.sena:
yes!

i wipe system, install cm11 m5, install hells doctor ( same zip for all ),

data and cache in f2fs works perfectly without changing anything..

if i use other kernels, has to be some special version ( generally build by you )