yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Original Android Development] cocchiararo:
Restoring now, but TWRP warned me that the backup was made with ext4 filesystem, so it might not boot unless i format it that way.

If it does not boot, i will have some work ahead of me XD

ps: kinda OT, but what are the best IO scheduler and buffer in elemental X for F2FS?

EDIT: partition did remain F2FS, phone booted, yay

EDIT2: root was lost and the fix permission failed, so the files copied to the sd card from the adb push are not viewable. Back to recovery

EDIT3: ok, they are gone, not "not viewable" :P

---------- Post added at 06:39 PM ---------- Previous post was at 05:50 PM ----------

Either the fix permisions script or something during boot deletes all files again. I am home now, so i will copy data and test again (the backup was left at work >P)

EDIT: ok, no, data is there, but i can see it outside of recovery. Permission zip was executed, so i guess that maybe the symlink or something for legacy/0/whatever got borked.

EDIT2: Now i see that after regaining root, i can see files in /data/media, and in there, there is a folder named "0" alongside my data, with all my data from my 2nd recovery attempt.

If i go to /sdcard or /storage

Then i saw other discrepancies in the /storage folder.

FIXED:

manually ran the permision commands after moving my files to "0" and now all is up and running.
[Nexus 5 Original Android Development] dechronic:
rootSU also gave the suggestion if you are having problems with the sdcard is to:

From a terminal run:

su

restorecon -FR /data/media/0

AND/OR run the fix permissions script from recovery

Sometimes that happens that the files go into /data/media/0/0 and they need to be moved back to /data/media/0

I am glad it worked for you.
[Nexus 5 Original Android Development] bobloadmire:
I got /data to work, but when i format cache to F2FS, no boot. Went back to EXT 4, and it boots. What gives?
[Nexus 5 Original Android Development] dechronic:
You sure your cache has the f2fs commands in the ramdisk?

I manually do mine. So for Lollipop I have cache and data with f2fs.

Android 5.0 Lollipop by Google

+

ElementalX Kernel by flar2

+

TWRP Recovery by TeamWin
[Nexus 5 Original Android Development] Wakamatsu:
Cl3Kener has gotten his Optipop ROM working with F2FS-all. He apparently has a permissive kernel working also. I say apparently because, although others were able to get root to stick, I couldn't. :(

https://plus.google.com/communities...3/stream/8e08892e-91c0-455c-8636-ed0e9f962f6d
[Nexus 5 Original Android Development] dechronic:
My Nexus 5 is rooted with F2FS for /data & /cache on Anroid 5.0 Lollipop.

I am about to make /system f2fs.

This is the issue and how I will overcome it.

Formatting the /system parition to f2fs will leave 881MB free, however, my system backup 956MB. So essentially I have to shave off 75MB of system apps.

Create another backup using TWRP. When it is 880 MB, preferably, I just have to rename the file names from system.ext4.win to system.f2fs.win and the same for md5 file.

Restoring it with that filename will format the partition to f2fs automatically upon restore (TWRP 2.8.2.0 maybe earlier too)

Then I just flash a modified stock kernel with the ramdisk set for f2fs-all that I created and then flash ElementalX 2.03 which uses the ramdisk of the previous kernel.

Just for good measure I will flash SuperSU 2.27 Beta.

Then I will be running Lollipop as f2fs-all but with a few less system apps
[Nexus 5 Original Android Development] corey749:
Will this only work with stock rom because it tried to get /data and /cache to work but could not boot?
[Nexus 5 Original Android Development] Wakamatsu:
Interesting. I might take a look at that. Anyhoo, using Cl3Kener's combo of Optipop rom + his permissive f2fs-all base kernel + Uber kernel, I was able to get rooted f2fs-all up and going. I haven't experimented too much but that's the only combo I found that worked. I could get other roms to boot with f2fs-all but couldn't get root to stick.
[Nexus 5 Original Android Development] matejdro:
How do I format /cache as f2fs? Recovery from first post will format it as ext4 (using Advanced Wipe menu. Is there other menu for that?).
[Nexus 5 Original Android Development] dechronic:
In TWRP. There is an option in advanced wipe to change or repair file system. From there you can change any of the three major partitions.

Android 5.0 Lollipop by Google

+

ElementalX Kernel by flar2

+

TWRP Recovery by TeamWin
[Nexus 5 Original Android Development] matejdro:
Are you talking about official TWRP or TWRP from the first post?

I'm using one from first post and under advanced wipe I can only check/uncheck partitions and slide to wipe.
[Nexus 5 Original Android Development] evertking:
Is the performance noticeably increased?
[Nexus 5 Original Android Development] cdonald:
Is there a consensus as to whether it is worth converting /system to f2fs? I've read you can get most of the performance gains from formatting only /cache and /data as f2fs...

Sent from my Nexus 5
[Nexus 5 Original Android Development] dechronic:
Latest TWRP as they have full support for f2fs now. In fact if you just rename a backup from EXT4 to F2FS and restore that backup TWRP will format the partition as F2FS and restore the files.

Android 5.0 Lollipop by Google

+

ElementalX Kernel by flar2

+

TWRP Recovery by TeamWin

---------- Post added at 09:45 AM ---------- Previous post was at 09:40 AM ----------

I can't do it with the system partition as yet with stock Android 5.0 Lollipop as formatting to F2FS leaves the partition with only 881MB if I remember correctly and OS needs 981MB. So I would have to remove some stuff from it to get it down to a size to fit.

Android 5.0 Lollipop by Google

+

ElementalX Kernel by flar2

+

TWRP Recovery by TeamWin
[Nexus 5 Original Android Development] nokiagye:
Hi I read many posts but I can't understand exactly where it make faster the phone..
[Nexus 5 Original Android Development] dechronic:
It is a file system created by a Samsung employee specifically for eMMC to utilize the technology to increase the performance and life of the flash memory. I can't remember where I read the info.

Android 5.0 Lollipop by Google

+

ElementalX Kernel by flar2

+

TWRP Recovery by TeamWin
[Nexus 5 Original Android Development] ironclad1911:
this is what i did :

1. wiped system, data and cache to f2fs

2. flashed manually stock system,boot,cache,userdata

phone successfully booted.....but when i went into storage total storage capacity is 12.55gb

i own a 32gb nexus 5

how can i fix this???

update:

fixed problem using fastboot format userdata

but i am still on ext4 :(
[Nexus 5 Original Android Development] Wakamatsu:
This step reformatted you back to EXT4.

I'm running f2fs-all Optipop.

https://plus.google.com/communities/112152563785863538123
[Nexus 5 Original Android Development] ironclad1911:
then what should i do??

flash rom and then wipe partitions to f2fs?

and im using twrp 2.8.2.0 as it has f2fs support

or smthing else?
[Nexus 5 Original Android Development] FlipDroid:
I wonder if this is what bricked my E4GT. I couldn't install anything with Odin and it wouldn't boot pass the GS2 logo screen.
[Nexus 5 Original Android Development] Wakamatsu:
You'll need a ROM that doesn't reformat your file system to EXT4 upon install and a kernel with a f2fs-compatible ramdisk.
[Nexus 5 Original Android Development] ironclad1911:
kernel is available but i was trying for lollipop so i guess i will have to wait for custom lollipop rom with f2fs support then
[Nexus 5 Original Android Development] Wakamatsu:
One is available. I posted the link.
[Nexus 5 Original Android Development] galapagos:
I really wasn't expecting much since I didn't see much noticeable improvement when I'd tried with KitKat. But I had some free time today and decided to try Optipop with f2fs.

To my surprise, it's a whole different story with Lollipop. I can really notice the difference with f2fs in data & cache. I hope other ROMs start to include the f2fs support.
[Nexus 5 Original Android Development] dechronic:
I am doing it with stock Lollipop. It's the kernel that mounts the f2fs partitions.

Android 5.0 Lollipop by Google

+

ElementalX Kernel by flar2

+

TWRP Recovery by TeamWin
[Nexus 5 Original Android Development] GR0S:
Experimental kernel with latest f2fs. Stick it to your ramdisk and try it.

Newer f2fs introduces FS repair, minor perfomance improvements and other stuff

http://rghost.ru/59471987
[Nexus 5 Original Android Development] cocchiararo:
Experimental kernel?
[Nexus 5 Original Android Development] Ntress:
I installed OptiPurity and Uber kernel and i also have only DATA to f2fs while system and cache partitions are still ext4.. how did you manage to get cache and system to f2fs?
[Nexus 5 Original Android Development] dechronic:
Modify the kernel's ramdisk. What kernel are you using. I may be able to mod it for you.

Android 5.0 Lollipop by Google

+

ElementalX Kernel by flar2

+

TWRP Recovery by TeamWin
[Nexus 5 Original Android Development] Ntress:
Uber kernel. It's f2fs compatible..
[Nexus 5 Original Android Development] dechronic:
Uber kernel seems to use the ramdisk from the currently installed kernel.

Here is the stock Android 5.0 kernel with the ramdisk modified for f2fs-all. This is a flashable zip for CWM or TWRP. Flash it, to place the ramdisk on the phone, and then immediately flash Uber kernel.

http://d-h.st/p57

EDIT: Upload is a dummy f2fs-all..see my later post.
[Nexus 5 Original Android Development] Ntress:
Thank you but i guess if I'll do that now it will format my data to change my system partition to f2fs, ain't it?
[Nexus 5 Original Android Development] Wakamatsu:
No, it simply won't boot properly or at all. Unless you flash a rom that's respects the existing file system on install (Optipop is the only one I'm sure of), you'll probably have to do some juggling to get all the partitions formated to f2fs.
[Nexus 5 Original Android Development] dechronic:
I use a little "trick" to change my partitions to f2fs without losing my data/settings, etc. Using TWRP recovery make a Nandroid backup of the partition(s) you want to convert to f2fs. When the backup is done rename the part of the backup file of the partition(s) from EXT4 to F2FS and restore it. TWRP automatically formats to that file system and restores the data.

For example, say the data partition backup file is called DATA-EXT4-12-13-2014 Rename it to DATA-F2FS-12-13-2014 and restore it. No loss of data or settings, etc.

Android 5.0 Lollipop by Google

+

ElementalX Kernel by flar2

+

TWRP Recovery by TeamWin
[Nexus 5 Original Android Development] nmlssit:
That's very interesting!

I tried once f2fs but I failed miserably.

Once did your trick, what I need to use f2fs? I want to try /data and /cache only, not f2fs-all. (will I notice a performance improvement with only data and cache?)

I am using latest Cataclysm and latest EX.
[Nexus 5 Original Android Development] dechronic:
I created a flashable zip (CWM or TWRP) to install the Stock Rom with F2FS entries in the ramdisk. It will NOT boot. However, if you are using a custom Kernel that uses the previous kernel's ramdisk, like ElementalX or Uber, then all you need to do is flash the zip I attached and then re-flash ElementalX (I assume that's what you meant by EX).

It will boot the /data & /cache partitions as f2fs.

You can do the "trick" I mentioned above before you flash the dummy kernel and EX.
[Nexus 5 Original Android Development] nmlssit:
So just to be clear (yes EX=ElementalX)

1. Nandroid data and cache

2. Rename ext4 to f2fs in the files backup

3. Restore them

4. Flash your zip

5. Reflash EX

Am I right ? That will boot and run flawlessly?

---------- Post added at 01:49 AM ---------- Previous post was at 12:51 AM ----------

@dechronic i think i messed something up.

I did the operation in the order i wrote, but at boot it asks me for a password. i enter one random and it says: "de-cryptography failed - The password entered is correct but the data is corrupted. blablabla is recommented a factory reset of the phone."
[Nexus 5 Original Android Development] dechronic:
The procedure you followed should have worked. That's what I did with mine.

That happened to me before with Kitkat when I was fooling around with some ROMs. I ended up having to wipe my data but I don't want you to do that. At least, not without copying the /data and /cache backups to a computer first.

What you can do is try change the filenames back to EXT4 if anything and restoring them. But it shouldn't boot.

It just occured to me. Did you change the EXT4 to F2FS for the /system backup too or only the /data and /cache? It should be only for the /data & /cache..
[Nexus 5 Original Android Development] nmlssit:
Only data and cache :/

It gave me a strange "error" (more likely a warning) while restoring f2fs data and cache, something like "attention, those partition are formatted f2fs, you should enable f2fs first" I can't remember exactly.. Are the flashing logs being stored somewhere?

Anyway the problem could be I am not using stock rom but cataclysm, as you mentioned.
[Nexus 5 Original Android Development] dechronic:
That shouldn't cause it, but if you want to try retoring the f2fs backups, dirty flash the rom, then the dummy stock kernel and then EX and see what happens.

---------- Post added at 11:52 PM ---------- Previous post was at 11:48 PM ----------

My bad. I gave you the boot.img for f2fs-all...I don't know how I did that...that's why you got that error. I just check the file I uploaded and saw my mistake..

I will fix and upload it in my next post

---------- Post added at 11:58 PM ---------- Previous post was at 11:52 PM ----------

I double and triple checked the file this time.

This one is for /data and /cache only.

The previous one was for f2fs-all and the kernel could not mount your ROM correctly.. That was my bad..

Download: http://d-h.st/j1Y
[Nexus 5 Original Android Development] nmlssit:
Same error! :(

Maybe I did something wrong in the trick you posted?

1.Nandroided data and cache

2.Reboot to system

3.Renamed ext4 to f2fs where available using Root Explorer

4.Restored them in TWRP.

And the warning in the restore is the following: "this partition is made using f2fs, it may not boot until you change back to f2fs".
[Nexus 5 Original Android Development] nmlssit:
Edit: Screenshot
[Nexus 5 Original Android Development] Wakamatsu:
In theory, restoring a f2fs backup over a ext4 fs should work as the back up will overwrite the existing format. In practice, I've had some troubles with this. Try transferring your back ups to your PC, use the formatting function in twrp to format your data/cache partitions to f2fs, transfer your back ups back to phone and then restore.
[Nexus 5 Original Android Development] reas0n:
Hello, could anybody help me to make the /data and /cache working with Hybrid Kernel?

I tried to use the image kitchen from here http://xdaforums.com/google-nexus-5/development/nexus-5-f2fs-tools-t2801977 but without any success.
[Nexus 5 Original Android Development] dechronic:
The image kitchen would work for any other configuration. You can still use it to extract the ramdisk.

Open the hammerhead.fstab (using Notepad++ if using Windows) and replace the lines for the partitions you want to make f2fs.

So for /data and /cache use the lines below that contain /data and /cache. Then run the repackimg.bat file to create the new kernel file. It will be called: image-new.img

Rename it to boot.img and add it back to the flashable zip with best compression or just flash the image-new.img via fastboot in the bootloader.

Of course this will ONLY work with a kernel that supports F2FS. If a kernel is built without f2fs support it will not boot.

/dev/block/platform/msm_sdcc.1/by-name/system /system f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,flush_merge,errors=recover wait,nonremovable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait,check
[Nexus 5 Original Android Development] drac0:
Hey guys/gals, can anyone help. I was reading last 6-7 pages but I'm in doubt how to actually do this f2fs thingy.

So lets say I'm running untouched Lollipop stock and I want to convert /data and /cache ONLY to f2fs. So I need to nandroid current data/cache partitions, rename them from ext4 to f2fs, restore them back to f2fs, flash corresponding f2fs kernel (in my case modified f2fs franco.kernel) then reboot, and thats it?

Do I need to dirty flash the stock ROM again or not, cos if I do that it will reformat those partitions back to ext4 right?

No data or settings are currently important to me as I'm just testing this and coming from a completely clean system. I just want to setup clean stock Lollipop with data/cache f2fs and modified franco kernel that [MENTION=5594433]dechronic[/MENTION] posted in another thread. Thanks for any help. Cheers all! :good:
[Nexus 5 Original Android Development] jazle:
How to rename files created to f2fs? I use TWRP 2.8.1.0 to create those backup but couldn't rename it using its built in file manager, I have tried to rename it using ES file Explorer, or Root Explorer without success.
[Nexus 5 Original Android Development] reas0n:
[MENTION=5594433]dechronic[/MENTION] thanks man! it worked!
[Nexus 5 Original Android Development] nmlssit:
So, i did that operations, this time with pure lollipop 5.0.1 stock released yesterday:

1. Nandroid

2. Saved the nandroid to my PC

3. Turned /data and /cache into f2fs with TWRP 2.8.1.0 (2.8.2.0 doesn't boot for me, strange)

4. Pushed back the Nandroid into /data/media/0/TWRP

5. Restored /data and /cache

6. Flashed dummy kernel, EX kernel 2.04 and SuperSU in that order ---> Bootloop.

7. Flashed dummy and EX ---> Bootloop.

I don't know what to do now, maybe my phone doesn't like f2fs :laugh:
[Nexus 5 Original Android Development] dechronic:
You know what, I might start doing videos. Haha laughing but I might do it. Try backing up the data and moving it to a PC and wipe the /data partition and make sure it is f2fs. TWRP advanced wipe, change filesystem shows current file system on selected partition.

Edit: give me until the weekend about the video thing. :D
[Nexus 5 Original Android Development] drac0:
3a. Wipe /data and /cache partitions

3b. Format partitions to f2fs

6. Flashed both kernels without booting or rebooting?

Also for TWRP issue try this, simply booting TWRP 2.8.1.0 (fastboot boot twrp-2.8.1.0.img), disabling MTP (under Mount), rebooting bootloader, and THEN flashing TWRP 2.8.2.0 (fastboot flash recovery twrp-2.8.2.0.img) might do the trick. Once MTP has been disabled (using 2.8.1.0) 2.8.2.0 seems more bug free and Lollipop compatible than 2.8.1.0 variant. :good:
[Nexus 5 Original Android Development] nmlssit:
OH YEAH.

I've understood what i was doing wrong. When restoring, cache was restored as ext4 even if i formatted it in f2fs. Only cache, not data, strange!

Anyway, thanks for the help! I'll look forward at your videos :)

Now time to test, at boot EX app crashed lol.

Edit: Thanks [MENTION=3418059]drac0[/MENTION] for the tip!
[Nexus 5 Original Android Development] dechronic:
I an glad you got it working :thumbup:
[Nexus 5 Original Android Development] drac0:
[MENTION=5594433]dechronic[/MENTION] can you please say a bit more on the issue of F2FS ALL, meaning what are the actual benefits on running system on top of F2FS since most speed and improvement is visible mostly on RW partitions, and not so with RO ones. Couldn't find anything more regarding reading/writing with F2FS on system partition. Thanks in advance. Cheers!
[Nexus 5 Original Android Development] nmlssit:
Anyway i am very interested in those how-to videos you want to make, especially how to modify boot.img ramdisk to avoid bothering you everytime a kernel update comes :D

---------- Post added at 07:56 PM ---------- Previous post was at 07:42 PM ----------

@drac0, i solved the TWRP issue by following this workaround: http://xdaforums.com/showpost.php?p=57245439&postcount=35
[Nexus 5 Original Android Development] drac0:
I'm also most interested into videos :p mainly for same reason, kernel updates!

[MENTION=4913635]nmlssit[/MENTION] yes very similar to boot recovery and then settle the issue, worked both ways, thanks for sharing! But I hope we soon get a new bug-free TWRP cos MTP is most useful inside recovery. Cheers! :good:
[Nexus 5 Original Android Development] milestone2mod:
Hey guys,

I did all the steps described on the pages before, but I'm alsways getting bootloops, and when I mount as f2fs, I can't get MTP in recovery nor ADB sideloading working.

I just want to have data and cache as f2fs, on cataclysm ROM with Code Blue Kernel.

Sorry if this is totally dumb, but I don't want to f**k up my phone over and over again. So what are the right steps to get f2fs on data and cache working?
[Nexus 5 Original Android Development] evertking:
I had luck with just backing up any important stuff... Porn ect... Boot twrp, got to repair or change file systems. . changed all but system to f2fs( seen something about system being way faster on ext4) loaded and flashed a compatible ROM and kernel. Bingo

There is a guide to a super easy way to convert any kk ROM to make it compatible. May give it a go
[Nexus 5 Original Android Development] drac0:
Make sure to rename nandroid backup file names from ext4 to f2fs, also note that partitions are actually f2fs formatted, if not transfer your backups to your PC, then wipe then format both /data and /cache partitions to f2fs. After that push back your backups to your device and restore them. THEN flash this http://d-h.st/j1Y dummy stock kernel then immediately after it your modified f2fs kernel. Dont forget to re-root and then just reboot. That should do the trick. :good:

For TWRP leave it MTP disabled for now until we have a working new version. Boot the 2.8.1.0 and disable MTP and then flash lastest 2.8.2.0 or just stay with 2.8.1.0 how ever your wish. Check the TWRP thread its all there. Good luck!
[Nexus 5 Original Android Development] dechronic:
I have a thread called Nexus 5 F2FS Tools with a converter based on one someone else created. The original thread can be found on my thread as my tools are for Windows only atm. The other thread has one for Linux / Mac too.
[Nexus 5 Original Android Development] nmlssit:
For getting adb to work while on recovery: https://edwardsamuel.wordpress.com/...-found-with-nexus-5-devices-in-recovery-mode/
[Nexus 5 Original Android Development] drac0:
Thanks a lot bud to you and to [MENTION=4544860]osm0sis[/MENTION] and to everyone participated in that tool. :good:

I've just set it up in linux and its working like a charm, will try for various kernels and see how it goes for both DATA and ALL arguments. I understand it only works for kernels which already supports f2fs, right?

BTW have you changed anything else in your franco.Kernel r69 which you posted recently in his thread?
[Nexus 5 Original Android Development] milestone2mod:
Thanks for the kind help, man!

My main problem was that when I formatted and changed data and cache to f2fs, I couldn't push the necessary files (aka the dummy kernel, the ROM and the real kernel) to the phone, neither with adb sideload nor MTP in TWRP. But I tried over and over again, on my desktop and my surface, and switchjed between ext4 and f2fs for about a hundred times, and then suddenly I could get MTP working after formatting and changing to f2fs (was using twrp 2.8.1.0, but don't ask me how I could get it working), and then all went very quick, I could transfer the kernel files, flash the dummy kernel and get the thing up booting.

So yeah, now I'm enjoying f2fs ;)

Just one more question: when flashing an update of Cataclysm, do I have to reflash the dummy kernel and then Code Blue to keep f2fs working? If not, what are the steps to update my ROM/Kernel whilst keeping f2fs intact?