• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[KERNEL][L][STOCK][5.1.1]intersectRaven's Kernel - 20151018_20XX

Status
Not open for further replies.
Search This thread

intersectRaven

Senior Member
Mar 13, 2010
2,260
1,558
www.intersectraven.net
Development Goals:
- stability
- energy savings due to more efficient ARM algorithms
- strictly no overclocking unless approved by the manufacturer or my source base integrates it (also, even if my source base integrates it, expect no support for it)
- no undervolting as well unless the manufacturer approves it since it's relatively pointless IMHO...
- all improvements should require MINIMAL user interaction (e.g. you don't need to do anything except flash the kernel or at the very least use SetCPU or the like to set fixed options)
- stability

*note: FAQ is at the 3rd post


20151018_20XX:
- some ramdisk cleanups for single image
- enabled KSM and ZRAM swapping for increased memory flexibility

20151015_15XX:
- added in partial resume support for *hopefully* better battery life
- tweak cubic algorithm just in case it's needed

20151003_20XX:
- added F2FS support (refer to 3rd post for MANUAL instructions on how to convert a partition to F2FS)

20151001_10XX:
- uploaded to personal site with updated compiler

20150922_16XX:
- tons of commits to improve power efficiency...just go to my GitHub... :p

20150831_19XX:
- added FIOPS IO scheduler and set it as default
- set FS options NOATIME and NODIRATIME always
- use 4k kernel stacks to save memory

20150815_18XX:
- first release for "back-to-basics" kernel
- turned off a ton of debugging options to improve performance

20150726_17XX:
- upgraded compiler

20150723_00XX:
- fixed bootloop while charging

20150702_23XX:
- modified ramdisk to support wifi properly on v2 of LeeDroid's Urbane port

20150623_22XX:
- more backports for improved efficiency
- changed kernel compression to XZ to make it even smaller
- limited maximum CPU frequency to 1Ghz to lower power consumption for multi version since mpdecision keeps on using max frequency too much

20150621_21XX:
- additional IPI reduction commits
- changed kernel compression to LZMA to make it smaller

20150620_17XX:
- reverted partial resume studies (seems to cause slowdowns somewhere but might also cause slightly more battery consumption)
- comment some printouts which are annoying
- kernel IPI improvements

20150617_23XX:
- minor improvements to reduce CPU load
- WiFi tweak
- rendering optimizations

20150612_08XX:
- added new feature for users of Urbane ROM which *might* also fix the bootup problem

20150611_09XX:
- added new image, wifi.multi.boot.img, which is multicore and with built-in wifi support so no need to flash Tasssadar's MOD when you upgrade the kernel (from an already modded ROM or from Urbane port)
***IF YOUR ROM IS NOT YET MODDED, DON'T USE THE WIFI.MULTI RELEASE SINCE IT MIGHT CAUSE AN ERROR WHEN YOU RUN TASSSADAR'S UPDATE ZIP***

20150607_09XX:
- back to usual local version tag
- rebased to newly released 5.1.1 Lenok branch on AOSP with some additions from Bass branch for WiFi throughput and energy saving

20150602_23XX:
- compiled using GCC 5.1
- special local version tag

20150602_08XX:
- modified panel to disable partial update since it seems to cause problems with current code (i.e. it disabled burn-in protection)
- special local version tag

20150531_18XX:
- removed a useless setting in the ramdisk which might cause increased CPU utilization thus less battery life

20150531_15XX:
- just added a new flashable image, multi-core for those who want...strictly for testing for now...I won't be responsible if your device explodes or burns off your wrist or something... :D

20150531_08XX:
- modified configuration with changes in Bass
- imported clock change for WiFi from Bass

20150530_08XX:
- has WiFi driver built-in waiting for ROM builders or modders to take advantage of
*we have WiFi here!
- first release for 5.1.1 based on Bass (Urbane) kernel source that was just released
20150503_16XX:
- rolled back previous changed as it increased battery consumption

20150423_23XX:
- ported one of my Kindle Fire modification which I just remembered could impact performance extremely well
- still has SELinux enabled as stock ROM doesn't play well with it disabled

20150412_21XX:
- numerous backports from linux 4.0 for timer, scheduler and ARM

20150411_21XX:
- numerous backports from linux 4.0 for timer, mutex and slub functionality performance improvements

20150411_19XX:
- tweaked kernel settings according to imoseyon's findings

20150410_18XX:
- timer optimization

20150409_00XX:
- merged Motorola's lowmemorykiller tree modification
- merged latest modifications to ondemand governor

20150402_07XX:
- uses updated Linaro toolchain
- integrated 5.0.2 changes in the kernel level (previous change was on the ramdisk level)
- some performance improvement commits

20150220_23XX:
- integrated changes for 5.0.2
*since changes were minimal, this might still work for 5.0.1...do that at your own risk though... :p

20150129_22XX:
- cherry-picked a patch for fixing the randomly occuring kernel BUG OOPS in smp_send_reschedule

20150127_22XX:
- fully tickless kernel
- adjust compiler tweaks even further
- reduce panel power consumption

20150117_18XX:
- updated my compiler with 15.01 Linaro gcc release source
- tweaked more compiler flags for maximum performance

20150112_22XX:
- first release with 2 kernels for single and dual core by default setup
- first release using my own compiler
- additional compiler flag optimizations
- merged NVidia power efficiency patches together with a scheduler optimization

20150103_18XX:
- enabled 2 cores and set to ondemand with maximum frequency limited to 800Mhz
- added several improvements from arter97's G Watch repo namely ARM instruction conversion to bx from mov pc, definition of L1 and L2 cache size for better compiler instruction generation and binder mutex change to real time for surfaceflinger improvement (in layman's term: graphics rendering improvement) :p

