[Xperia Z1 Android Development] olokos:
Hello guys! :)

My work on Z1 is done. I will provide little to no support. I moved on to S8+

Some of you may have tried my custom kernel, I have now made another one (I've been running it for like half a year, couldn't decide whether to release it or not).

With this kernel I put stability on first place, then battery life, then performance. Don't expect flashy stuff. If it breaks anything or is cumbersome to implement then I won't do that.

Changelog:

Changes in V8.3:

Fixup code indentation to get rid of all the warnings during compilation.

Final release

Changes in V8.2:

Disable selinux spam in dmesg, it's permissive so AVC messages are unnecessary. That should improve both performance and battery, might not matter at all.

Replaced most of MMC code with one plus one's, that should massively improve internal memory handling.

Replaced the entire qdsp6v2 code with OPO's - this improved mic a million, speakers also seem to work better

Reworked cpu calculations a bit

Changes in V8/1:

Fixed most of sdcard issues - it is now the best kernel to use with SDcards

Replaced most of outdated camera code with One Plus One code, which should improve camera usage massively.

Changes in V7.5(unreleased):

Fixup code formatting

Enable booting with idle GPU freq - 27MHz

Enable stereo call recording thanks [MENTION=2784807]DooMLoRD[/MENTION]

Update prima/pronto (wifi drivers) to latest ones

Remove WiFi debugging - useless, provides better battery and performance

Fix NEON and VFP functions to work earlier on boot

Implemented Adreno Idler - helps with GPU Idling

Simple GPU Algorithm by [MENTION=3332811]faux123[/MENTION] - this enables better GPU freq scaling

Implemented msm-sleeper, that allows for lower CPU freqs and less used cores with screen off.

Fixup of fast-charge

better handling of powersuspend based on display state

Changes in V7:

Implemented Intellithermal_v2

Added fast charge as requested, I didn't see much change in charging times to be honest and people have said its not safe to use, but it's there.

Possibly brought back breathing notifications.

Changes in V6.5:

Updated toolchain to linaro 6.2.1

Use hard float and neon FPU - this might provide quite an improvement to overall performance and battery life

Update device ramdisk to actual .236 - all booting issues should be gone along with update nagging

Update TWRP to 3.2

Changes in V6.2:

New bootlogo by IRL friend.

Changes in V6.1:

This is mostly a bugfixing version

Added additional last_kmsg support

MX ROM users - PLEASE SEND LAST_KMSG from this version, it still won't boot yet, so make a backup of your previous kernel in TWRP!

New features in V6:

TWRP 3.0.0.0 (No multirom version yet, let me know if you really need it!)

3x faster int sqrt

selinux fixes

Bigger interval of battery level check

More conservative readahead

Send one packet at a time for touchscreen

Power efficient work queues (better cpu task queuing)

Low memory killer - starts caring about high ram

Faster camera startup and operation

Memory aligning to sector size

GPU optimization flags

Better managment of writing files back to memory

CPU freq/gov fixes

msm limiter - allows for better limiting of cpu freq

Update wifi driver (supposedly)

Update toolchain to Linaro 5.2, latest stable Linaro toolchain!

Change display colors to get less yellowish/warm colors thanks @tomascus !

Please go into white balance in system and reduce blue to around 110 for better white.

GCC 5 cortex a15 CPU optimizations

Notification LED API, from now on it's pulsing instead of blinking on notification

Remove RIC from ramdisk init (this should fix booting issues for some)

Removed few unused defconfig entries

Boost CPU freq when migrating threads from one cpu to another

From V6 I'm packing ramdisk on every kernel build

Using latest sony mkqcdtbootimg, that should improve stuff with boot.img DT's.

Noop is a default I/O sched. It's very good for spindleless disks (Flash memory, SSD's)

Force permissive selinux at all times. It won't go to restrictive anymore.

use memcpy, memmove, copy_page memory optimizations for MSM8974.

Fixed idle cpu calculations

Lots of EXT4 filesystem fixes

Very optimize

Much fast

So battery

Wow

New features in V5:

Further improved sdcard speed

Now compiling Prima WiFi driver with kernel. Faster and more stable WiFi.

New governor - Intelli MinMax - my favourite for now

Finally implemented Intelliplug 4.0 - default hotplug mpdecision replacement by faux123

Corrected notification LED brightness levels

Cleaned up the source a bit

Features of V4:

latest 14.6.A.1.216 source code

Enabled higher eMMC frequencies

disabled cpu boost on screen wakeup

optimized code to get lower CPU usage overall (not by removing anything or slowing stuff down!)

very low minimum screen brightness on the minimal brightness (disable automatic brightness for that and move slider all the way to the left)

Faux's Sound control

Kcal Color control

RIC disabled by default

corrected reported GPU frequency

conservative and ondemand optimizations

Venkat Kamesh's ramdisk that allows flawless multiboot + my own bootlogo (pretty funny :) )

General performance improvements

gpu optimizations

optimized for Cortex A15 cores (just like krait)

Linaro 4.8 toolchain instead of the GCC 4.7

OOM optimizations

memory optimizations

stability fixes

general performance improvements

intelliactive governor

config.gz viewable in /proc

Nvidia Shield cpu power patches - great battery improvement

added new, shiny quickwakeup and powersuspend drivers that help improving battery life even further

MultiRom Support

MultiRom TWRP

Fixed in kernel random numbers generation - seeder is completely not needed with my kernel. :)

Download:

V8.3 here - 25.07.2017

V8.3 MULTIROM TWRP here - 06.08.2017

Previous versions

V4 here - 30.12.2015

V5 here - 26.01.2016

V6 here - 14.04.2016

V6.1 here - 07.06.2016

V6.2 here - 11.06.2016 [url=https://www.androidfilehost.com/?fid=24694152805484499]MIRROR[/URL]

V6.5 here - 14.03.2017

V7 here - 17.06.2017

If you get a bootloop, random reboot, whatever, ALWAYS send me last_kmsg log - PRESS HERE for a guide on how to do this, if you don't do that, I won't fix it. Any post with something like "REBOOT, HALP PLS' or "BOOTLOOP, NO WORK" will be reported and then removed.

If you installed XZDR recovery before, some custom rom or you're just not coming from a stock clean rom,please flash THIS before flashing my kernel. It will remove RIC and remnants of XZDR recovery which prevents kernels from booting. Thanks to [MENTION=4433143]venkat kamesh[/MENTION] for original script and thanks to [MENTION=7216936]Snp Mania2[/MENTION] for figuring out the problem! :)

Source code

OK Kernel V4 checksums

[IMG="boot.img hashes"]https://img.xda-cdn.com/QovloqCAi2LfqaSYcN8W_Y3yEXE=/http%3A%2F%2Fi.imgur.com%2FzWHKrxt.png[/IMG]

Many thanks to:

@venkat kamesh for his awesome ramdisk, I would be bashing my head on the wall trying to get multirom to work if not him.

@Tommy-Geenexus for getting my buildscript to work and for his awesome code. He made building the kernel a bliss for me.

@faux123 too many to point out

@DirtyUnicorn team for some commits.

Propably others that I forgot to mention. I will update credits soon.

As always, you do everything at your own risk.

Enjoy! :highfive: