FORUMS

[KERNEL][Sony MM][12.05.16] Abricot kernel v8.1

832 posts
Thanks Meter: 1,123
 
By pec0ra, Senior Member on 7th December 2014, 05:17 PM
Post Reply Email Thread
Introduction
Quote:

Hello dear developers and android hackers,

On this thread, I will share with you a project I am developing as I am learning kernel programming / hacking. This kernel is based on Sony kernel sources with some enhancements for battery saving and performance.




Features
Quote:

  • Based on Sony 23.5.A.0.570 kernel sources
  • Compiled with linaro GCC 4.9.1 toolchain, -O3
  • Governors : interactive, ondemand, performance, conservative, smartassV2, intellidemand2 and intelliactive.
  • Fast hotplug
  • CPU overclock up to 2.8 GHz Thank's to Faux123 and DooMLoRD
  • Changed GPU frequency table to 27 - 657 MHz Thank's to Myself5
  • Sony RIC disabled
  • Undervolt
  • TWRP recovery included, fota partition support
  • Breathing notification light thank's to glocklee
  • Force Fast Charge
  • KCAL Advanced color control Thank's to savoca




Installation instructions
Quote:

Code:
Use this kernel at you own risk !
I am not responsible for any damage or problem.
  1. Flash the zip via recovery
  2. Reboot




Download
Quote:

Please read FAQ and second post if you have any issue

Recovery flashable zip :
Abricot kernel v8.1.zip
mirror

Kernel Source :
Kernel
Ramdisk


Changelog
Quote:

Abricot kernel v8.1 : 12.05.16

  • Disable RIC at kernel level (Fixes partition mounting in recovery)
  • Add KCAL Advanced color control Thank's to savoca


Abricot kernel v8 : 10.05.16
  • Based on Sony sources 23.5.A.0.570
  • Updated TWRP to version 3.0.2-0


Abricot kernel v7 : 01.04.15
  • Updated to Lollipop kernel sources 23.1.A.0.690
  • Update TWRP to 2.8.5.0
  • Add Force Fast Charge
  • Removed splash screen


Abricot kernel v6 : 24.12.14
  • Fix default freq not applying for all cores at boot
  • Fix -O3 compiler optimization
  • Fast hotplug : plug in cores in descending order


Abricot kernel v5 : 15.12.14
  • Increase voltage of higher frequency for better stability
  • Add support for displaying the number of tasks running
  • Add VR, SIO and FIFO schedulers
  • Add lagfree governor
  • Update TWRP to 2.8.1.0
  • Fix scaling_max_freq permissions
  • Set default frequency to 2.3GHz


Abricot kernel v4 : 11.12.14
  • Add CPU overclock up to 2.8 GHz (Thank's to Faux123 and DooMLoRD)
  • Change GPU frequency table to 27 - 657 MHz (Thank's to Myself5)
  • Disable Sony RIC
  • Remove msm_mpdecision
  • Set qcom mpdecision as default


Abricot kernel v3 : 07.12.14
  • First public release


Check my github to see all the changes.




FAQ
Quote:

Q : With what ROM can I use this kernel ?
A : With any ROM based on Sony stock Marshmallow

Q : Your kernel isn't working / My phone isn't booting anymore
A : Read this whole post once more, search for your problem in thread and report it if you haven't found a solution.

Q : Can I install this kernel on locked bootloader ?
A : No ! This kernel is only for unlocked bootloader.

Q : Does this kernel include recovery ?
A : Yes ! You can access by pressing buttons when the led is lighting. Volume down to go to TWRP and Volume up to load recovery from FOTA..

Q : What are mpdecision and fast hotplug ?
A : This is what manage your cpu cores and decide which core will be online. Fast hotplug is a brand new hotplug that I wrote. See next post for more information




Thanks To/Credits
Quote:

* Sony for their sources and device
* @DooMLoRD
* @thewadegeek for his Tutorial
* @show-p1984 for his mpdecision
* @glocklee for his breating notification mod
* @Envious_Data for his help and links
* @dssmex
* @Androguide.fr for Pimp my Z1
* bbedward
* Erasmux
* faux123
* The xda community for making me discover android and for answering so many of my questions
* Google for kernel sources and its search engine
* Apple for making expensive phone so that I never bought one of theirs




Please let me know per pm if there is any mistake or misspelled word in this thread. Automatic correction does a great job but since english isn't my mother thongue I'm pretty sure I made mistakes.

XDA:DevDB Information
Abricot kernel, Kernel for the Sony Xperia Z2

Contributors
pec0ra
Source Code: https://github.com/pec0ra/abricot

Kernel Special Features:

Version Information
Status: Testing

Created 2014-12-07
Last Updated 2016-05-20
The Following 58 Users Say Thank You to pec0ra For This Useful Post: [ View ] Gift pec0ra Ad-Free
7th December 2014, 05:17 PM |#2  
pec0ra's Avatar
OP Senior Member
Flag Zürich
Thanks Meter: 1,123
 
Donate to Me
More
About Fast hotplug
Motivation

I wasn't convinced by show-p's msm_mpdecision nor faux123's intelli_plug ( I don't even talk about qcom mpdecision ). I also wanted to start working on a bigger programming project to learn more about kernel developing so I decided to write my own hotplug.

Main features

I tried to make fast hotplug the lightest possible, so that it consumes the less resources possible when it is not needed (mainly at idle). One of the second goals was to make it customizable.

How to use
  • Deactivate qcom mpdecision (Pimp my Z1 will do this automatically when you choose fast hotplug)
  • Activate fast_hotplug
    Code:
    adb shell "echo 1 > /sys/module/fast_hotplug/parameters/fast_hotplug_enabled"
  • Tune it to your liking

How to configure

Unfortunately, there isn't yet any user friendly application to configure fast hotplug. The only way to configure it is to manually edit the module files with adb or a file editor.
I modified Pimp my Z1 to be compatible with fast hotplug. You can find the modified version at post 12

You can also find all the parameters at
Code:
/sys/module/fast_hotplug/parameters/
and edit them with adb command
Code:
adb shell "echo <value> > /sys/module/fast_hotplug/parameters/<variable_name>"
You can configure the following parameters :
  • fast_hotplug_enabled : 0 for disabled, 1 for enabled
  • boost_duration : Duration of boost in ms when screen is touched
  • threshold_to_boost : Instead of automatically pluging in cores on touch, fast hotplug checks that the load is above this threshold. This avoid cores coming online when reading file or website.
  • max_cpu_on : Maximum number of online cpu when screen is on
  • min_cpu_on : Minimum number of online cpu when screen is on
  • idle_threshold : Threshold under which fast_hotplug will remain almost idle and won't perform any check. This applies when only 1 core is online
  • plug_in_core_X_threshold : with X between 1 and 3. This is the threshold to plug in coreX.
  • plug_in_core_X_delay : This is the number of fast_hotplug cycles (see refresh_rate) to skip before pluging in coreX.
  • plug_out_core_X_threshold : Like plug_in_core_X_threshold but to plug out.
  • plug_out_core_X_delay
  • refresh_rate : Time in ms between fast hotplugs checks
  • screen_off_singlecore : 1 for activated, 0 for deactivated; Allows only one core to be online when screen is off.

If you are using linux, you can easily change the configuration with this small program : https://github.com/pec0ra/fast_hotplug_controller
You will probably want to create init.d script to make your configuration stay after reboot. If enough users want it, I can create an example of script.

Bugs / stability
  • Due to some conflicts with qcom mpdecision, it is possible that you encounter some bugs / reboots when both are enabled.
  • Configuration doesn't stick after reboots

Help needed

If you are a java developer (or want to learn ) and want to help in developing an app (or editing an already existing one) to control the hotplug, please send me a pm

Please tell me your impression, your custom configuration and / or your recommendation so that I can make it better in future releases.
The Following 20 Users Say Thank You to pec0ra For This Useful Post: [ View ] Gift pec0ra Ad-Free
7th December 2014, 05:28 PM |#3  
rowlers's Avatar
Senior Member
Thanks Meter: 337
 
More
Good luck.
Will try as soon as I can.
The Following 2 Users Say Thank You to rowlers For This Useful Post: [ View ] Gift rowlers Ad-Free
7th December 2014, 08:00 PM |#4  
SWEagle's Avatar
Senior Member
Flag Machico
Thanks Meter: 62
 
More
Welcome!
The Following User Says Thank You to SWEagle For This Useful Post: [ View ] Gift SWEagle Ad-Free
7th December 2014, 09:23 PM |#5  
XDA Portal Team / Retired Forum Moderator
Thanks Meter: 875
 
More
Quote:
Originally Posted by pec0ra

Help needed

If you are a java developer (or want to learn ) and want to help in developing an app (or editing an already existing one) to control the hotplug, please send me a pm

Regarding this, there is already an app out there that is FOSS, licensed under the GPLv2 license, looks sexy and should be easy to modify. It's called Pimp My Z1, I think it offers pretty much everything you want.
Other than that, cool that you're developing something new, I'll give it a shot!

Edit:
You may want to disable Sony's RIC it prevents you from writing to /system. This should help you.
The Following 2 Users Say Thank You to B1nny For This Useful Post: [ View ] Gift B1nny Ad-Free
7th December 2014, 10:46 PM |#6  
FrosteezBR's Avatar
Senior Member
Flag Ubatuba - São Paulo
Thanks Meter: 31
 
More
I can't seen to get notification breath effect,i didn't do the mpdecision step,so could this make the diference?
8th December 2014, 03:54 AM |#7  
vendetta718's Avatar
Senior Member
Flag New York
Thanks Meter: 7
 
Donate to Me
More
Is this kernel compatible with franco kernel apps?

Sent from my D6503 using XDA Free mobile app
8th December 2014, 07:32 AM |#8  
pec0ra's Avatar
OP Senior Member
Flag Zürich
Thanks Meter: 1,123
 
Donate to Me
More
Quote:
Originally Posted by B1nny

Regarding this, there is already an app out there that is FOSS, licensed under the GPLv2 license, looks sexy and should be easy to modify. It's called Pimp My Z1, I think it offers pretty much everything you want.
Other than that, cool that you're developing something new, I'll give it a shot!

Edit:
You may want to disable Sony's RIC it prevents you from writing to /system. This should help you.

Thank you for the link
I'll see if I can do something with this app when I have more time (I've never made any android app).
Disabling ric is a good idea I'll do this for next version.


Quote:
Originally Posted by FrosteezBR

I can't seen to get notification breath effect,i didn't do the mpdecision step,so could this make the diference?

No, mpdecision won't affect it. Have you tried it on YadliKernel ? Did it work for all the notifications ? It seems like on abricot kernel they work for most of the notifications but not for sms.


Quote:
Originally Posted by vendetta718

Is this kernel compatible with franco kernel apps?

Sent from my D6503 using XDA Free mobile app

It is probably compatible (I didn't tried it) but you will probably not be able to change most of the configurations since they are not implemented in my kernel. Some configuration from my kernel (like fast hotplug) are also not implemented in the app so you can't change them from there.
The Following User Says Thank You to pec0ra For This Useful Post: [ View ] Gift pec0ra Ad-Free
8th December 2014, 08:47 PM |#9  
FrosteezBR's Avatar
Senior Member
Flag Ubatuba - São Paulo
Thanks Meter: 31
 
More
Quote:
Originally Posted by pec0ra

Thank you for the link
I'll see if I can do something with this app when I have more time (I've never made any android app).
Disabling ric is a good idea I'll do this for next version.




No, mpdecision won't affect it. Have you tried it on YadliKernel ? Did it work for all the notifications ? It seems like on abricot kernel they work for most of the notifications but not for sms.




It is probably compatible (I didn't tried it) but you will probably not be able to change most of the configurations since they are not implemented in my kernel. Some configuration from my kernel (like fast hotplug) are also not implemented in the app so you can't change them from there.

i try with facebook,whatsapp,messaging and gmail
with a led tester its the same blink as stock
would i send you a dsmeg or anything?
8th December 2014, 09:06 PM |#10  
pec0ra's Avatar
OP Senior Member
Flag Zürich
Thanks Meter: 1,123
 
Donate to Me
More
Quote:
Originally Posted by FrosteezBR

i try with facebook,whatsapp,messaging and gmail
with a led tester its the same blink as stock
would i send you a dsmeg or anything?

There's no printing in the mod I think so dmesg would be useless. I'll try again with WhatsApp. Have you tried it on other kernels? Was it working ?

Edit : ok, maybe there is an error... In this case dmesg could be useful. If you have time you can send it, yes.
And I reconfirm that it works for telegram
9th December 2014, 12:52 PM |#11  
TheFerhatKing's Avatar
Senior Member
Thanks Meter: 231
 
Donate to Me
More
Hey, can someone show us the notification mod?
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