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

Search This thread

sublinker

Senior Member
Mar 26, 2013
290
193
Cape Coast
Working great. Still testing...

For those getting bootloops
When you get boot loop, just hold volume up ➕ power to force shutdown. Then boot again and everything is good.
 
Last edited:

d22ad2

Senior Member
Jun 13, 2014
91
41
Warsaw
Phone seems to work okay but i got one weird bug,i cant set lower freq than 1881mhz,and i dont really remember seeing that freq before.Fresh MM install,no apps yet and system debloated so i dont think its my fault.Already disabled two core touch boost and similar but no effect.Gov is interactive.
(happens on all other govs,freq set back to 1881.Using kernel adiutor)
 
Last edited:

pec0ra

Senior Member
Jan 29, 2012
840
1,123
Zürich
Sony Xperia 5 II
Noooo I got a problem.
The new TWRP Recovery Update cannot mount

/cache
/data
/system

which means my internal storage is useless in the recovery and i cannot flash anything, wipe cache and dalvik and that i only have access to my sd card.
is ther ea way to downgrade to my older twrp?

The problem was Sony RIC not being deactivated in recovery.
I now deactivated RIC directly inside the kernel (not the ramdisk) but the problem is that some ROMs implement wp_xperia_mod library (which bypasses ric) which makes the phone crash when RIC is disabled.
I think I'll publish the RIC disabled kernel anyway but the problem is that people will complain about crashes even if it will be written in the OP that they can just rename a file to deactivate wp_xperia_mod.
 

Pepousek67

Senior Member
Mar 13, 2012
369
137
Karlovy Vary
Phone seems to work okay but i got one weird bug,i cant set lower freq than 1881mhz,and i dont really remember seeing that freq before.Fresh MM install,no apps yet and system debloated so i dont think its my fault.Already disabled two core touch boost and similar but no effect.Gov is interactive.
(happens on all other govs,freq set back to 1881.Using kernel adiutor)

 

pec0ra

Senior Member
Jan 29, 2012
840
1,123
Zürich
Sony Xperia 5 II
Phone seems to work okay but i got one weird bug,i cant set lower freq than 1881mhz,and i dont really remember seeing that freq before.Fresh MM install,no apps yet and system debloated so i dont think its my fault.Already disabled two core touch boost and similar but no effect.Gov is interactive.
(happens on all other govs,freq set back to 1881.Using kernel adiutor)

This is strange. 1881 frequency does not exist in my kernel. Which version of the Z2 do you have?

Sent from my Sony Xperia Z2 using XDA Labs
 

d22ad2

Senior Member
Jun 13, 2014
91
41
Warsaw
This is strange. 1881 frequency does not exist in my kernel. Which version of the Z2 do you have?

Sent from my Sony Xperia Z2 using XDA Labs

D6503
Now i noticed thats its wrong displayed,its 1951 probably.
On screenshot it has 30/40% cpu usage but it usualy has like 3-5% and still stuck at 1951mhz instead of scaling down.
Turning off multicore power saving didnt help either.
 

Attachments

  • Screenshot_20160511-121909.png
    Screenshot_20160511-121909.png
    113.2 KB · Views: 76
  • Screenshot_20160511-121936.png
    Screenshot_20160511-121936.png
    209.4 KB · Views: 76
Last edited:

pec0ra

Senior Member
Jan 29, 2012
840
1,123
Zürich
Sony Xperia 5 II
D6503
Now i noticed thats its wrong displayed,its 1951 probably.
On screenshot it has 30/40% cpu usage but it usualy has like 3-5% and still stuck at 1951mhz instead of scaling down.
Turning off multicore power saving didnt help either.

Did you have any configuration in kernel adiutor (or any other app) for a previous kernel at the moment of flashing ? I suggest you wipe data for the app (or deactivate "set on boot" for all settings), reboot and try again to be sure it is not because of a bad configuration.
 
  • Like
Reactions: d22ad2

d22ad2

Senior Member
Jun 13, 2014
91
41
Warsaw
I flashed fresh MM(existenz),all wiped,clean install. Your kernel flashed even before first boot.Will try to reinstall if nothing helps.
Already tried to untick all,reinstall,wipe cache and data in recovery (fastboot gustavo kernel end then flashed back yours) nothing.
 
Last edited:

StAiF-SyRiA

Senior Member
Jul 27, 2015
55
7
please HELP !! After Flashing Kernel And Reboot System It Won't Restart !!! I Do force shutdown and didn't work !!!
what i should do to make my phone startup !!
 

d22ad2

Senior Member
Jun 13, 2014
91
41
Warsaw
please HELP !! After Flashing Kernel And Reboot System It Won't Restart !!! I Do force shutdown and didn't work !!!
what i should do to make my phone startup !!
First,dont panic.Now are you sure you got an unlocked Bootloader and flashed this kernel on top of MM rom?If you sure you got an unlocked bl then use fastboot to flash stock kernel img.If no you should find 6.0 ftf and tick only kernel to flash and see if it boots then.
 
  • Like
Reactions: pec0ra

StAiF-SyRiA

Senior Member
Jul 27, 2015
55
7
First,dont panic.Now are you sure you got an unlocked Bootloader and flashed this kernel on top of MM rom?If you sure you got an unlocked bl then use fastboot to flash stock kernel img.If no you should find 6.0 ftf and tick only kernel to flash and see if it boots then.
i have unlocked bl and im in ultraslim rom
 

StAiF-SyRiA

Senior Member
Jul 27, 2015
55
7
i have unlocked bl and im in ultraslim rom
ok i flashed stock kernel and my phone works
now how can i flash this kernel without Problems ????

---------- Post added at 12:55 PM ---------- Previous post was at 12:52 PM ----------

You got the rom zip on your PC? Just extract Boot.img from it then use fastboot commands to flash it.
ok i flashed stock kernel and my phone works
now how can i flash this custom kernel without any Problems ???
 

d22ad2

Senior Member
Jun 13, 2014
91
41
Warsaw
I think the problem might be that this rom you use has an preinstalled recovery which may not work well together with this kernel.When it stops to boot,on sony logo or during bootanimation?
 

StAiF-SyRiA

Senior Member
Jul 27, 2015
55
7
I think the problem might be that this rom you use has an preinstalled recovery which may not work well together with this kernel.When it stops to boot,on sony logo or during bootanimation?
No, Inside TWRP I Flashed This Kernel Then I set Reboot System Then It doesn't start .
 

Top Liked Posts

  • There are no posts matching your filters.
  • 58
    Introduction
    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
    • 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
    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
    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
    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
    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
    * 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
    20
    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 [COLOR="Navy"]<value>[/COLOR] > /sys/module/fast_hotplug/parameters/[COLOR="Navy"]<variable_name>[/COLOR]"

    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.
    12
    Update to v6

    New update : Abricot kernel v6

    Changelog :

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

    Fast hotplug now plugs in first core3, then core2 then core1. The reason for this is to try to simulate the "core0 and core3 online" from qcom mpdecision.

    I found out that the compiler wasn't using the -O3 optimization due to some config I missed.
    Some of you are probably curious about the difference between -O2 and -O3 optimization. If you know what this is all about and you want to test it, you can find a test version with -O2 optimizations there (mirror). I'd be glad to get reports on what you found out. If you are not sure of what you are doing and feel you must ask questions like "which version should I use" or "what is the best" or what is -O3 optimization, don't ask it, just use regular version, open google, search and learn !

    I also have a new version of Pimp my Z1 with option for refresh rate. I also fixed the max frequency changing to 1190 when disabling mpdecision.

    Merry Christmas ! :)

    Download :
    Recovery flashable zip :
    Abricot kernel v6.zip
    mirror
    12
    Hi everybody,

    Here are some updates about the development.

    I got Quick Charge to work so I will be able to work on it. I am very busy at the moment with my exams and my bachelor thesis but if I find some time, I am really motivated to do something great with charge and quick charge. By great I mean customizable. Don't get too excited because for now I don't have the time, but I was thinking about allowing to choose different charging currents for different charge levels. This would allow to put higher currents to charge fast when your battery is almost empty without doing too much damage charging the last 30-40% (or even 60% if you prefer).
    To control this, we will need an app because editing the sys values manually would be too complicated. We are lucky here because I gained a lot of Android app development skills last semester :cowboy:
    An app would also offer a lot more possibilities, like enabling or disabling QC at anytime (For example getting a prompt when you plug in your phone) or even reducing normal charging rates (no QC) for the ones willing to get the longest life for their battery.

    What do you guys think ?
    I might also need help since I don't have that much time. Anybody with kernel or app development skills willing to help ?


    About other updates :
    - I am currently on Lollipop (couldn't live without Stamina Mode) so I will probably port the kernel to LP too.
    - I will update to the latest sources when I get back to development.
    11
    Pimp my Z1

    As @B1nny suggested, I tried editing Pimp my Z1 to add fast hotplug support. Everything seems to work and I even added some tweaks for a better support for our Z2 :) ( some default values were not really compatible with our device ). There are probably bugs for configurations other than fast hotplug. If I have time, I will fix them but for now, please use another app to set your frequencies / governors / voltage or live with the bugs. If you have questions about the app, you could also take a look at the official thread to see if it is already there or maybe just to give the dev a thanks.

    I'll probably make a pull request to @Androguide.fr with the changes but until then you can use my own build linked to this post. If you already have the app installed, you will have to uninstall it first because signature is different.

    You can see the full source and the changes on my github : https://github.com/pec0ra/Pimp_my_Z1

    Special thanks to @Androguide.fr for his great app and to @B1nny for his link :)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone