• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD] BlackenedMod v3.0 (Pixel / Pixel XL)

Search This thread

xFirefly93

Senior Member
Jan 10, 2018
1,423
2,292
Timrå
Introduction:

This modification / custom kernel configuration for Pixel and Pixel XL is optimized and made with the focus on bringing several, carefully tuned behind-the-scenes enhancements & adjustments that improves overall critically needed performance, system responsivness and battery life to the highest possible level. The seed to this project can by the way be found here, for anyone that is interested of its origins.

Note: This script is not recommended to be modified or customized by the user.

The latest release can be found here.

Disclaimer:
This is presented as "what if". If this modification screws up or breaks anything for you, I am not the one to be held responsible. It's a free will to try out this kind of changes/modifications/addons/tweaks, just don't blame the inventors for eventual bad results and/or screw-ups.

Features:
  • Reduced battery consumption
  • Device specific enhancements for best possible balance between battery life & performance
  • Enabled, and fully configured, Boeffla generic kernel wakelock blocker
    [
  • Disabled a lot of useless stuff at kernel level (Improves battery life as well as performance)
  • CPUSet improvements & optimizations
  • Schedtune tweaks (Improves responsivness)
  • Power efficiency enhancements
  • Wide IO block tuning (Reduces the possibility of hiccups, lags and overhead)
  • Possibly other miscellaneous things I've forgotten to write down here, both big and small.

Requirements/what you need for getting this script fully working:
  • An unlocked bootloader
  • Your own specific choice of kernel
  • Latest Magisk
  • Busybox for Android NDK Magisk Module by @osm0sis
  • Patience

Installation/How-To use & abuse:
  • 1) Download the attached ZIP
  • 2) Extract the script
  • 3) Move the script to the following location;
    /data/adb/service.d and give the script the following permissions (0755)
  • 4) Reboot your phone, let Android boot to the launcher and let Magisk boot service do its crucial magic (takes a few seconds before the scripts is fully up and running around behind the scenes)
  • 5) Enjoy!
  • Note: If you still are unsure how to do for making my kernel configuration / modification work & be up and running behind the scenes, then please read @Phalanx7621 phenomenal guide here or check out @Phalanx7621 in-depth video here. The installation method is the same for both the first generation as well as the second generation of Pixels!
Credits:
  • @nathanchance for his contributions with his Flash Kernel
  • @franciscofranco for all the information on which kernel wakelocks that is safe to block
  • @Phalanx7621 for his phenomenal how-to guide
  • @Lord Boeffla for his awesome generic kernel wakelock blocker
  • @pkgnex for inspiring me walking into this partially unknown territory from the beginning
  • @flar2 for his excellent EXKM application and ElementalX Kernel
  • @osm0sis for his Magisk Busybox module
  • Everyone that I've forgotten to mention here
Telegram:
If you want to try out betas / previews of my script before they are officially released, or just hangout and chat a little, then join the official Telegram group here

To-Do list:
  • Optimize and properly tune things even further for best possible balance between battery life, system responsivness and performance

Contributors:
@xFirefly93

Created: 2018-10-08
Last updated: 2019-01-04
 
Last edited:
G

GuestK00254

Guest
Been following your thread over in the Pixel 2 XL forum, nice to have you here :)
Edit: sorry for stealing the first post btw hehe
 
Last edited:

Phalanx7621

Senior Member
Jul 17, 2011
5,021
2,271
Delaware
OnePlus 8 Pro
There is no .core folder inside /sbin, do we have to create it ? Edit: reboot solved. Couldn't see it.
Got it installed and I'm thinking it's working. Does the script turn off Core Control ? Just noticed it's off in Ex Kernel Manager , is this by design ?
 
Last edited:

Phalanx7621

Senior Member
Jul 17, 2011
5,021
2,271
Delaware
OnePlus 8 Pro
Core control screenshot
 

Attachments

  • Screenshot_20181008-203232.png
    Screenshot_20181008-203232.png
    160.1 KB · Views: 1,219

xFirefly93

Senior Member
Jan 10, 2018
1,423
2,292
Timrå
There is no .core folder inside /sbin, do we have to create it ? Edit: reboot solved. Couldn't see it.
Got it installed and I'm thinking it's working. Does the script turn off Core Control ? Just noticed it's off in Ex Kernel Manager , is this by design ?

