[Desire HD Android Development] jrior001:
F2FS for ACE

AOSP only!

S-ON USERS SEE ADDITIONAL INSTRUCTIONS BELOW

Should work on all current CM12 or most any of our LP-based AOSP ROMs around here that use a current CM based kernel/trees

THIS IS EXPERIMENTAL AND HAS POTENTIAL FOR DATA LOSS IF DONE IMPROPERLY. IF YOU ARE NOT COMFORTABLE WITH THAT PLEASE DO NOT ATTEMPT. I CANNOT BE AVAILABLE FOR 24/7 SUPPORT ON THIS.

These mods will provide the ability to format /data and /cache in F2FS format instead of EXT4. Use extreme caution. The will erase your entire /data partition just like a clean flash. I cannot and will not be held responsible for your failure to keep backups handy. F2FS is still considered experimental by Samsung and should be by you the user as well.

What is F2FS?

F2FS wiki

Why F2FS?

F2FS put to the test vs EXT4

How to switch?

PLEASE READ INSTRUCTIONS CAREFULLY. IF NOT FOLLOWED YOU WILL LIKELY BOOTLOOP!!

F2FS capable TWRP Recovery This is the same link the current 2.8.1.1 TWRP built with the added F2FS support commits. When wiping a partition you will have the option to reformat in F2FS now as well.

Fstab conversion zip Fstab is the file used by the kernel to determine how to mount all partitions. CM default is all EXT4. To utilize F2FS we need to modify your fstab. This installer is for use only when you are already running a F2FS kernel and only need to update fstab after switching to/from F2FS/EXT4. This installer will only unpack, edit the fstab according to your current partitions and repack the boot.img. This will not replace the kernel, you must already be using an F2FS kernel or be returning to EXT4 only to make use of this zip.

DOWNLOADS NOW HOSTED @ CODEFI.RE

http://downloads.codefi.re/jrior001/Ace

Procedure for fresh conversion including new Rom flashing:

1. Backup everthing you want to keep with titanium backup or whatever backup you choose.

2. Fastboot flash the new TWRP recovery img if you are not already on it.

3. Run a twrp backup in case things get ugly!

4. Flash new ROM now if desired.

5. Still in recovery...Goto wipe -> hit Advanced wipe. Select data and hit "Repair or change filesystem". Convert to F2FS. Repeat for cache.

6. Flash the fstab conversion zip.

7. Reboot and profit. Any partition app on market can confirm new format changes.

Procedure for nightly ROM updates after F2FS conversion:

1. Flaah nightly ( manually, do not let OTA update flash on its own, you will not be given the chance to flash fstab zip and you WILL BOOTLOOP. Should this happen return to recovery and perform step 2)

2. Flash fstab conversion zip.

3. Reboot and profit.

Procedure if you want to convert back and forth after initial conversion for testing purposes:

1. Change formats of data/cache as desired (only ext4 and f2fs supported).

2. Flash fstab conversion zip to update format types before attempting boot.

S-ON USERS

If someone has S-ON device, you still can use it like this:

After flashing ROM, reboot to bootloader and fastboot flash boot.IMG provided in ROM.zip as normal. This is required to get any new kernel updates. Return to recovery and make your desired f2fs changes and flash the f2fs script.

After you flashed this f2fs script, the modified boot image will be located at: /tmp/newboot.img

Now we need to download it by using adb in recovery: adb pull /tmp/newboot.img boot.img

After that, you can flash boot.img via fastboot and reboot as usual. (fastboot flash boot boot.img)

CHANGELOG
V1.0 - Initial release

V2 - switch to by-name fstab entries to go with cm12 nightlies after 1/9/15

V2.1 - typo fix

V3 - corrects fstab name after file name change introduced in 1/14 nightlies and beyond

Source:

Kernel: https://github.com/OpenDesireProject/android_kernel_htc_msm7x30/tree/cm-12.0

Device tree: https://github.com/OpenDesireProject/android_device_htc_ace

Fstab scripts: https://github.com/jrior001/f2fs_fstab_convert_script

Devs, feel free to use or modify any of this for your own work just give thanks to where it came from. It was not all my original work, I must give thanks to Metallice and a few other devs in the grouper forum whose scripts I adapted for my own work.

Contributors

jrior001 [MENTION=3382363]Mustaavalkosta[/MENTION], [MENTION=1850590]paulb-nl[/MENTION] and any others that have helped keep msm7x30 alive

Kernel Special Features: f2fs support

Version Information

Status: Beta

Current Beta Version: 1.0

Beta Release Date: 2015-01-06

Created 2015-01-06

Last Updated 2015-01-06