20141221_18XX:
- use compile time constants when possible for jiffies conversion
- several BT and i2c voltage tweaks to lower power consumption

20141217_00XX:
- same features as before only for Lollipop

20141206_07XX:
- enabled partial frame updates to hopefully improve screen power consumption
*not sure though since it might actually need ROM backing to work :confused:

20141203_17XX:
- added some filesystem optimizations
- compiled using Linaro 4.9.3

20141130_14XX:
- initial public release
- uses Linaro 4.9.2 for compilation
- enable use of UDIV/SDIV ARM instructions
- build-in byte-swap function
- memutils optimizations
- memcopy and string libraries now use glibc implementations
- optimized copy_page functions for ARM

Disclaimer:
Flash at your own risk. :)

You can find my other kernels at:
http://intersectraven.net/kernels
GitHub is at:


XDA:DevDB Information
intersectRaven's G Watch R Kernel, Kernel for the LG G Watch R

Contributors
intersectRaven
Kernel Special Features:

Version Information
Status: Stable

Created 2015-02-22
Last Updated 2015-02-22
 
Last edited by a moderator:

intersectRaven

Senior Member
Mar 13, 2010
2,260
1,558
www.intersectraven.net
FAQ:

1.) How do I flash this on my device?
Use the "fastboot flash boot" command since I don't really have the time to support creation of a recovery flashable file. Optionally, you could also use the "fastboot boot" command to use the boot image temporarily which will reset to stock after a restart.
*also, this device does not have a custom recovery *YET* as of the time of this thread's creation

2.) How do I return to stock kernel?
Use the "fastboot flash boot" command using the stock boot image I provided in another thread here. :)

3.) Will you be releasing frequent updates?
Right now I don't see anything else needed to improve this kernel as I am quite satisfied with it. You could post suggestions BUT they must have MINIMAL USER INTERACTION or will only seek to enable editing of certain values.

4.) How do you verify that it flashed correctly?
Well, if it booted after fastboot showed the "writing" dialog, then it should be ok already. If you're ultra paranoid that maybe fastboot is lying to you or the NSA doesn't want you to know that it didn't overwrite the stock kernel which contains their secret spy stuff that wants to know how frequently you exercise you could enter the ff. command through adb:

cat /proc/version

and the kernel should show #7 and intersectRaven there together with the date that the kernel was compiled which is what I use to indicate the release. :)

5.) I see two files at the link above. What should I flash?
In the site you'll see single.boot.img, dual.boot.img, multi.boot.img and wifi.multi.boot.img. This indicates how many cores are enabled by default upon boot and if it's wifi ROM ready. If you're a heavy user, you might want to go with dual.boot.img so that you have 2 cores available or maybe multi.boot.img so that it'll adjust to at most 4 cores WHEN NEEDED. If you just use your watch for notifications and want maximum power savings, use single.boot.img.

6.) What about the wifi.multi.boot.img?
This is mainly for an ALREADY MODDED ROM (by Tasssadar) OR the URBANE ROM. With this, when you flash you won't need to rerun the update.zip provided by Tasssadar. Again, ONLY RUN THIS ON AN ALREADY MODDED ROM. If you flash this then run Tasssadar's Mod, you WILL encounter errors.

6.) If I flash the single boot image am I stuck forever with just one core being enabled?
No. If your watch is rooted, you can enable a core (even all 4 if you wish) through adb. The boot images are merely separated for bootup default convenience.

7.) How do you enable WiFi?
Go here.

8.) How do you convert a partition to F2FS?
a.) Download the mkfs.f2fs file here.
b.) Download a custom recovery somewhere and boot it.
c.) Push mkfs.f2fs somewhere. (tested on /sbin directory)
adb push mkfs.f2fs /sbin/
d.) In adb, issue a mount command to find the partition you wish to format.
*note, you can only format cache and userdata partitions and IF you choose to format the userdata, that's equivalent to a factory reset
adb -> mount
e.) Issue the ff. command replacing the X part with the partition you wish to format:
mkfs.f2fs -l X
e.g. mkfs.f2fs -l cache /dev/block/mmcblk0p20
f.) Reboot. :)

OR use this modified TWRP by lion567! :)
 
Last edited:

tonu42

Senior Member
Nov 14, 2010
1,145
439
I see you disabled secure booting, any idea how to get this device rooted? I made a kernel myself and disabled secure booting but I can't seem to figure out the root shell part, I pushed su to /data/local/tmp and set permissions but I still cant move it to system/bin..... frustrating
 

intersectRaven

Senior Member
Mar 13, 2010
2,260
1,558
www.intersectraven.net
I see you disabled secure booting, any idea how to get this device rooted? I made a kernel myself and disabled secure booting but I can't seem to figure out the root shell part, I pushed su to /data/local/tmp and set permissions but I still cant move it to system/bin..... frustrating

I didn't disable secure boot I only replaced the kernel with my own. The ramdisk is exactly the same with stock. As for rooting, it's a bit tricky now due to SELinux being enabled. You could try disabling SELinux but that isn't really recommended. Also, I don't think modifying the system partition is good practice. You could just put it in the ramdisk so that it's recognized immediately as being "inside". I'll try and look into it further when I have time. I'm still looking at the battery consumption of my latest kernel for a few days so I can't modify until then. :)
 

tonu42

Senior Member
Nov 14, 2010
1,145
439
What do you mean by putting it in the ramdisk so its "inside"? I tried to do something like that with rootsh but it didn't work. Also when I unmkbootimg'ed your kernel it had stuff from dory, isn't dory the regular lg g watch? We are lenok? I know a lot of the stuff is the same, the main goal I want to do is root so I can increase the vibration motor, but if I can't accomplish root easily I will be forced to make my own custom system.img with the modified values...... that would be a pain to be able to share it.
 

intersectRaven

Senior Member
Mar 13, 2010
2,260
1,558
www.intersectraven.net
What do you mean by putting it in the ramdisk so its "inside"? I tried to do something like that with rootsh but it didn't work. Also when I unmkbootimg'ed your kernel it had stuff from dory, isn't dory the regular lg g watch? We are lenok? I know a lot of the stuff is the same, the main goal I want to do is root so I can increase the vibration motor, but if I can't accomplish root easily I will be forced to make my own custom system.img with the modified values...... that would be a pain to be able to share it.

Are you pertaining to the ramdisk or the kernel? I double-checked the ramdisk and there isn't any dory in there. As for the kernel, I used the lenok_defconfig so I don't really know if there is dory in there as well although they are derivatives so might be. I read your post in the other thread and it doesn't really need root to modify. You just need to give the user permission to those parameters so it can be changed through adb. :)
 

tonu42

Senior Member
Nov 14, 2010
1,145
439
Are you pertaining to the ramdisk or the kernel? I double-checked the ramdisk and there isn't any dory in there. As for the kernel, I used the lenok_defconfig so I don't really know if there is dory in there as well although they are derivatives so might be. I read your post in the other thread and it doesn't really need root to modify. You just need to give the user permission to those parameters so it can be changed through adb. :)

If only I knew how :(. Do I gotta edit init.d?
 

intersectRaven

Senior Member
Mar 13, 2010
2,260
1,558
www.intersectraven.net
If only I knew how :(. Do I gotta edit init.d?

I think the last time I did that I edited something in ueventd or something and not init.d although you could do that also. I'll have to check on what's the current best practice as I don't really like editing the ramdisk too much. :)

so... we dont have root never? :S


i ll flash ur kernel, thanks!

We'll have root eventually as more devs get the R but as of this time, no root yet! ;)
*Personally, I don't get the point of rooting the watch as it's got huge limitations (battery, screen, controls, etc.) that I don't see the point...but that's me... :p
 

9ain

Member
Nov 13, 2009
21
1
I think the last time I did that I edited something in ueventd or something and not init.d although you could do that also. I'll have to check on what's the current best practice as I don't really like editing the ramdisk too much. :)



We'll have root eventually as more devs get the R but as of this time, no root yet! ;)
*Personally, I don't get the point of rooting the watch as it's got huge limitations (battery, screen, controls, etc.) that I don't see the point...but that's me... :p

i want to change dpi :p
 

9ain

Member
Nov 13, 2009
21
1
No its not, strength and duration are two totally different setting files and methods in the kernel driver. It also has braking_ms which is the gap you notice in between vibrations.

The duration is what causes the motor to accelerate more and be more strength.... more duration=more strength (Until maximum possible).


/sys/class/timed_output/vibrator/amp
/sys/class/timed_output/vibrator/driving_ms

this is the files to change (we need root)
 

tonu42

Senior Member
Nov 14, 2010
1,145
439
The duration is what causes the motor to accelerate more and be more strength.... more duration=more strength (Until maximum possible).


/sys/class/timed_output/vibrator/amp
/sys/class/timed_output/vibrator/driving_ms

this is the files to change (we need root)

You listed two files. Go look in the kernel and look at the driver. Amp is related to the gain and the gain is in mV i believe. Of course increasing the duration will also make it feel stronger so increasing both helps.
 

intersectRaven

Senior Member
Mar 13, 2010
2,260
1,558
www.intersectraven.net
The duration is what causes the motor to accelerate more and be more strength.... more duration=more strength (Until maximum possible).


/sys/class/timed_output/vibrator/amp
/sys/class/timed_output/vibrator/driving_ms

this is the files to change (we need root)

I looked at doing this but it seems SELinux is going crazy and not recognizing attempts to override the sysfs protection so we either really need root, disable SELinux altogether (don't like), or set it in the kernel (no user override which I don't think people like). :(

You listed two files. Go look in the kernel and look at the driver. Amp is related to the gain and the gain is in mV i believe. Of course increasing the duration will also make it feel stronger so increasing both helps.

Yep it's in mV with a range of 0 - 100.
 

ElakNovAlamak

Senior Member
Aug 12, 2010
51
12
My ADB cant find the watch. My thought is that it is because computer cant find drivers to the watch when I connect it. Where can I find usb-drivers for my watch?
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 68
    Development Goals:
    - stability
    - energy savings due to more efficient ARM algorithms
    - strictly no overclocking unless approved by the manufacturer or my source base integrates it (also, even if my source base integrates it, expect no support for it)
    - no undervolting as well unless the manufacturer approves it since it's relatively pointless IMHO...
    - all improvements should require MINIMAL user interaction (e.g. you don't need to do anything except flash the kernel or at the very least use SetCPU or the like to set fixed options)
    - stability

    *note: FAQ is at the 3rd post


    20151018_20XX:
    - some ramdisk cleanups for single image
    - enabled KSM and ZRAM swapping for increased memory flexibility

    20151015_15XX:
    - added in partial resume support for *hopefully* better battery life
    - tweak cubic algorithm just in case it's needed

    20151003_20XX:
    - added F2FS support (refer to 3rd post for MANUAL instructions on how to convert a partition to F2FS)

    20151001_10XX:
    - uploaded to personal site with updated compiler

    20150922_16XX:
    - tons of commits to improve power efficiency...just go to my GitHub... :p

    20150831_19XX:
    - added FIOPS IO scheduler and set it as default
    - set FS options NOATIME and NODIRATIME always
    - use 4k kernel stacks to save memory

    20150815_18XX:
    - first release for "back-to-basics" kernel
    - turned off a ton of debugging options to improve performance

    20150726_17XX:
    - upgraded compiler

    20150723_00XX:
    - fixed bootloop while charging

    20150702_23XX:
    - modified ramdisk to support wifi properly on v2 of LeeDroid's Urbane port

    20150623_22XX:
    - more backports for improved efficiency
    - changed kernel compression to XZ to make it even smaller
    - limited maximum CPU frequency to 1Ghz to lower power consumption for multi version since mpdecision keeps on using max frequency too much

    20150621_21XX:
    - additional IPI reduction commits
    - changed kernel compression to LZMA to make it smaller

    20150620_17XX:
    - reverted partial resume studies (seems to cause slowdowns somewhere but might also cause slightly more battery consumption)
    - comment some printouts which are annoying
    - kernel IPI improvements

    20150617_23XX:
    - minor improvements to reduce CPU load
    - WiFi tweak
    - rendering optimizations

    20150612_08XX:
    - added new feature for users of Urbane ROM which *might* also fix the bootup problem

    20150611_09XX:
    - added new image, wifi.multi.boot.img, which is multicore and with built-in wifi support so no need to flash Tasssadar's MOD when you upgrade the kernel (from an already modded ROM or from Urbane port)
    ***IF YOUR ROM IS NOT YET MODDED, DON'T USE THE WIFI.MULTI RELEASE SINCE IT MIGHT CAUSE AN ERROR WHEN YOU RUN TASSSADAR'S UPDATE ZIP***

    20150607_09XX:
    - back to usual local version tag
    - rebased to newly released 5.1.1 Lenok branch on AOSP with some additions from Bass branch for WiFi throughput and energy saving

    20150602_23XX:
    - compiled using GCC 5.1
    - special local version tag

    20150602_08XX:
    - modified panel to disable partial update since it seems to cause problems with current code (i.e. it disabled burn-in protection)
    - special local version tag

    20150531_18XX:
    - removed a useless setting in the ramdisk which might cause increased CPU utilization thus less battery life

    20150531_15XX:
    - just added a new flashable image, multi-core for those who want...strictly for testing for now...I won't be responsible if your device explodes or burns off your wrist or something... :D

    20150531_08XX:
    - modified configuration with changes in Bass
    - imported clock change for WiFi from Bass

    20150530_08XX:
    - has WiFi driver built-in waiting for ROM builders or modders to take advantage of
    *we have WiFi here!
    - first release for 5.1.1 based on Bass (Urbane) kernel source that was just released
    20150503_16XX:
    - rolled back previous changed as it increased battery consumption

    20150423_23XX:
    - ported one of my Kindle Fire modification which I just remembered could impact performance extremely well
    - still has SELinux enabled as stock ROM doesn't play well with it disabled

    20150412_21XX:
    - numerous backports from linux 4.0 for timer, scheduler and ARM

    20150411_21XX:
    - numerous backports from linux 4.0 for timer, mutex and slub functionality performance improvements

    20150411_19XX:
    - tweaked kernel settings according to imoseyon's findings

    20150410_18XX:
    - timer optimization

    20150409_00XX:
    - merged Motorola's lowmemorykiller tree modification
    - merged latest modifications to ondemand governor

    20150402_07XX:
    - uses updated Linaro toolchain
    - integrated 5.0.2 changes in the kernel level (previous change was on the ramdisk level)
    - some performance improvement commits

    20150220_23XX:
    - integrated changes for 5.0.2
    *since changes were minimal, this might still work for 5.0.1...do that at your own risk though... :p

    20150129_22XX:
    - cherry-picked a patch for fixing the randomly occuring kernel BUG OOPS in smp_send_reschedule

    20150127_22XX:
    - fully tickless kernel
    - adjust compiler tweaks even further
    - reduce panel power consumption

    20150117_18XX:
    - updated my compiler with 15.01 Linaro gcc release source
    - tweaked more compiler flags for maximum performance

    20150112_22XX:
    - first release with 2 kernels for single and dual core by default setup
    - first release using my own compiler
    - additional compiler flag optimizations
    - merged NVidia power efficiency patches together with a scheduler optimization

    20150103_18XX:
    - enabled 2 cores and set to ondemand with maximum frequency limited to 800Mhz
    - added several improvements from arter97's G Watch repo namely ARM instruction conversion to bx from mov pc, definition of L1 and L2 cache size for better compiler instruction generation and binder mutex change to real time for surfaceflinger improvement (in layman's term: graphics rendering improvement) :p

    20141221_18XX:
    - use compile time constants when possible for jiffies conversion
    - several BT and i2c voltage tweaks to lower power consumption

    20141217_00XX:
    - same features as before only for Lollipop

    20141206_07XX:
    - enabled partial frame updates to hopefully improve screen power consumption
    *not sure though since it might actually need ROM backing to work :confused:

    20141203_17XX:
    - added some filesystem optimizations
    - compiled using Linaro 4.9.3

    20141130_14XX:
    - initial public release
    - uses Linaro 4.9.2 for compilation
    - enable use of UDIV/SDIV ARM instructions
    - build-in byte-swap function
    - memutils optimizations
    - memcopy and string libraries now use glibc implementations
    - optimized copy_page functions for ARM

    Disclaimer:
    Flash at your own risk. :)

    You can find my other kernels at:
    http://intersectraven.net/kernels
    GitHub is at:


    XDA:DevDB Information
    intersectRaven's G Watch R Kernel, Kernel for the LG G Watch R

    Contributors
    intersectRaven
    Kernel Special Features:

    Version Information
    Status: Stable

    Created 2015-02-22
    Last Updated 2015-02-22
    22
    I'll be releasing a new kernel in a bit since Google finally released the 5.1.1 kernel sources for all devices. :)
    12
    Thread closed due to me not wanting to comply with development council's command. Will be maintaining my kernels from my own site from now on. :fingers-crossed:
    10
    I'm getting pretty excited over a recent modification I made. Might of course be nothing but still, this is the first time I saw the expected battery estimate go up from 2 days to 4. :p

    *just me dreaming
    10
    FAQ:

    1.) How do I flash this on my device?
    Use the "fastboot flash boot" command since I don't really have the time to support creation of a recovery flashable file. Optionally, you could also use the "fastboot boot" command to use the boot image temporarily which will reset to stock after a restart.
    *also, this device does not have a custom recovery *YET* as of the time of this thread's creation

    2.) How do I return to stock kernel?
    Use the "fastboot flash boot" command using the stock boot image I provided in another thread here. :)

    3.) Will you be releasing frequent updates?
    Right now I don't see anything else needed to improve this kernel as I am quite satisfied with it. You could post suggestions BUT they must have MINIMAL USER INTERACTION or will only seek to enable editing of certain values.

    4.) How do you verify that it flashed correctly?
    Well, if it booted after fastboot showed the "writing" dialog, then it should be ok already. If you're ultra paranoid that maybe fastboot is lying to you or the NSA doesn't want you to know that it didn't overwrite the stock kernel which contains their secret spy stuff that wants to know how frequently you exercise you could enter the ff. command through adb:

    cat /proc/version

    and the kernel should show #7 and intersectRaven there together with the date that the kernel was compiled which is what I use to indicate the release. :)

    5.) I see two files at the link above. What should I flash?
    In the site you'll see single.boot.img, dual.boot.img, multi.boot.img and wifi.multi.boot.img. This indicates how many cores are enabled by default upon boot and if it's wifi ROM ready. If you're a heavy user, you might want to go with dual.boot.img so that you have 2 cores available or maybe multi.boot.img so that it'll adjust to at most 4 cores WHEN NEEDED. If you just use your watch for notifications and want maximum power savings, use single.boot.img.

    6.) What about the wifi.multi.boot.img?
    This is mainly for an ALREADY MODDED ROM (by Tasssadar) OR the URBANE ROM. With this, when you flash you won't need to rerun the update.zip provided by Tasssadar. Again, ONLY RUN THIS ON AN ALREADY MODDED ROM. If you flash this then run Tasssadar's Mod, you WILL encounter errors.

    6.) If I flash the single boot image am I stuck forever with just one core being enabled?
    No. If your watch is rooted, you can enable a core (even all 4 if you wish) through adb. The boot images are merely separated for bootup default convenience.

    7.) How do you enable WiFi?
    Go here.

    8.) How do you convert a partition to F2FS?
    a.) Download the mkfs.f2fs file here.
    b.) Download a custom recovery somewhere and boot it.
    c.) Push mkfs.f2fs somewhere. (tested on /sbin directory)
    adb push mkfs.f2fs /sbin/
    d.) In adb, issue a mount command to find the partition you wish to format.
    *note, you can only format cache and userdata partitions and IF you choose to format the userdata, that's equivalent to a factory reset
    adb -> mount
    e.) Issue the ff. command replacing the X part with the partition you wish to format:
    mkfs.f2fs -l X
    e.g. mkfs.f2fs -l cache /dev/block/mmcblk0p20
    f.) Reboot. :)

    OR use this modified TWRP by lion567! :)