AndroPlus Kernel
for Xperia Z2 / Z3 / Z3 Compact
Requirements
  • Xperia Z2 [D6502 / D6503 / D6543]

  • stock 5.1.1
  • 23.4.A.1.200 and 23.4.A.1.232 - v70 ~
  • 23.4.A.0.546 - v60 ~ v67
  • stock 5.0.2
  • 23.1.A.0.690 / 23.1.A.0.726 and 23.1.A.1.28 / 23.2.A.1.62 - v50 ~ v59
  • stock 4.4.4
  • 23.0.1.A.3.12 - v10 ~ v32

  • Unlocked bootloader

  • Xperia Z3 [D6603 / D6653 / D6643] or Xperia Z3 Compact [D5803 / D5833]

  • stock 5.1.1
  • 23.4.A.1.200 and 23.4.A.1.232 - v70 ~
  • 23.4.A.0.546 - v60 ~ v67
  • stock 5.0.2
  • 23.1.A.0.690 / 23.1.A.0.726 and 23.1.A.1.28 / 23.2.A.1.62 - v50 ~ v59
  • stock 4.4.4
  • 23.0.1.A.5.77 - v10 ~ v32
  • 23.0.A.2.105 or .98, .93 - v1 ~ v9

  • Unlocked bootloader
Download

--------------------------------------
How to install

1. Reboot into recovery or bootloader
2. Flash kernel using recovery or fastboot
Recovery - Install zip
fastboot - Extract boot.img from zip and run this command:
fastboot flash boot boot.img
3. Reboot
4. Done!

Notice and FAQ

