[KERNEL][CAF][5.1.1][TW / MIUI / ColorOS] Tensei_r5 [24/06/2017]

#Henkate

Senior Member
Feb 1, 2012
3,485
3,120
253
25
フェアリーテイル



DISCLAIMER:
Code:
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed.
 * Please do some research if you have any concerns about features included
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.



NOTES - MUST READ
1. Do not ask or request overclock. It wont be added.
2. This kernel uses AnyKernel 2, just like the Linaro Kernel by Nick Verse. So, it should work on all Galaxy J5 (2015) models. You test and report.
3. ROOT is not included in kernel, neither in the flashable zip. You have to flash SuperSU zip manually, after flashing the kernel.


THREAD INFO:


Post #1: Notes, requirements, features, download links, installation instructions, sources, credits, screenshots
Post #2: Changelog and bugs.

REQUIREMENTS / COMPATIBILITY:


- Galaxy J5 2015
- Official Touchwiz stock rom 5.1.1
- Stock kernel, unmodified
- TWRP 5.1.1

It also work on:
- MIUI Lollipop
- ColorOS Lollipop



FEATURES:


-Based on CAF source for improved performance / smoothness (LA.BR.1.1.3_rb1.11)
-Several CAF patches
-Fixed DirtyCow, QuadRooter and other vulnerabilities
-Updated GPU driver to MM source
-Adreno Idler: main goal is to lower the power consumptions while maintaining high-performance
-SELinux permissive
-init.d support
-silenced many kernel logs
-fixed some memory leaks
-KCAL: Color Control
-QuickWakeup driver
-Drivedroid support - put an OS on your phone and boot your PC using the phone. Not tested, but it should work.
-governors: default + enabled ondemand & conservative governors + @squid2's lionfish
-schedulers: default + FIOPS, SIO, SIOPLUS, ZEN v2 and BFQ I/O schedulers
-enabled advanced TCP congestions: default ones + Westwood, HSTCP, HYBLA, HTCP, Vegas, Veno, Scalable, LP, Yeah, Illinois + Sociopath
-4 hotplugs: IntelliPlug, MSM Hotplug, Bricked (MP DECISION), Alucard
-Prima WLAN driver
-tweak for better network speed
-tweaks to improve I/O latency on SSD
-many patches has been applied for faster I/O read / write
-CRC toggle: disabled by default (for more 30% performance according to its description)
-android log toggle on/off: disabled by default
-Fsync toggle on/off: Disabling it should improve the performance, but there might be data loss. More details here: https://forum.xda-developers.com/showpost.php?p=33381928&postcount=5
-arch_power and gentle_fair_sleepers toggles
-disabled CPU L2 Cache during video sessions to save more power
-removed verifiedbootstate flag from /proc/cmdline (in order to pass the SafetyNet CTS check with an unlocked bootloader, this patch is needed); I dont know if Pokemon GO game or something similar works now, you can check and report as im not playing those games)



DOWNLOAD:


Touchwiz Lollipop: ANDROIDFILEHOST | MEDIAFIRE


MIUI / ColorOS Lollipop: ANDROIDFILEHOST | MEDIAFIRE



INSTALLATION INSTRUCTIONS:


1. Be sure that you are using TWRP according to the Android version you are using.
2. Download kernel archive and put it on your external SD Card.
3. Now go to TWRP recovery by keeping pressing Power button + home button + volume UP button at same time for few seconds.
4. Install the kernel zip you have downloaded.
5. [OPTIONALLY] Install SuperSU.
6. Wipe cache and dalvik-cache to avoid issues.
7. Reboot.



SOURCE CODE:


Touchwiz Lollipop: ANDROIDFILEHOST | MEDIAFIRE

MIUI / ColorOS Lollipop: ANDROIDFILEHOST | MEDIAFIRE



CREDITS:

XDA:DevDB Information
[KERNEL][CAF][5.1.1][TW / MIUI / ColorOS] Tensei_r5 [24/06/2017], Kernel for the Samsung Galaxy J5

Contributors
#Henkate
Source Code:

Kernel Special Features: Based on CAF kernel, fast and stable, hotplugs, enabled advanced TCP congestions, KCAL, security fixes, Adreno Idler, PowerSuspend

Version Information
Status: Stable
Current Stable Version: r5
Stable Release Date: 2017-06-24

Created 2017-01-24
Last Updated 2017-06-24
 

Attachments

Last edited:

#Henkate

Senior Member
Feb 1, 2012
3,485
3,120
253
25
フェアリーテイル
Reserved

bugs:

-The only bug is that sometimes when you power off / reboot the phone, it freeze and you have to take out the battery.


changelog:

24/06/2017

- removed i/o scheduler switcher. The random reboot should be gone ( my j5 didnt have any reboot with i/o sched swither and neither without it, while being in idle though, as i'm not using it)
- fixed two permissions of powersuspend (0666 --> 0644)
- added @squid2's lionfish governor. It is supposed to be more battery friendly. Test and report your feedback.
- added sociopath tcp: "this is basically tcp reno with no slow start and a much more aggressive ssthresh recalculation (lowers it by 5% instead of 50%)"
- fixed 9 vulnerabilities

about doubletap2wake and sweep2sleep:

this new update was supposed to have dt2w and sweep2sleep. I've added them by using the commits from other kernel and they were working, both. However, there were some issues:

1) dt2w wasn't working on the full screen. Even after choosing "full" in kerneladiutor, i still had to double tap in the bottom of the screen (half) to wake it. When i was double tapping on the other half of the screen (top), it wasn't working.

2) i dont know if sweep2sleep is supposed to work only in the bottom of the screen, but that's how it was working. It was fine though.

3) phone wasn't going to deep sleep, even when both were off. This is the major issue and that's why i've removed dt2w and sweep2sleep. I don't really have the knowledge to fix that and i'm not willing to spend time for that. Those commits which i've picked has powersuspend hooks and i had to update powersuspend to v1.8.1 as that kernel. Perhaps this version of powersuspend wasn't working properly and that's why it was causing the phone to not go into deep sleep? I don't know...


09/05/2017

- added i/o switcher: A driver which change the i/o scheduler to noop automatically when screen goes off and restore the i/o scheduler which was set before when screen is on after 10 seconds
- silenced much more kernel logs
- re-enabled swap & zram
- added sys interface to configure linux printk logging (debugging purpose)
- added gpu time_in_state stats (similar to cpu stats)
- added quick wakeup driver: Allow kernel driver to do periodic jobs without resuming the full system. It should increase battery life.
- added toggles for gentle_fair_sleepers and arch_power
- tcp cubic fixes
- added sioplus, zen v2 and bfq schedulers
- enabled conservative governor
- fixed some memory leaks
- fixed a problem where reboot on android panics the kernel almost every time when file systems are mounted over loop devices
- updated power efficient workqueue + fixes; enabled by default
- added gpu governor whitelist to prevent you from enabling gpu governors which are unstable / incomplete (bw_hwmon, bw_vbif, gpubw_mon; all those 3 make the phone freeze once are enabled). Now when you try to enable those, it wont change anything.
- misc fixes and improvements

07/05/2017

- wifi module is now smaller as it should be (~40mb -> ~3mb)
- disabled some kernel logs
- disabled zram, swap and everything else related to swap
- allow 320k aac encoding
- misc fixes and improvements
- increased charge time from 30s to 100s when battery status is near full

(when charger is online for a long time, such as 12 hour, the battery status changes from charging to full and resumes charging.
The reason is that battery is not full at the first full state. So increse charge time from 30s to 100s when battery status is
near to full. This methods will reduce the number of recharging time)
02/05/2017

- disabled android log and crc check by default
- added back kcal (color control), drivedroid support and power efficient workqueues
- removed verifiedbootstate flag from /proc/cmdline (in order to pass the safetynet cts check with an unlocked bootloader, this patch is needed); i dont know if pokemon go game or something similar works now, you can check and report as im not playing those games)
- tweaks to improve i/o latency on ssd
- fixed few security vulnerabilities (such as dirtycow and quadrooter)
- many patches has been applied for faster i/o read / write
- governors are more friendly towards latency-sensitive bursty workloads
- and other misc tweaks
16/03/2017

- reworked from scratch and based on caf source for more performance / smoothness (now i can clearly see a difference :p )
- updated gpu driver to mm source
- added crc toggle (enable / disable)
- enabled adaptive lmk by default and set vmpressure_file_min for msm8916 from caf
- disabled arch_power
- frezee bug is gone
- removed: Ota, kcal, soundcontrol, power efficient workqueues, zen governor, frandom
- removed also the ramdisk modifications as it may lower performance / smoothness. I might try again in future.

24/01/2017
- initial build
 
Last edited:
  • Like
Reactions: himfa71

#Henkate

Senior Member
Feb 1, 2012
3,485
3,120
253
25
フェアリーテイル
small update

Few screenshots were attached at the end of first post.

There has been a small issue in the script of Anykernel, so OTA wont work. I have fixed this and updated the download links.
Please download and reinstall again in order to get OTA working. Im sorry for this small issue.
 
Last edited:

#Henkate

Senior Member
Feb 1, 2012
3,485
3,120
253
25
フェアリーテイル
Lollipop version is out

Lollipop version is out. You find the download links in first post.

Lollipop version has additional changes:

Code:
-built with AOSP 4.8 toolchain (if im using 4.9 the phone gets stuck at Galaxy J5 logo, not even bootanimation; i didnt take a logcat yet)
-disabled CPU L2 Cache during video sessions to save more power[B][COLOR="Red"]*[/COLOR][/B]
-more security fixes[B][COLOR="Red"]*[/COLOR][/B]
* The changes with asterisk were already present on Marshmallow kernel.


The flashable zip has 24/01/2017 date because Lollipop version was supposed to be released yesterday too. However, if you take a look at Settings > About phone or Kernel Adiutor you will see that the kernel was built today.


Im waiting for reviews. I wanna know if you encounter the same problem like me, mentioned at notes in first post at 2) .


Now i can resume to RR, to work on a final update. RR kernel will also have Tensei features and probably few other changes for improving the battery since CM is faster than Touchwiz.
 
Last edited:
  • Like
Reactions: himfa71 and veez21

DylanCl

Senior Member
Nov 18, 2012
52
11
0
Phone "feels" faster, but that could also just be a placebo.

The only bug I've found yet is that my camera froze once after double-tapping to open it, but that hasn't happened since.
 
  • Like
Reactions: #Henkate