[ROM][AK/Tyr/Render][5.1.1][F2FS] Sultanxda's Cyanogenmod CAF ROM with F2FS support

lemon07r

Senior Member
Apr 8, 2013
132
66
0
TL;DR
Sultanxda's Cyanogenmod CAF ROM + DerRomTester's Tyr-CAF Kernel / ak's CAF Kernel / RenderBroken's CAF Kernel modified to work on 2p F2FS (F2FS /data and /cache, keep /system on ext4 please!), this will not work on any other partition schemes! Scroll to the bottom of this post for download and instructions.

STATE OF PROJECT - Sorry guys, I have been inactive for a while due to work and money problems, finally got a bit of free time before work. I've updated the project to be inline with sultanxda's latest builds AND I have also added render kernel and ak kernel variants. Enjoy!

Introduction
Hello everyone, I've been around for a while, but have not had anything worthwhile posting as I spend most of my time tinkering with my own and other's phones and tablets as hobby. Some of the more interesting things I've encountered as of recent are CAF, which led me through many roms and kernel, and then eventually @Sultanxda's CAF Cyanogenmod Rom which is probably the best I have used in a long long time! However I am a big fan of the F2FS file system as well so I went ahead and put this together on my day's free time for myself, but I felt like sharing with those of you who might be interested.
Since @Sultanxda's amazing rom [ROM+KERNEL][5.1.1] Unofficial CyanogenMod 12.1 with CAF 3.4.0 kernel does not officially support F2FS I went ahead modified the fstab, updater-script and replaced the kernel with @DerRomtester's [KERNEL] [CAF] [UBERTC] Tyr-CAF Kernel as it has F2FS support and is originally based off of Sultanxda's CAF kernel.
UPDATE - I've added more flavors! This rom comes in ak and render kernel variants now!


So What is CAF?
CAF stands for Code Aurora Forums.
Code Aurora Forum (CAF) is a consortium of companies with projects serving the mobile wireless industry. Software projects it concerns itself with are e.g. Android for MSM, Femto Linux Project, LLVM, MSM WLAN and Linux-MSM. Code Aurora is basically AOSP plus all Qualcomm specific enhancements and optimization.
As explained in the AOSParadox Project page (A really cool project, vanilla CAF AOSP rom, definitely worth checking out).


So What is F2FS?
Wiki: F2FS (Flash-Friendly File System) is a flash file system initially developed by Samsung Electronics for the Linux kernel.
The F2FS file system boasts superior performance in comparison to the EXT4 file system (which is used as the default filesystem used for /data, /system and /cache) in /data and /cache (/system performs best with EXT4 file system). Click here for some benchmarks/analysis'!


What's so Great About @Sultanxda's rom?
I love this rom because of the strong emphasis put into stability and keeping it clean. Take a look at it's features (taken from here):
ROM features:
  • Based off latest generic CyanogenMod 12.1 nightly source
  • OTA updates via built-in CMUpdater
  • Vanilla CAF LA.BF.1.1.1_rb1.26 display HAL (improved display performance)
  • Vanilla CAF LA.BF.1.1.1_rb1.26 media HAL (improved video performance)
  • Vanilla CAF LA.BF.1.1.1_rb1.26 audio HAL (improved audio performance)
  • OxygenOS camera libraries (no camera bugs and improved camera performance)
  • Snapdragon Camera app by Qualcomm (comes with many unique features, such as high-speed recording with audio)
  • Custom camera HAL I modified myself from CAF featuring:
    -Slow-motion video recording at 60 FPS, 90 FPS, and 120 FPS for 720p, and 60 FPS for 1080p
    -High-speed video recording with audio at 60 FPS, 90 FPS, and 120 FPS for 720p, and 60 FPS for 1080p (you need to use the Snapdragon Camera app in order to use high-speed recording)
    -1080p video recording with the front-facing camera
    -2.5k 1440p video recording with the front-facing camera and back camera (only with the Snapdragon Camera app that comes with the ROM)
    -4k video recording at UHD and DCI resolutions
    -Manual focus
    -Slow shutter (ranging from 1/5000th of a second to 2 seconds)
    -More picture sizes than plain OxygenOS, such as 9.7MP 16:9
    -JPEG quality is always set to 100% (pictures are very high quality)
  • Disabled Qualcomm performance daemon (CPU boosting is now handled completely by the driver I wrote)
  • 2 CPU cores are not forced online all the time (saves power this way)
  • WiFi configuration from LG G3 (better WiFi performance and stability)
  • Many other misc. optimizations
Kernel features:
  • Based off latest CAF LA.BF.1.1.1_rb1.26 kernel source from Qualcomm
  • Almost 100% pure CAF (very clean, there shouldn't be any crazy stability or performance issues)
  • Removed lots of excessive debugging
  • Latest CAF LA.BF.1.1.1_rb1.26 prima (WiFi) drivers
  • Rewrote half of the Synaptics touchscreen driver (over 2500 lines of code modified; your touchscreen might work better)
  • Newest available Synaptics touchscreen firmware (no battery drain)
  • Dynamic CPU input boost driver I wrote myself (makes the phone feel smooooth)
  • CPU underclocked to 1958MHz by default (you can disable this; see why I did this in the FAQ in the 3rd post)
  • Improved notification LED color (white doesn't have a blue tint)
  • Vibrator is automatically disabled when recording videos (so the buzzing noise doesn't get in the videos)
  • Custom thermal driver I wrote myself (keeps the phone cool)
  • LCD KCAL by Savoca
  • Westwood TCP congestion algorithm (enabled by default)
  • NTFS support
  • No BS patches, features, or compiler "optimizations"
  • Many other misc. optimizations

Why use Tyr-CAF Kernel?
@Sultanxda's rom does not support F2FS out of the box. The first thing required to get f2fs support, is a kernel that supports it, that's where @DerRomtester's Tyr-CAF kernel comes into play. It's based off of @Sultanxda's original CAF kernel but offers more customization and F2FS support.
Differences to @Sultanxda's kernel:
  • - replaced Mpdecision with cpuquiet
  • - Stock CPU frequency table (no underclock by default)
  • - charge control ( i hope it is working)
  • - more I/O schedulers (bfq default)
  • - disabled Add Random, CRC, I/O Stats and Rotational for better performance
  • - francos sound control
  • - added option to enable/disable fsync
  • - default TCP algorithm: westood (enabled all available)
  • - added an option to enable/disable gentle fair sleepers (disabled by default for better battery + performance)
  • - tuned performance profiles
  • - PVS/SPEED level interface (you can see that inside synapse)
  • - GPU stats for each frequency
  • - change kernel compression to XZ
  • - tuned the LED color
  • - lowerd GPU voltage constraints
Want @ak's kernel instead?
ak is pretty well known for his great kernel work on the OnePlus One, his caf kernel now supports F2FS too! Check out his thread here!


@RenderBroken's linux 3.4.108 kernel! Bleeding edge and multirom support!

Like using bleeding edge kernels or need a kernel with KEXEC (multirom) support? Check out @RenderBroken's CAF kernel! Here is a quick overview of some of it's features:
* Linux 3.4.108
* Synapse Support - Complete Kernel Control!
* Built with Uber 5.2 GCC Toolchain
* MSM_Hotplug, Intelliplug, and MSM_MPDecision (Bricked) all flavored by @neobuddy89
* MSM_Limiter by @neobuddy89 - More like a Swiss army knife! adds Per-Core Functionality!
* New State Notifier Driver by @neobuddy89 !
* Franco's Simplified Thermal Control!
* Govs - Intelliactive, IntelliMM, Impulse, Yankactive, Blu_Active, SmartMAX, ZZMoove, Conservative, Lionheart
* IO Scheds - FIOPS, ROW, BFQ-v7, SIO, DEADLINE, NOOP, CFQ and ZEN Schedulers
* Franco Sound Control
* Frandom
* Complete Color Calibration Thanks to @savoca
* USB Fast Charge (ON/OFF Toggle)
* New LZ4 Compressor/Decompressor: Just plain fast!
* Added Sysfs for GENTLE_FAIR_SLEEPERS
* Quick Wakeup (More Info)
* FSync
* KEXEC Support (MultiRom)
* Adreno_Idler
* Power Aware Scheduling
* Voltage Control
Step by Step Guide and Downloads:

Step 1 (and Recovery download link)
Make sure to partition /data and /cache to F2FS first!
You need a recovery that supports formatting to F2FS to do this.
That means a modified version of TWRP or CWM.
You can find recoveries that support F2FS here. @katinatez recommends that you use his unofficial_twrp_2.8.6.1-bacon-dark.zip as it was the last version to support backing and flashing new modems, & firmware.
DO NOT USE TWRP 2.8.7.0 - TWRP v2.8.7.0 cannot properly update the modem
If using twrp (the one from above) you boot into recovery, go to wipe, advanced wipe, select Data, FS OPTIONS, CHANGE FS, F2FS, then swipe to wipe.
Do the same for cache; wipe, advanced wipe, select Cache, FS OPTIONS, CHANGE FS, F2FS, then swipe to wipe.

Step 2
Boot into recovery and wipe system, data and cache.
Download the rom (found at the bottom of this post).
Download lollipop gapps of your choice.
OPTIONAL:
Download UKM from the kernel developers respective master thread (check sources or tl;dr). You can install synapse or another kernel tweaker from the play store afterwords and tweak the kernel settings to your liking with this.

Step 3
Now to install the rom there are two methods. PS - This can take up to a couple minutes, do not be alarmed if you are on "patching unconditionally" for a bit.
Method A (mtp, easy way)
Enable mtp mode and put your rom and gapps on your phone.
Go to install, find the zips u saved to your phone and install them, rom first.
OR
Method B (adb, harder way)
If you have adb on your pc you can use this method.
Boot into recovery and go to Advanced > ADB sideload.
From you computer open up command prompt and enter the command
Code:
adb devices
to check if computer recognizes your phone.
If not install the adb interface driver manually for your phone.
Use this command to install zips from your pc (rom first):
Code:
adb sideload name_of_file.zip
Repeat with gapps (and ukm if you want it).
OR
Method C (OTG, unusual way)
You can use a usb-otg cable and a usb stick with the zips on it to install via twrp.

DOWNLOAD

Make sure you have read the instructions first!
- Tyr CAF Builds: Android File Host || Dev-Host
- ak CAF Builds: Android File Host || Dev-Host
- Render CAF Builds: Android File Host || Dev-Host
- All builds: Android File Host || Dev-Host || MEGA

Updating your rom
Download the latest build of this rom OPTIONAL download gapps again too (sometimes play service gets messed up for some reason, so I think it's a good opportunity to update your gapps too)
Save the zips to your phone (or you can use sideload)
Dirty flash the rom and then gapps. Wipe cache/art(dalvik) cache.
Boot system, and you good.



Version Information
Status:
ROM - Stable
Kernel - Varies

Kernel Source(s): DerRomTester's Tyr-CAF Kernel
ak's CAF Kernel
RenderBroken's CAF Kernel
Rom Source: Sultanxda's Cyanogenmod CAF ROM

Created 2015-09-12
Last Updated 2015-09-29

Credits: @Sultanxda (rom) @ak (kernel) @RenderBroken (kernel) @DerRomtester (kernel) @katinatez (recovery) @gulp79 (f2fs guide) @zaphodbeeb (f2fs guide) @osm0sis (android image kitchen) And Everyone Else who has Contributed to the Android Community and Development! Let me know if I missed anyone worth mentioning here!

I've tested and verified this to be working on my own phone! If you have any issues I would check the relative rom or kernel threads.

Screenshots! Now I've never judged anything by benchmarks because real world use is more important, but I thought it would be fun to post. I was getting 44k on antutu when I was on exodus rom with ak kernel. This my antutu score on default kernel settings with Tyr kernel v15 (my first build/release), I bet it can be tweaked for more!
 
Last edited:

MegaDJPlay

Senior Member
Apr 21, 2012
339
50
0
Cowabunga
Thanks for this wonderful work, gonna test it tonight for sure ;)

Enviado do meu A0001 através de Tapatalk

---------- Post added at 11:05 PM ---------- Previous post was at 11:03 PM ----------

I cannot download it...

Enviado do meu A0001 através de Tapatalk
 

lemon07r

Senior Member
Apr 8, 2013
132
66
0
I click on the big "Download blue button" and it just opens the a new web page with the same download link... Anyway I'm doing it on Android, let me check on PC.

Enviado do meu A0001 através de Tapatalk
Ah I see, I will upload it to a mirror in the meanwhile then so others don't have the same issue.
 

lemon07r

Senior Member
Apr 8, 2013
132
66
0
Testing right away mate! Can i change to ak kernel?
Originally I tried this with the ak caf kernel but got stuck in bootloops. However it is based off @Sultanxda's caf kernel as well so I assume it is supposed to work here, however I am not sure how well it currently support f2fs if it supports it at all. I went ahead with tyr-caf kernel as it already has good implementation in f2fs. You can always give it a try and flash back to the tyr-caf kernel if it doesn't go well.

Ak caf kernel:
http://forum.xda-developers.com/oneplus-one/orig-development/kernel-ak-t3189886

Tyr-caf kernel:
http://forum.xda-developers.com/oneplus-one/development/kernel-tyr-caf-3-4-07-07-2015-t3151971
 

lemon07r

Senior Member
Apr 8, 2013
132
66
0
As a third method will using a USB flash drive and otg cable work?
I don't have a otg cable to try this with, so I can't say. However I believe twrp does support otg (I might completely wrong) so if this is the case, yes you can use a flash drive and otg cable. I would go through the recovery setting to see if OTG is ok before going ahead and trying it.
EDIT - Yes you should be able to OTG, I see a mount option for USB-OTG in the twrp recovery. However I can't verify if it works.
EDIT 2 - I believe that's not the way you would do it though. If you go to install, and go back directories (all the way to root), there is a folder called otg, I believe if you have a usb-otg hooked up, it would be mounted here. So you would install from here. I will look into this a little more and update the master post once I find a verified method to installing through otg.
 
Last edited:
  • Like
Reactions: Miksel12

ksigit

Senior Member
Feb 9, 2014
313
132
0
This ROM feels great, smooth, battery life is excellent. Kudos to the developer.. Anyway I notice that multirom has some issues with the kernel. Although secondary ROMs installed OK, It boot straight to primary without showing boot preference..
Anybody experiencing this? Will try other kernels to make sure..
 

katinatez

Senior Member
Mar 17, 2011
2,884
18,746
203
I don't have a otg cable to try this with, so I can't say. However I believe twrp does support otg (I might completely wrong) so if this is the case, yes you can use a flash drive and otg cable. I would go through the recovery setting to see if OTG is ok before going ahead and trying it.
EDIT - Yes you should be able to OTG, I see a mount option for USB-OTG in the twrp recovery. However I can't verify if it works.
EDIT 2 - I believe that's not the way you would do it though. If you go to install, and go back directories (all the way to root), there is a folder called otg, I believe if you have a usb-otg hooked up, it would be mounted here. So you would install from here. I will look into this a little more and update the master post once I find a verified method to installing through otg.
OTG does work on all my recoveries, with the exception of CWM. Also I recommend TWRP 2.8.6.1 dark because it still supports backing and flashing new modems, & firmware. Due to encryption introduced v2.8.7.0 no longer can do this.
 
  • Like
Reactions: lemon07r

lemon07r

Senior Member
Apr 8, 2013
132
66
0
New version is out, can we expect an update today? :D

Enviado do meu A0001 através de Tapatalk
I'll get to work on it then, I will be updating around twice a week btw. Hopefully I will have it done and uploaded in a few hours.

OTG does work on all my recoveries, with the exception of CWM. Also I recommend TWRP 2.8.6.1 dark because it still supports backing and flashing new modems, & firmware. Due to encryption introduced v2.8.7.0 no longer can do this.
Thanks for this, going to update my post with the relevant information.
 

Miksel12

Senior Member
Apr 13, 2015
177
83
0
Netherlands
Nice! Tried to enable f2fs on multiple caf roms but failed al the time, nice that you made a 'ready-to-go' f2fs version of Sultans rom!
One question, why not f2fs on system?