Some people reported my kernel isn't compatible with XZDualRecovery.
Please remove XZDR before installing my kernel.
(Remove tool can be found at http://nut.xperia-files.com/.
Don't ask how to download it in my threads.)

2. DO NOT complain about unstableness when you are overclocking your phone.
Reboot while benchmarking is expected since overclocking can hurt your device.

3. Sound Control (FauxSound) and Taiko_control is EXPERIMENTAL!
Speaker gain control won't work, please DO NOT report it as a bug.

FauxClock has some bugs. I recommend to use Kernel Adiutor to configure this kernel.

--------------------------------------

FAQ
Q. Can you support UKSM?
A. No, I tried but didn't boot with it.

Q. Can you use GCC 5.1?
A. No, it didn't boot with GCC 5.1.

Q. F2FS isn't working!
A. I couldn't find how to auto-generate fstab for both EXT4 and F2FS on 5.1.
F2FS is not supported for now.

Q. CPU freq is staying at 1190 Mhz or something!
A. It is caused by MPDecision for better performance.
If you really think it's problem, just disable touch boost or change thermal decision to intelli_thermal.

To disable MPDecision and log spam "QCOM PowerHAL: Failed to acquire lock",
you have to enter these commands in adb shell:
busybox mount -o remount,rw /system
mv /system/vendor/lib/hw/power.qcom.so /system/vendor/lib/hw/power.qcom.so.bak
mv /system/bin/mpdecision /system/bin/mpdecision.bak

Changelog
Stable/supporting version : v72
Testing/experimental version : ---
--------------------------------------
v72
Built with UBERTC 4.9

v71
Updated zzmoove

v70
Support 23.4.A.1.200 and 23.4.A.1.232 (maybe some changes in 232 is missing)
Mute clearpad logspam
Fixed init.d
--------------------------------------
End of 23.4.A.0.546 support
Show older changelog
v67
Reverted display patch for Z3C
Added some optimizations for GPU, TCP, PM

v66
Removed adaptive CPU gov since it's too old
Re-updated bfq I/O gov to v7r8
Reduced log spam
* To disable log spam "QCOM PowerHAL: Failed to acquire lock",
you have to enter these commands in adb shell:
busybox mount -o remount,rw /system
mv /system/vendor/lib/hw/power.qcom.so /system/vendor/lib/hw/power.qcom.so.bak
mv /system/bin/mpdecision /system/bin/mpdecision.bak
v65
Removed QC2.0 hack

v63b~d, v64a (don't use them as they contains "bad" patch)
Attempt to fix video playback problem
Patched random reboot caused by dynamic fsync panic
Disabled dynamic fsync by default

v63a
Changed Sound Control to franciscofranco's one
--I think it's more stable than faux one, though speaker gain isn't working as well... which do you like?
Updated kcal and added some patches
Changed default dirty_writeback_active_centisecs to 3000
Changed intelli_thermal poll default value

v63
Added interactive_proconservative
Added mac80211 injection patch and HID patch for keyboard support
Reverted one patch

v62
Removed some patches including powersuspend 1.6 since there's problem report on Z2
Updated zzmove to 1.0-beta8
Changed wakelock blocker sysfs name to one in Kernel Adiutor

v61
Enabled QC2.0 hack on Z2 again (I need exact log of charging to see if it really works...)
Alucard hotplug was mistakenly enabled by default, so turned it off by default now
Added patch for slimbus
Added toggles for wlan wakelocks (for advanced user only, path for sysfs is here Y=non block, N=block)

v60a
Fixed apps moved to SD disappear after reboot
Dropped F2FS support because it causes above problem...

v60
Now supports 5.1.1!
Most features from 5.0.2 version, but now I selected Fauxsound again since Taiko_control isn't so different from fauxsound.
also removed some commit to improve stability
Updated powersuspend to v1.6

--------------------------------------
5.0.2 version
Show older changelog
v59c
Finally, we got 23.2.A.1.62 source!... so I added new commits from it
Reverted most of commits of v59 since some of them (don't know exact commit) causes problem
--Update of alcurd, nightmare, darkness isn't reverted, so if there's problem yet, it is the cause.

* I'll update and create kernel for 5.1 as soon as Sony uploads source for it.

v59b
Disabled Quick Charge 2.0 for Z2

v59a
Rebuilt with Z2 ramdisk... maybe fixes touch problem

v59
Enabled Quick Charge 2.0 again for Z2... I think it won't work, but for testing
Updated TWRP to 2.8.7.0
Fixed bug of fast_hotplug
Updated alcurd, nightmare, darkness
Added zzmove CPU governor
Profiles list
* - (1)'def' -> Default ->
will set governor defaults

* - (2)'ybat -> Yank Battery ->
a very good battery/performance balanced setting
DEV-NOTE: highly recommended!

* - (3)'ybatext'-> Yank Battery Extreme ->
like yank battery but focus on battery saving

* - (4)'zzbat' -> ZaneZam Battery ->
a more 'harsh' setting strictly focused on battery saving
DEV-NOTE: might give some lags!

* - (5)'zzbatp' -> ZaneZam Battery Plus ->
NEW! reworked 'faster' battery setting
DEV-NOTE: recommended too!

* - (6)'zzopt' -> ZaneZam Optimized ->
balanced setting with no focus in any direction
DEV-NOTE: relict from back in the days, even though some people still like it!

* - (7)'zzmod' -> ZaneZam Moderate ->
NEW! setting based on 'zzopt' which has mainly (but not strictly only!) 2 cores online

* - (8)'zzperf' -> ZaneZam Performance ->
all you can get from zzmoove in terms of performance but still has the fast down scaling/hotplugging behaving

* - (9)'zzinz' -> ZaneZam InZane ->
NEW! based on performance with new insane scaling active. a new experience!

* - (10)'zzgame' -> ZaneZam Gaming ->
NEW! based on performance with scaling block enabled to avoid cpu overheating during gameplay

* - (11)'zzrelax'-> ZaneZam Relax ->
NEW! based on moderate (except hotplug settings) with relaxed sleep settings

To change profile, open Kernel Adiutor and CPU -> CPU Governor Tunables -> find "profile_number" and change it.
e.g. If you want to set zzbatp, change "profile_number"'s value to 5

v58a
Disabled Quick Charge 2.0 for Z2 since there was report it's not working
v58
Enabled Quick Charge 2.0... don't know if it really works since I don't have capable charger
Changed way to set SELinux mode (please test ***_Enforcing.zip, I don't have much time to test)
Added optimization for Zen, Sio Plus and power_efficient workqueue, GPU
Added Adreno idler (addon for adreno-tz)
To disable, run
echo 0 > /sys/module/adreno_idler/parameters/adreno_idler_active

v57b
*If you want to set SELinux Enforcing on boot, download ***_Enforcing.zip
DON'T Install it, it doesn't boot for now

Changed intelliplug to old faux version
Re-added optimizations since it was not cause of bugs
Disabled CPU quiet

v57a
Removed some optimizations (attempt to fix sdcard bug for some users)
Added some optimizations ans CPU quiet from unified kernel
-- CPU quiet will save battery without hurting performance
Changed CPU freq voltage to Myself5's one
Reduced logging spam (qmi_qmux)

v57
Built with UBER toolchains
Updated Zen IO scheduler and set as default
Kernel version name is now shorter (3.4.0-v57)
Updated kexec hardboot values for Z3 Compact
Updated alucard, darkness and nightmare cpu govs
Updated KCAL

v56
Reverted "Enabled intelli_plug and intelli_thermal by default", now mpdecision is back without special operation
Updated Ondemandplus
Changed max freq limit for alcurd, it will use max freq you set
Added some optimization from CM/unified kernel

v55
BIG update!... but no official support for .28 or newer since there's no kernel source.
I only tested with Z3, so need testing on Z2 and Z3C.
v54 is gone while testing.

Updated TWRP to 2.8.6.0
-Rebuild with intelli_plug and intelli_thermal support
---sudden reboot while backuping won't occur with them
-Added support for backup and restore baseband, FOTAKernel, TA, LTALabel (Certificates info)
---TA restore is not tested!! If you are rich enough, please test it. I think it's same implementation as monx®'s one...

SELinux is now permissive! (thanks shield94 for this)
F2FS support is back (need test)
Changed busybox to [NUT]'s XZDR one
Supports init.d in kernel
Enabled intelli_plug and intelli_thermal by default
Disabled MP decision (if you want to enable, please rename "/system/bin/mpdecision_disabled" to "/system/bin/mpdecision" and reboot)

Added slim governor (better performance)
Removed Lionheart, Wheatley and Lagfree (too old)
Updated intelli_plug
Updated alcurd hotplug
Updated alucard, darkness and nightmare cpu governors
Tuned smartassv2
GPU: set min pwr level as default
Added some optimizations

v53a
Updated prop in ramdisk to 23.1.A.0.726 (sorry)
Updated KCAL
Removed 2.8Ghz because of it's not stable enough

v53
Supports 23.1.A.0.726
Removed workaround for Xposed, please install Xposed Alpha 4 (xposed-sdk21-arm-20150430.zip) to fix issue
Reverted "Enable alucard hotplug by default"
Added some optimization from unified kernel

v52
Temporary solution for Xposed's bootloop when pacakge number is over 330 by increasing INR_OPEN_CUR to 4096 (maybe it bootloops if you have 1200+ apps, but no one will do that)
Enable alucard hotplug by default
Removed bricked hotplug since this causes some problem on some users (as always, I don't have problem...)
Set max CPU freq to 2.8GHz for Z3 due to instability

v51
Added bricked hotplug (msm_mpdecision)
Changed some default values (alcurd hotplug params, intelli thermal enabled, set default I/O scheduler to fiops...)
Updated alcurd CPU gov
Set higher bus level for GPU 100Mhz

v50a
Added Taiko_control by cocafe (alternative to Faux's sound control)
See this post for commands to enable and configure

v50
Lollipop kernel!
All features in KitKat but not Sound Control and most of optimizations for better stability.
I couldn't make SELinux to Permissive and F2FS support with previous method, so I'm looking for another method...

--------------------------------------
Show older changelog
KitKat version
v32
Updated Intellidemand

v31
Updated KCAL, alucard hotplug, alucard gov
Reverted patch for encryption

v30a
Removed new CPU freq table in v30 due to instability

v30
Added new CPU freq table (576Mhz, 1344Mhz, 1651Mhz, 1804Mhz, 2035Mhz, 2112Mhz, 2342Mhz)
Added CPU governor - alucard, smartmax, nightmare, darkness, pegasusq, ondemandplus
(UPDATE: alucard wasn't enabled in first build... please redownload)
Updated Alucard Hotplug
Added some patch for sound control (but no effect?)
Changed permission for intelli plug (but it doesn't fix some settings not changing...)

v29
Fixed CPU voltage settings
Added Alucard HotPlug (good for battery!)
Added HYPER CPU governor
Added 268MHz CPU Step
Added sysfs interface to Enable / Disable Android Logger
# Disable Android logger
echo "0" > /sys/kernel/logger_mode/logger_mode


From now on, I recommend to use "Synapse + Universal Kernel Manager" to configure.
I sent pull request to support our device, and here is modded UKM.

v28a
Updated intelli plug (from dorimanx's LG G2 kernel)
Calibrate auo panel to be sensibly less red for Z3C (from unified kernel)

v28
Updated patch for memory
Added patch for encryption
Added power_efficient workqueues
NOTE: This is internally big update, so you'll lose some system settings like disabled app status, hide notification and "Always" app settings.

v27a
Disabled msm_mpdecision

v27
Added dynamic fsync
Reverted patch for mm
Updated TWRP to 2.8.5.0 (Z3C)

v26b
Set SELinux to Permissive (This is for future Xposed support. Poll is here)
Added patch for mm from unified kernel
Added patch for sound control (FauxSound)
Support F2FS for /system and /cache by generating proper fstab
Updated F2FS codes

v26
Switched to -Ofast
Enabled msm_mpdecision (more customizable mpdecision)
Removed one CPU freq patch

v25a
Added Ultra KSM (enabled by default)a it breaks Wi-Fi

v25
Patched some exploits
Added Dynamic management of dirty page writeback (enabled by default)
--Can be enabled/disabled at /proc/sys/vm/dynamic_dirty_writeback
Removed some optimization

v24
Added version name in Kernel Version (e.g. 3.4.0-AndroPlusKernel-v24)
Added ElementalX governor
Added some optimizations

v23
Removed old KCAL and added new KCAL
--Download app to control your display at this thread

v22
Updated TWRP to MultiROM TWRP 2.8.5.0 (Z2 and Z3)
Removed 2.9GHz/3.0Ghz from Z2 and 3.0Ghz from Z3/Z3C since they are not enough stable
Adjusted default freq of CPU freq limiter

v21e
Enabled Class AB audio
Some change for cpufreq limiter/min max

v21d
Removed unused modules
Shorten time to enter sleep state
Removed "unwind warning" while building

v21c
Reverted patch for audio since it causes hi-res playing problem

v21b
Added back F2FS
Fixed touch detection in MultiROM menu (only for clearpad device for now)

v21a
Changed to -Ofast instead of -O3
Some more optimization/patch (cpufreq, panel, net, audio, storage)

v21
Added GPU governor conservative
Allow non superusers to change i/o scheduler
Some optimizations for devfreq, deadline scheduler, mmc, memory, intelli_plug
Fixed compile error of fast hotplug and intellidemand

v20c
Fixed CPU freq limiter
Disabled Android Loggera revert in v20c
Updated intelliplug to v3.9a revert in v20c

v20a
Adjusted params of intellimm
Some optimizations (reverted in v20b)
Changed TWRP's "ro.product.device" to D6603 since CM is built with wrong codename

v20
Updated TWRP to 2.8.4.0 with MultiROM support (Thanks Myself5)
Some more optimization of -O3
Added tripndroid I/O scheduler
Some changes for cpufreq (less spam log, delete deprecated code)

v19c
Changed some value for SmartassH3
Reverted lz4 Cryptographic API
Adjusted regulator for 3.0GHz

v19a
Reverted almost all patches/optimizations but added back -O3 optimization since it isn't cause of problems
Reverted F2FS support

v19
Fully supports MultiROM!
Separated CWM and Philz recovery since boot.img is too big, please unpack using tools such as Android Image Kitchen and overwrite ramdisk-recovery.cpio from here
Added support for F2FS (maybe, didn't test) will revert in v19a
Reverted some optimization for memory since I found they cause random reboot problem in other kernel

v18
Added 2.9Ghz and 3.0Ghz overclock (won't work well on low pvs device)
Fixed lagfree
Reverted intelli_plug to v3.8
Added one commit from abricot kernel

v17c
Added working kexec hardboot, just wait for MultiROM!
Reverted some optimizations for sched and writeback
Added back USB keyboard/mouse function with ON/OFF
--Reverted in v18, due to strange problem which I can't reploduce

v17a
Reverted -O3 + A15 + Graphite Optimizations, maybe it's too stricta
Reverted some optimization for CPU

v17
Integrated frandom in kernel
Use maximum potential of slimbus (*maybe* higher sound quality)
Changed CONFIG_MODULE_FORCE_LOAD to y
Updated powersuspend to 1.5
Attempt to fix kernel wakelock
CIFS support
Some optimization
Disabled Sound Control (FauxSound) since there are many bugs

v16
-O3 + A15 + Graphite Optimizations
Added some patches for network and memory management
Added power key emulator - faster than "input keyevent 26"
#For screen off
echo 10 > /sys/kernel/ponkey/ponkey_emu
#For power menu
echo 600 > /sys/kernel/ponkey/ponkey_emu
Added VR, ZEN, SIO-Plus iosched
Added frandom module
Deleted USB keyboard/mouse function
Disabled MSM-Sleeper
Deleted non-working voltage for CPU OC... 2.9GHz is unstable!

v15a
Fixed SmartassH3 (thanks sh4d1t0)

v15
Enabled MSM-Sleeper
Changed TWRP to [NUT]'s one
Added "Convert device into USB keyboard/mouse" function (thanks pelya)
--You can control your PC with Xperia (download and install USB-Keyboard.apk from here)
--Deleted in v16 since it causes MTP problem

v14
Fixed Smartass v2
Added CPU govonors smartassH3, adaptive, intellidemand 5.0

v13
Updated TWRP to 2.8.3.0
Updated intelli_plug to v3.9
Added fast_hotplug by pec0ra

v12
Support loading recovery from FOTA kernel by pressing power button
Deleted force fast charge option for faster charging
Disabled zzmove

v11
Added CPU governor zzmove I'll revert in v12
Fixed Sound Control, now it's working!
Added glocklee's "A sexy kernel patch for notification light"
Disabled sony_ric completely in kernel

v10
Updated to 23.0.1.A.5.77

v9
Enabled TCP cong algorithms BIC, Westwood+, H-TCP, Vegas, Veno, YeAH TCP
Enabled advanced congestion-avoidance algorithms
Fixed simple_ondemand GPU governor crashing

v8
Changed GPU OC to 657MHz, Idle on 27MHz, added back stock freq and add 100MHz Step

v7
Added Simple GPU Algorithm
Added GPU OC to 644 MHz and idle on 120MHz
Added CPU overclocking 3.2 GHz - not working, need someone who can break limit!

v6
Added "intelliminmax cpu governor"

v5
Fixed OC
Added back 2.457GHz

v4
Updated TWRP to 2.8.1.0

v3
CPU OverClock upto 2.89GHz

v2
Intelli-Plug driver v3.8
Intelli-thermal v2
Intelli-KSM
Sound Control driver v3.6 [Not working]
PowerSuspend drivers
Force FastCharge
kernel level Color Control
kernel mode NEON
msm_cpufreq_limiter "Snake Charmer"
per-core overall stats
NTFS R/W support
I/O schedulers
--BFQ
--FIOPS
CPU governor (Some are not tested)
--Intelli-active
--LionHeart
--SmartAssV2
--LagFree
--Wheatley

v1
Disabled ric
CWM (Volume Up)
TWRP Recovery (Volume Down)
PhilZ touch recovery (Camera Key)
CPU OverClock upto 2.8 GHz
GPU OverClock
CPU Undervolting
SIO I/O scheduler

--------------------------------------
Source
More from AndroPlus

FTF for Japanese Xperia

Mega collection of FTFs for Japanese models. If you have FTF which is not listed on the website, please send me via Google Drive or PM me on xda.

Xperia Codename List

The list of codenames of all Xperia!

Get my Xposed modules for Xperia

Simple and effective Xposed modules for Xperia devices - you can enable hidden features and mods with one tap.

Go to my blog, AndroPlus.org

My blog for Xperia related information. Sorry, but most blog posts are only displayed in Japanese.