Hm, I have not touched the specific tunable that is controlling Core Control.. Maybe it is disabled because of my Sched CPU governor tweak.
 
  • Like
Reactions: Old Man Dave

xFirefly93

Senior Member
Jan 10, 2018
1,423
2,292
Timrå
Last edited:

xFirefly93

Senior Member
Jan 10, 2018
1,423
2,292
Timrå
I mean I'm only concerned with battery life. If you get better battery life with it off, I'm down with that for sure.

I will compare how my Marlin / Pixel XL performs with it disabled respectively enabled and see which "solution" that is giving best battery life with less performance tradeoffs, and then I will include the best overall compromise in v1.2 of my kernel configuration / script.

:)
 
Last edited:

Phalanx7621

Senior Member
Jul 17, 2011
5,021
2,271
Delaware
OnePlus 8 Pro
For anyone else interested in this, this is how I went about it:
1) Downloaded Flash Kernel from his thread over here https://forum.xda-developers.com/pixel-xl/development/marlin-flash-kernel-1-00-t3788300
2) Downloaded the latest version of this mod
3) Downloaded the Magisk module required, which you can find by searching Magisk for "busybox" and choosing the "Busybox for android NDK" version
4) Flash that Magisk module, reboot into recovery, flash the Flash kernel (no need to reflash magisk, it's automatic), reboot back into system.
5) Check to make sure Magisk is functioning properly, for me I had to reboot due to an error in the application but that may have been on my end.
6) So now you have Flash kernel and the Magisk module required to be able to properly run this script. Extract the script from the .zip file you downloaded to a folder.
7) Ok so these next steps if you aren't familiar with this stuff could be tricky, but it's actually simple it just sounds tricky. I use Mixplorer for this, I highly suggest using it, it's free and it's on XDA Labs here. https://labs.xda-developers.com/store/app/com.mixplorer But any file explorer w/ root access will do. Inside the folder you extracted the script into there are two versions, choose the Public Release version and copy that file. Navigate to root ( / ) and go to /data/media/0 and paste the file there. The reason for this is you have to change the permissions to allow it to be an executable script and this folder allows that. (there are other ways to do this, FYI but this works just fine for me) You want the permissions to be 755, so it would look like this: (see attachment) To change permissions in Mixplorer, just long press the file and hit the little i (for information) in the upper right. Then click on the permissions you want to change.
8) Now all you have to do is copy that file you just changed the permissions to and paste it into: /sbin/.core/img/.core/service.d | | Now you won't be able to SEE .core unless you have hidden files on, in Magisk it's in the upper right hand corner 3 dot menu. Click Show Hidden. After you paste the file there, reboot and congratulations, you have achieved greatness.
 

Attachments

  • Screenshot_20181008-202246.png
    Screenshot_20181008-202246.png
    143.9 KB · Views: 2,136
Last edited:

xFirefly93

Senior Member
Jan 10, 2018
1,423
2,292
Timrå
Update!

v1.2 (Minor release)
- Optimized Sched governor for best balance between performance & battery life
- Reverted pm_freeze_timeout to stock settings
- Raised dirty_ratio to 30
- Some minor script based clean-ups here and there

Enjoy! :)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Introduction:

    This modification / custom kernel configuration for Pixel and Pixel XL is optimized and made with the focus on bringing several, carefully tuned behind-the-scenes enhancements & adjustments that improves overall critically needed performance, system responsivness and battery life to the highest possible level. The seed to this project can by the way be found here, for anyone that is interested of its origins.

    Note: This script is not recommended to be modified or customized by the user.

    The latest release can be found here.

    Disclaimer:
    This is presented as "what if". If this modification screws up or breaks anything for you, I am not the one to be held responsible. It's a free will to try out this kind of changes/modifications/addons/tweaks, just don't blame the inventors for eventual bad results and/or screw-ups.

    Features:
    • Reduced battery consumption
    • Device specific enhancements for best possible balance between battery life & performance
    • Enabled, and fully configured, Boeffla generic kernel wakelock blocker
      [
    • Disabled a lot of useless stuff at kernel level (Improves battery life as well as performance)
    • CPUSet improvements & optimizations
    • Schedtune tweaks (Improves responsivness)
    • Power efficiency enhancements
    • Wide IO block tuning (Reduces the possibility of hiccups, lags and overhead)
    • Possibly other miscellaneous things I've forgotten to write down here, both big and small.

    Requirements/what you need for getting this script fully working:
    • An unlocked bootloader
    • Your own specific choice of kernel
    • Latest Magisk
    • Busybox for Android NDK Magisk Module by @osm0sis
    • Patience

    Installation/How-To use & abuse:
    • 1) Download the attached ZIP
    • 2) Extract the script
    • 3) Move the script to the following location;
      /data/adb/service.d and give the script the following permissions (0755)
    • 4) Reboot your phone, let Android boot to the launcher and let Magisk boot service do its crucial magic (takes a few seconds before the scripts is fully up and running around behind the scenes)
    • 5) Enjoy!
    • Note: If you still are unsure how to do for making my kernel configuration / modification work & be up and running behind the scenes, then please read @Phalanx7621 phenomenal guide here or check out @Phalanx7621 in-depth video here. The installation method is the same for both the first generation as well as the second generation of Pixels!
    Credits:
    • @nathanchance for his contributions with his Flash Kernel
    • @franciscofranco for all the information on which kernel wakelocks that is safe to block
    • @Phalanx7621 for his phenomenal how-to guide
    • @Lord Boeffla for his awesome generic kernel wakelock blocker
    • @pkgnex for inspiring me walking into this partially unknown territory from the beginning
    • @flar2 for his excellent EXKM application and ElementalX Kernel
    • @osm0sis for his Magisk Busybox module
    • Everyone that I've forgotten to mention here
    Telegram:
    If you want to try out betas / previews of my script before they are officially released, or just hangout and chat a little, then join the official Telegram group here

    To-Do list:
    • Optimize and properly tune things even further for best possible balance between battery life, system responsivness and performance

    Contributors:
    @xFirefly93

    Created: 2018-10-08
    Last updated: 2019-01-04
    16
    For anyone else interested in this, this is how I went about it:
    1) Downloaded Flash Kernel from his thread over here https://forum.xda-developers.com/pixel-xl/development/marlin-flash-kernel-1-00-t3788300
    2) Downloaded the latest version of this mod
    3) Downloaded the Magisk module required, which you can find by searching Magisk for "busybox" and choosing the "Busybox for android NDK" version
    4) Flash that Magisk module, reboot into recovery, flash the Flash kernel (no need to reflash magisk, it's automatic), reboot back into system.
    5) Check to make sure Magisk is functioning properly, for me I had to reboot due to an error in the application but that may have been on my end.
    6) So now you have Flash kernel and the Magisk module required to be able to properly run this script. Extract the script from the .zip file you downloaded to a folder.
    7) Ok so these next steps if you aren't familiar with this stuff could be tricky, but it's actually simple it just sounds tricky. I use Mixplorer for this, I highly suggest using it, it's free and it's on XDA Labs here. https://labs.xda-developers.com/store/app/com.mixplorer But any file explorer w/ root access will do. Inside the folder you extracted the script into there are two versions, choose the Public Release version and copy that file. Navigate to root ( / ) and go to /data/media/0 and paste the file there. The reason for this is you have to change the permissions to allow it to be an executable script and this folder allows that. (there are other ways to do this, FYI but this works just fine for me) You want the permissions to be 755, so it would look like this: (see attachment) To change permissions in Mixplorer, just long press the file and hit the little i (for information) in the upper right. Then click on the permissions you want to change.
    8) Now all you have to do is copy that file you just changed the permissions to and paste it into: /sbin/.core/img/.core/service.d | | Now you won't be able to SEE .core unless you have hidden files on, in Magisk it's in the upper right hand corner 3 dot menu. Click Show Hidden. After you paste the file there, reboot and congratulations, you have achieved greatness.
    14
    Hi everyone!

    I know it have been pretty much dead silent in, and around, here for a while at my end. I really wants to apologize for that, and I just wanted to tell everyone that I've NOT forgotten, or EOL:ed, this project and I won't do it in the first time either, until I feel that I have done everything that is possible to-do for the Pixel / Pixel XL line-up.

    Anyway, what I wanted to say is..

    I've been pretty much kind of busy the last few weeks after the release of v2.1, I know. Real life priorities and issues have kept me "stunned" a lot, and also maintaining and making the big brother to this custom kernel configuration (for the second generation of Pixels) perfect and sorting & fixing all issues out from a optimization based point of view, so I could get one part fully finished and a lot of time & dedication spared for everything else over here at XDA that I am more or less either a bigger, or smaller, part of.

    Enough talked now about stuff between heaven and hell, should we move on to the teasing part, perhaps?

    I have actually a lot of stuff on my mind for v3.0. Some of them may be possible to achieve, and some may not. We'll literally see about that. One of the ideas is newer "profiles" / kernel configurations with for example better CPUSet configurations (which will be based on something similar to what I've included on my deeply and perfectly customized Maintainer releases for Pixel 2 / Pixel 2 XL) and also adding a few more kernel specific scripts that will be (hopefully) fully optimized for[/] every custom kernel that have been released across the whole first line-up / generation of Pixels, just for unlocking every possible percent of potential and power from both your device and your (custom) kernel of choice.

    Stay tuned, and keep your eyes and ears open for the very soon coming pitch black magic that will evolve into v3.0. It will be worth all the wait in the end, or as for quoting what Jim Carrey said in The Cable Guy;

    There's no end to the possibilities!

    :highfive:
    9
    Update!

    Version 3.0 (Huge major release):
    - Re-wrote, and optimized everything in the script, from scratch
    - Disabled exception-trace kernel debugging logger
    - Fully disabled & purged all of the kernel snapshot modules
    - Enabled the backlight dimmer kernel module
    - Modified the output log message just a little
    - Cleaned up & edited a few parameter descriptions
    - Enabled Schedutil (if your kernel of choice is including it) and tuned it for best possible balance between battery life and performance for daily usage
    - Decreased the target GPU frequency down to 133Mhz for slightly increased power efficiency
    - Disabled discard_max_bytes for all of the IO blocks (this reduces overall UI jank and system stalling latencies)
    - Tuned the Adreno 530 GPU into delivering better performance with "respect" toward battery consumption
    - Shifted to @pkgnex own simplified and more than overall efficient IO block tuning tweak (You rock, dude!)
    - Added a detailed changelog to the BlackenedMod ZIP (with the same changelog that is posted over at XDA - more is always better)
    - Added, and enabled, a newer customized as well as optimized CPUSet configuration for massively improved balance between performance and battery life
    - Decreased Schedtune foreground boost value to 5 (better balance between performance and overall power consumption)
    - Tweaked the kernel task scheduler for improved system responsivness (Thanks to @Takaani for the suggestions)
    - Blocked a lot of useless kernel wakelocks (KWL:s) for reduced battery drain during idle
    - Increased pm_freeze_timeout value to 25000ms
    - Raised sched_rt_runtime_us value to 980000 (leads to better system stability & fluidity)
    - Added a optimized tweak that hopefully reduces the battery drainage that is being caused by the screen
    - Tweaked the CFQ scheduler for massively improved IO throughput efficiency and system wide performance (this fixes the minor queueing issue that CFQ is known for)
    - Added so you are given, if wished, the option to either use stock msm-adreno-tz or the originally Samsung forked simple_ondemand GPU governor directly within the main script
    - (Note: Default / pre-enabled GPU governor is still msm-adreno-tz)
    - Disabled TTWU_QUEUE (leads to improved placement of tasks, based on stale statistics, on msm devices)
    - Shifted to a all-in-one generic script, which was labeled Maintainer Release in the past, that works on every kernel that have been released for the 1th gen of Pixels
    - Disabled 'tcp_slow_start_after_idle' for overall faster network resume when coming out from idle / deep sleep
    - Tweaked a couple kernel network based parameters for improved networking efficiency and performance
    - Increased Magisk sleep timer to 120 seconds (this fixes the issue with a non-generated log once the main script have been executed and is fully up and running as intended)
    - Some additional and critically needed miscellaneous clean-ups & fixes here and there for overall stability reasons

    Enjoy! :)
    8
    Hi, folks!

    It have been a while since I was active around here. I just wanted to let all of you know that I've not forgotten anyone of you, it is just I that have been a little bit busy with real life basef personal issues and what not.

    Once I'm getting some spare time to kill, I'll start working on v3.0 of my script / modification / kernel configuration. It will be worth the wait.

    Trust me.