FORUMS
Remove All Ads from XDA

[KERNEL][LINARO][UC][F2FS] Project T - Custom Kernel for ZenFone 2[THE END]

1,473 posts
Thanks Meter: 1,804
 
By TheSSJ, Senior Member on 5th July 2015, 08:40 PM
Post Reply Email Thread
Hi guys,

It was a cool journey with all the support I got from you, this community is really the best! Unfortunately this will be the last version I will release. See the changelog for more details!

Please note that I do my testing on a ZE551ML 4GB 2,3GHz. For ZE550ML look here (thanks to cieffe54)

Note: This kernel works ONLY on stock based versions!


I can only support, if you don't have any speed tweaks or similar flashed as I can not differ if the issues come from the kernel or from installed tweaks!

Features:
Based on Zenfone 2.20.40 kernel source (completely from scratch)
Built with Hyper_linaro4.9 toolchain (all credits to @fraps123!!!)
STABLE: UC to 333MHz for all models
Power efficient work queues for fbcon and PHYDEV
Battery Life eXtender (BLX) (manipulate via init.d script 10BLX==>Downloads tab or Kernel adiutor==>Battery menu)
Touchboost input event handler (can be switched on and off via init.d, see Downloads-tab)
Greatly improved memory management
Added the following CPU governors:
- Ondemand with hotplugging event handlers when screen is off
- Lionheart
- Bioshock
- ConservativeX
- Yankactive
- TheSSJactive (Yankactive with hotplugging)

Added IO schedulers:
- sio
- zen
- vr
- fifo
- sioplus (credits to @boype, fixed afterwards for zf2 by me) {DEFAULT}
- fiops

Added TCP congestion algorithms:
-BIC
-CUBIC
-WESTWOOD
-HSTCP
-HYBLA
-HTCP
-VEGAS
-VENO
-SCALABLE
-LP
-YEAH
-ILLINOIS

Tweaked GPU governor to scale up more quickly
Set minimum brightness to 2 instead of 15 percent (changeable by init.d script)
Set readahead of int./ext. sd card partitions to 512kB by default
Selinux permissive
init.d support (creates directory if it doesn't exist!)
exfat support (no fuse, all credits to @Dorimanx, automounting of devices fixed by @sorg)
GPU clock unlocked (not overclocked) - runs between 200 and 533MHz
ZRAM implemented (see below for details)
Sweep2Sleep (all credits to Lord Boeffla)
frandom RNG
F2FS support
Deprecated: KVM support (only up to version 51)

Some words about the currently implemented features:
F2FS

all credits to @mb300sd81 for modifying the fstab accordingly: http://forum.xda-developers.com/zenf...2/post64366155

Battery Life eXtender BLX

Use the init.d script in the downloads section (10BLX) or see Kernel adiutor in the battery menu.

Sweep2Sleep and/or Touchboost

To activate simply check Kernel Adiutor for a new entry in the menu
Alternatively you can use an init.d script I have uploaded in the downloads section: 90S2S.txt/91touchboost.txt

KVM

Please note, that I stopped supporting KVM functionality from v52 onwards. If you want a tweaked kernel with KVM support, you can download v51.
You need to insmod all modules with an init.d script or manually (see download section for an according script). Please note that I won't add the feature set as @ycavan is doing, as I am lacking the knowledge and also I don't want to overbloat the kernel, even if KVM is triggered via insmodding modules. If you need special features which this kernel might be missing, feel free to request it/them, but I won't guarantee that it will be implemented at all

init.d
The way I implemented init.d is sweet, simple and won't be recognized by ANY third party app which implements init.d!
I use the my own script which is already located on the ramdisk of the boot partition and added just a few lines, which check if init.d already exists and creates it if not (and will execute the scripts in there otherwise of course). So please don't install any more init.d enabler as you will have every script executed twice then!

ZRAM
You need to activate ZRAM via init.d script (see download section) as it is turned off by default, to make it more universal for the ZF2 users with 4GB as they really don't need to compress data before storing it into RAM as for the 2GB users. Of course Kernel Adiutor also offers the possibility to turn on ZRAM.


Dev Roadmap:
Fix ROW scheduler
What's useful

What most likely won't be implemented (missing knowledge, no testing tools):
Undervolting
Sound tweak directly on chip side (no documentation found about our RT5647 sound chips ) - you will need to deal with Viper4Android

Caution:
Do everything at your own risk!


How to install:

1st pre-requisite: Unlock your Bootloader
2nd pre-requisite: BACKUP!!!

Method 1:
BACKUP!!!
Download the zip from the DL link below and extract the img file
Place the img file on your internal SD
Flash it through TWRPs "Install zip" function, by clicking on "Images..." on bottom right and then selecting "Boot" as destination
Reboot and you're done!

Method 2:
BACKUP!!!
Download the image file and place it in the directory of your adb binary
Code:
adb push <nameofimg>.img /sdcard/
adb shell
su
cd sdcard
dd if=./<nameofimg>.img of=/dev/block/by-name/boot
reboot
Method 3:
BACKUP!!!
Download the image file and place it in the directory of your fastboot binary
Boot into Bootloader mode
Issue the following commands:
Code:
fastboot flash boot <nameofimg>.img
fastboot reboot
Method 4 (thanks to @taylor.fowler )
BACKUP!!!
Download the zip and flash it via TWRP

Attention: when reporting bugs, please provide a log or a way to reproduce the error.


Download Link:
Google Drive

Credits:
@jrior001, @crpalmer, @jamison904, @tectas, @dorimanx, @Lord Boeflla

Special thanks to:
@Drew442
Amir J.
@aziz07

XDA:DevDB Information
[KERNEL][LINARO][UC][F2FS] Project T - Custom Kernel for ZenFone 2[THE END], Kernel for the Asus ZenFone 2

Contributors
TheSSJ
Source Code: https://github.com/TheSSJ/android_ke...sus_moorefield

Kernel Special Features: CPU governors, read-ahead, init.d support, exfat, async fsync, BLX, OC, UC

Version Information
Status: Stable
Current Stable Version: Final

Created 2015-07-05
Last Updated 2015-12-29
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2015-07-10-09-39-07.jpg
Views:	40744
Size:	163.5 KB
ID:	3398691   Click image for larger version

Name:	Screenshot_2015-07-10-14-40-51.jpg
Views:	36580
Size:	157.6 KB
ID:	3398692   Click image for larger version

Name:	Screenshot_2015-07-10-15-09-03.jpg
Views:	41016
Size:	97.3 KB
ID:	3398728   Click image for larger version

Name:	Screenshot_2015-09-01-20-12-59.jpg
Views:	26068
Size:	123.2 KB
ID:	3459447  
The Following 104 Users Say Thank You to TheSSJ For This Useful Post: [ View ] Gift TheSSJ Ad-Free
 
 
5th July 2015, 08:40 PM |#2  
TheSSJ's Avatar
OP Senior Member
Thanks Meter: 1,804
 
Donate to Me
More
Want to report a Bug? Please read here first
This last version is pretty stable so far, therefore no bug reports anymore
The Following 10 Users Say Thank You to TheSSJ For This Useful Post: [ View ] Gift TheSSJ Ad-Free
5th July 2015, 08:40 PM |#3  
TheSSJ's Avatar
OP Senior Member
Thanks Meter: 1,804
 
Donate to Me
More
Changelog
Changelog format: dd-mm-yyyy vXX

23-12-2015 final KVM
- as promised

02-12-2015 final
- Removed OC as it has really no effect at all, kept underclocked frequency though

24-09-2015 v91
- Speed up I/O operations on file systems
- Algorithm changes to use faster multiplication by shifting

18-09-2015 v90
- Reduced module count from 19 to 5, much quicker boot

16-09-2015 v88
- Upgraded F2FS driver to latest sources (3.10. kernel backport)
- Fixed F2FS mounting problems
The path is now clear to create the first ROMs with F2FS formatted partitions (system, data and cache) :)

14-09-2015 v86
- Min_brightness is working now without f*cking up the brightness
- Versioning implemented (check kernel info in kernel adiutor)

12-09-2015 v85c
- Rolled back all backlight changes, will continue tomorrow or so as I have no time

12-09-2015 v85b
- Hotfix for negative brightness

11-09-2015 v85
- Minimum brightness is changeable by the user (via init.d, see script in download tab)
- Introduced VMAcaching (big performance improvements in memory handling)

10-09-2015 v84
- changed compression of ZRAM from LZO to Google's Snappy compressor, thanks for testing @2300

Older releases:

09-09-2015 v83
- Sioplus set to default at boot already
- random number generator "frandom" used everywhere (10-50 times faster than normal random)
- Removed power efficient work queue for block devices
- Turning power efficient work queues on and off works now :)
- Added Google's new and fast compression algorithm "Snappy" (this is only patch 1 of 2). Next step (=v84) will be to modify ZRAM to use Snappy instead of LZO

08-09-2015 v82
-F2FS support added
-added several tcp congestion algorithms and defaulted to westwood (great speed increase)
-Increased tcp window size (more performance)
-Under the hood fixes (wifi now integrated into kernel, ramdisk fixed up, etc.)

04-09-2015 v81
- Fixed BLX

02-09-2015 v80
- Introduced power efficient work queues
- Minimum brightness set to 2% also for ZE550ML models

02-09-2015 v77b Hotfix1
- Resolved Deep Sleep issues on ZE550ML models (for those who had them)

01-09-2015 v77 UC/OC
- Added OC/UC variant (+167MHz, lowest freq set to 333MHz), still no other features, that's why the version number didn't change

30-08-2015 v77 OC
- Added OC variant (+167MHz), no new version

28-08-2015 v77
- S2S now checks dynamically which phone model you have and sets the boundaries accordingly

25-08-2015 v76
- reduced brightness even more (2%)

23-08-2015c v75
- reduced brightness now to really 5% (below is not visible at all)

23-08-2015b v74
- S2S: Reset detection algorithm when finger leaves contact with screen prematurely (then it is not really a "sweep" :) )

23-08-2015 v73
- made s2s compatible for ZE550ML also (need to trigger via init.d script 90S2S, see downloads tab)

21-08-2015 v72
- added BLX (thanks to @Ezekeel for the base source)

19-08-2015 v70
- updated to newest code base from Asus (2.20.40)
- set minimum brighness to 2% now (1% was weird)

16-08-2015b v67
Set minimum brightness to 10% now (will be experimented with in the future)

16-08-2015 v66
Moved touchboost code to sweep2sleep module and renamed it to sweep2sleepPLUS
Touchboost code is stock again and should be snappier than before

09-08-2015 v65
Fixed crashing when a custom governor is to be set after boot
Sweep2Sleep (thanks to @Lord Boeffla)

03-08-2015 v60
Backported and implemented Async Fsync (thanks to @deadman96385)
Set Selinux to never deny requests (hot word: avc and unknown devices, thanks to @arter97)
Removed hotdemand governor and implemented the changes directly to ondemand governor
Set readahead of the sd card partitions to 512kB

02-08-2015b v56
Reverted back to O2 optimization level, now we're back to address the whole RAM again, thanks to @Tiongkia

Accidentally compiled in 32Bit, don't download anymore, v56 will hopefully address 4G again :D
02-08-2015 v55
Implemented working touchboost for Yankactive and Thessjactive governors (interactive works nonetheless)

01-08-2015c v53
Random files should be gone hopefully
O3 Optimization level implemented


01-08-2015b v52 (BUGGY)
Removed KVM to make the kernel lighter
Included loadable module hotdemand (ondemand with hotplugging techniques on screen off)

01-08-2015 v51
Removed useless Debug messages from the display (cluttering the kernel ring buffer)
Last build with KVM support

26-07-2015b v50
Completely built out of Hyper Linaro4.9 Toolchain

26-07-2015 v47
Added my own implementation of yankactive governor with hotplugging of 2 cores on screen off/on.
Fixed SSE instruction set compilation

24-07-2015 v46
Fixed touchboost issue when using interactive, no good solution for the other governors at the moment

22-07-2015 v45
Added kvm support(thanks @ycavan)

19-07-2015 v44
Fixed init.d being executed to soon by moving it after boot completed flag (still as part of the init process)
Fixed sioplus

18-07-2015 v42
Removed ondemandplus for now
Added sioplus (thanks @boype) and fiops (credits to @ion-storm for his backport) IO-scheduler

18-07-2015 v40
Ported yankactive to current interactive code base and applied yankactive tweaks there, see my github commit for details. Positive side effect is that the governor now finds the maximum freq automatically (removed the hardcoded max-freq, so 1.8GHz Zenfones should be supported like 2,3GHz now, too). WORKS!

17-07-2015 v38
Fixed interactive gov by taking and adapting it from fugu kernel
Fixed init.d mounting system as rw before running scripts (now the directory gets automatically created)

16-07-2015 (at least in my timezone) v35
Corrected tunables of yankactive (max_freq should be dynamically set) and Ondemandplus (min frequency increased to 500MHz)
ZRAM implemented (to be enabled via init.d)
Uploaded GPUclock and ZRAM scripts to the download section of XDA (kind of a database)

14-07-2015b v29
Added more governos:
Ondemandplus
Yankactive
Adaptive

14-07-2015 v28
Unlocked whole GPU clocking speed

13-07-2015
Moved "older" downloads from XDA to my Google Drive (it's frustrating uploading with 1MBit/s and then getting a Server I/O error)

12-07-2015b
Fixed exFAT automount issue (all credits to @sorg)

12-07-2015
Improved init.d support (creates directory if it doesn't exist)
exFAT driver implemented (thanks to @dorimanx)

11-07-2015
Added init.d support

10-07-2015
Added several (working) IO schedulers:
- sio
- vr
- zen
- fifo

10-07-2015
Fixed wakelock issues
Added several governors
Added AnTuTu results in separate post

05-07-2015
First release
The Following 18 Users Say Thank You to TheSSJ For This Useful Post: [ View ] Gift TheSSJ Ad-Free
5th July 2015, 10:05 PM |#4  
NoobNeutralizer's Avatar
Senior Member
Thanks Meter: 39
 
More
Awesome...

Might test this out later when I get back home and make a back-up...
6th July 2015, 12:08 AM |#5  
cmendonc2's Avatar
Senior Member
Thanks Meter: 879
 
Donate to Me
More
Great work! Hopefully we can tweak to give us more battery life!
6th July 2015, 12:51 AM |#6  
Senior Member
Flag Ha Noi
Thanks Meter: 210
 
More
Great work

Gửi từ ASUS_Z00AD của tôi bằng cách sử dụng Tapatalk
6th July 2015, 02:25 AM |#7  
cangcan's Avatar
Senior Member
Thanks Meter: 220
 
More
oh my god.. i dont need any custom rom for this moment if there's custom kernel released.. and I never expect the 1st custom kernel was released by you @TheSSJ, you guys including @jrior001 and @crpalmer and also other developers are rock!!

anyway a question.. can we flash it .img file using fastboot cmd on bootloader?
6th July 2015, 02:45 AM |#8  
Neekapp's Avatar
Member
Flag Winnipeg
Thanks Meter: 8
 
More
This be fine for the 2.19 no garbage rom?
The Following User Says Thank You to Neekapp For This Useful Post: [ View ] Gift Neekapp Ad-Free
6th July 2015, 03:30 AM |#9  
cangcan's Avatar
Senior Member
Thanks Meter: 220
 
More
tested this kernel since using it an hour ago..
some bugs that i found:
1. dancedance, wheatley governor (freezes phone when activated)
2. smartassv2 cause random reboot
3. all the I/O Scheduler besides stock cfq & noop are unable to be used ( I/O scheduler fifo, sio, vr, zen, tripndroid will return back to stock cfq after activated)
4. suddenly apps such Castro (I usually used it to monitor core speed) crash after using this kernel

and I used Device Control apps to apply the tweak.
6th July 2015, 04:46 AM |#10  
cangcan's Avatar
Senior Member
Thanks Meter: 220
 
More
and also..my device is hardly fall into deep sleep mode..hsi3_wake_lock is higher than in stock kernel..
Attached Thumbnails
Click image for larger version

Name:	1436154353298.jpg
Views:	5058
Size:	42.5 KB
ID:	3392513   Click image for larger version

Name:	1436154364862.jpg
Views:	4990
Size:	57.8 KB
ID:	3392514  
6th July 2015, 05:39 AM |#11  
Senior Member
Flag 台灣
Thanks Meter: 1,131
 
More
@TheSSJ
can you tell how you overcomed module signature check in your kernel? I see in your config x86_64_moor_defconfig, you still use CONFIG_MODULE_SIG=y option which should prevent modue loading compiled in other environment. Besides signature, modules have magic string which should be the same as in zImage. But i see you've took modules directly from stock kernel. So, how you've managed to load modules? I don't see any hack in commit history.
And, btw, what exactly toolchain you're using?

---------- Post added at 12:39 PM ---------- Previous post was at 12:35 PM ----------

btw, you can update kernel by simplier command.
Boot into fastboot and then issue the command:
fastboot flash boot customboot.img
So, you don't need neither custom recovery, nor root. Just unlocked bootloader.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes