Post Reply

[HOWTO][Bacon][F2FS-ALL] F2FS Filesystem

24th August 2014, 02:10 PM   |  #1  
gulp79's Avatar
OP Senior Member
Flag Rome
Thanks Meter: 73
 
143 posts
Join Date:Joined: Jul 2013
More
All-F2FS Partitions for Oneplus One

I am not responsible for any damage to your phone.
Make always a full nandroid backup.
Read before downloading or posting in the thread.
Proceed with caution if you have no experience.
Again, make always a full (including /data/media) nandroid backup.



[ What is F2FS ]
http://www.cnx-software.com/2013/01/...ces-elce-2012/
http://www.xda-developers.com/androi...-against-ext4/
http://en.wikipedia.org/wiki/F2FS


[ TESTED WITH ROMs ]

CM11 nightly
Slim Saber (tested by @Setting.Out)
CM11S stock using complete guide with ak boot.img from CM11S kernel. (tested by @Leicxan)
Calkulin's_OPO_ROM (tested by @DarkAngel-81)
Madhi
Gummy (tested by @Setting.Out)
EOS (tested by @Setting.Out)
Slim (tested by @Setting.Out)


(if you test other roms, please report here, so we can track working roms)

Use these recoverys to work with F2FS partitions:
CWM Advanced Edition - PhilZ Touch
or
TWRP - Multirom enabled




this guide for All-F2FS on OPO is based on guide of ronedogg.
Original thread: http://forum.xda-developers.com/show....php?t=2694201



[ Prebuild ROM ]


Download a F2FS ready ROM:
CM-11-20140930-NIGHTLY-bacon-F2FS
CM-11-20140920-ROBBIEL811-SM4.8-bacon-F2FS
Calkulin's stock rooted XNPH33R-F2FS (thanks to @LookedPath)
Madhi 8-30 build-F2FS (thanks to @SchmilK)
SlimSaber-F2FS (thanks to @dexxa05)
Droidkang-F2FS (thanks to @SchmilK)
Carbon-F2FS (thanks to @Setting.Out)


1. Flash Philz Recovery with F2FS support.

WARNING make a FULL nandroid backup, and place it on external storage, also SD partition will be formatted
2. Boot to the Philz Recovery, format /system /cache and "/data and /data/media" to F2FS
3. Flash the downloaded modified rom, (install the gapps.zip if needed) and AK Kernel for your rom.
4. Reboot & enjoy the new speed!


[ Easy Way First time format in F2FS]
[ without using a prebuild F2FS enabled rom ]
 

1. Download latest CM nightly or CM11S
2. Download:
F2FS-ALL-CM11.zip for CM11
F2FS-ALL-CM11S.zip for CM11S ( tanks to @Setting.Out)
and extract boot.img and updater-script
3. Copy the extracted boot.img in rom zipfile overwriting original one (tested with 7zip)
4. Copy the extracted updater-script in rom zipfile overwriting original one, for cm11 is located under .\META-INF\com\google\android\.
5. Flash Philz Recovery with F2FS support.

WARNING make a FULL nandroid backup, and place it on external storage, also SD partition will be formatted
6. Boot to the Philz Recovery, format /system /cache and "/data and /data/media" to F2FS
7. Flash the modified CM nightly zipfile, the gapps.zip and AK Kernel ( for this step, i've used an OTG cable and an external hdd, because the phone now is completely empty, or use ADB sideloading)
8. Reboot & enjoy the new speed!


[ Easy Way Upgrading a rom with partition already on F2FS ]

[ without using a prebuild F2FS enabled rom ]

 
1. Download latest CM nightly (https://download.cyanogenmod.org/?device=bacon)
2. Download F2FS-ALL-CM11.zip and extract boot.img and fstab.grouper
3. Copy the extracted boot.img in the CM nightly zipfile overwriting original one
4. Copy the extracted fstab.grouper in the CM nightly zipfile overwriting original one, located under .\META-INF\com\google\android\
5. Flash the modified CM nightly zipfile, and AK Kernel
6. Reboot



[ Complete guide to manually modify the rom ]


 
This is the exact procedure i've used for CM11 (OPO ready)
to unpack/repack the boot.img i've used http://boot-repacker.blogspot.it/

Oneplus ONE - CM Nightly with All-F2FS

1. Download latest CM nightly
2. Download AK kernel zipfile
3. Open CM nightly zipfile, extract the boot.img
4. Open AK kernel zipfile, extract the zImage and rename it boot.img-zImage
5. Unpack the boot.img in step3
6. Replace the boot.img-zImage in step5 with AK boot.img-zImage (step4)
7. Replace fstab.grouper content with this one

Code:
# Android fstab file.
#                                               
# 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/msm_sdcc.1/by-name/system       /system         f2fs    ro,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,errors=recover wait,nonremovable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4
/dev/block/platform/msm_sdcc.1/by-name/cache        /cache          f2fs    noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait
/dev/block/platform/msm_sdcc.1/by-name/persist      /persist        ext4    nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot         /boot           emmc    defaults                                                        defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery     /recovery       emmc    defaults                                                        defaults
/dev/block/platform/msm_sdcc.1/by-name/misc         /misc           emmc    defaults                                                        defaults
/dev/block/platform/msm_sdcc.1/by-name/modem        /firmware       vfat    ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0        wait

/devices/platform/xhci-hcd                          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 edit these lines:

Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
replace it with
Code:
run_program("/sbin/busybox", "mount", "/data");
this

Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
replace it with
Code:
run_program("/sbin/busybox", "mount", "/system");
and these

Code:
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");
replace with
Code:
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
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 Philz Recovery with F2FS support.

WARNING make a FULL nandroid backup, and place it on external storage, also SD partition will be formatted
12. Boot to the Philz Recovery, format /system /cache and "/data and /data/media" to F2FS
13. Flash the modified CM nightly zipfile, the gapps.zip and AK Kernel ( for this step, i've used an OTG cable and an external hdd, because the phone now is completely empty, or use ADB sideloading)
14. Reboot
15. Enjoy the new speed!



thanks to:
@ak for the kernel
@Phil3759 for recovery
@ronedogg for original guide
@katinatez & @johnnyslt for OPO F2FS enabled Philz Recovery
Last edited by gulp79; Today at 11:28 AM.
The Following 11 Users Say Thank You to gulp79 For This Useful Post: [ View ]
24th August 2014, 02:11 PM   |  #2  
gulp79's Avatar
OP Senior Member
Flag Rome
Thanks Meter: 73
 
143 posts
Join Date:Joined: Jul 2013
More
reserved
24th August 2014, 03:30 PM   |  #3  
Senior Member
Thanks Meter: 25
 
126 posts
Join Date:Joined: Dec 2011
More
Tested,work with stock cm11s XNPH33R
I just followed step 1~7 then i restored my nandroid backup
Here's my method
Step 8,repack boot.img at first,then i use fastboot command to flash boot.img.
Step 9, Boot in to Philz Recovery, flash AK kernel ,reboot your phone
Step 10, enjoy your phone with Full F2FS

Using Complete guide from OP sholud work, you can use this rom, Calkulin's_Stock_OPO_XNPH33R_ROM_v1.0

sorry for my english
The Following User Says Thank You to Leicxan For This Useful Post: [ View ]
24th August 2014, 04:12 PM   |  #4  
sublimaze's Avatar
Senior Member
Thanks Meter: 575
 
1,688 posts
Join Date:Joined: Oct 2010
Any noticeable performance gains? Is it worth the effort?
25th August 2014, 01:44 AM   |  #5  
Senior Member
Thanks Meter: 25
 
126 posts
Join Date:Joined: Dec 2011
More
Hi gulp79, do you have problem with power off charging? I stucked at oneplus logo , battery logo wasn't show up,I'm using AK kernel with full f2fs.
25th August 2014, 05:21 AM   |  #6  
Junior Member
Flag Daegu
Thanks Meter: 0
 
4 posts
Join Date:Joined: Aug 2014
More
Thumbs up STOCK XNPH33R is good work, too
Thanks to @gulp79, @Leicxan

I do Leicxan's Guide, good work now.

XNPH30O-bacon-signed-fastboot.zip flash -> XNPH33R Update -> nandroid full backup

kernel : cm11s/stock: ak.031.opo.cm11s
recovery : bacon_philz_touch_6.57.5_katinatez.zip

sorry for my english
Last edited by zzori; 25th August 2014 at 07:54 AM. Reason: add content
25th August 2014, 08:24 AM   |  #7  
gulp79's Avatar
OP Senior Member
Flag Rome
Thanks Meter: 73
 
143 posts
Join Date:Joined: Jul 2013
More
Quote:
Originally Posted by sublimaze

Any noticeable performance gains? Is it worth the effort?

i didn't have time to run a benchmark before and after the conversion, btw the boot time is a lot better now.
25th August 2014, 10:25 AM   |  #8  
Senior Member
Thanks Meter: 25
 
126 posts
Join Date:Joined: Dec 2011
More
Quote:
Originally Posted by zzori

Thanks to @gulp79, @Leicxan

I do Leicxan's Guide, good work now.

XNPH30O-bacon-signed-fastboot.zip flash -> XNPH33R Update -> nandroid full backup

kernel : cm11s/stock: ak.031.opo.cm11s
recovery : bacon_philz_touch_6.57.5_katinatez.zip

sorry for my english

Can you conform if power off charging works after convert to f2fs? For me it's not working.
25th August 2014, 10:25 AM   |  #9  
gulp79's Avatar
OP Senior Member
Flag Rome
Thanks Meter: 73
 
143 posts
Join Date:Joined: Jul 2013
More
Quote:
Originally Posted by Leicxan

Hi gulp79, do you have problem with power off charging? I stucked at oneplus logo , battery logo wasn't show up,I'm using AK kernel with full f2fs.

with phone off i too have this problem, but i don't know if is related to FS.
25th August 2014, 10:37 AM   |  #10  
Junior Member
Flag Daegu
Thanks Meter: 0
 
4 posts
Join Date:Joined: Aug 2014
More
Result
Quote:
Originally Posted by Leicxan

Can you conform if power off charging works after convert to f2fs? For me it's not working.

1. Power Off (83%)
2. Connect Charge cable => 1+1 Logo .............. continue

after 3min

3. Power On => (85%) +2%

I'll go home retesting.

※ Do not use "Settings - Backup & reset - Factory data reset" !!
Philz recovery unlimit loop and reset all data T.T

Sorry for my english T.T

Post Reply Subscribe to Thread

Tags
f2fs
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in ONE General by ThreadRank