[Galaxy S 4 i9505 Android Development] robcore:
Machinex

MarkOneHundred

Sheer will .

This is machinex.

This is machinex. I have been working on this kernel for over a year now, and am finally comfortable with its release to the public. This kernel builds on the great work of those who have made this device the powerhouse that it is. There are elements here that you have experienced on every GS4 kernel to date, as well as other devices.

The goal I had for this project was upstreaming/updating/experimentally upgrading as much as I possibly could. I have done so, and will continue to do so.

This kernel is ONLY for TW-based, 5.0.1 roms for the I9505!!! NO I WILL NOT DEVELOP FOR DEVICES I DO NOT OWN, SAVE YOUR BREATH!

OBLIGATORY DISCLAIMER:

THIS KERNEL COULD VERY WELL DESTROY YOUR PHONE, YOUR LIFE, YOUR MARRIAGE, Etc. YOU INSTALL AT YOUR OWN RISK!! XDA AND I ACCEPT NO LIABILITY FOR YOUR DECISION TO USE THIS KERNEL!!For noobs: assume that installing this kernel will cause your phone to grow arms and punch you in the face.

PLEASE READ AND UNDERSTAND THIS OP BEFORE LEAVING USELESS "IT DOESN'T WORK" COMMENTS!

Issues that aren't answered here will be dealt with on a case-by-case basis.

SEE POST #2 FOR UPDATES, CHANGELOGS, and FIXES

SEE POST #3 FOR BATTERY/PERFORMANCE INFO

SEE POST #4 FOR A SHORT SYNAPSE BRIEFING

LOGS OR IT DIDN'T HAPPEN! Context helps too. What were your Synapse Settings?

KNOWN ISSUES Wifi issue is fixed! After a fresh rom install, all you need to do is reboot and the appropriate files are created in /data :) enjoy! HOTSPOT IS FIXED!!!! Finally! I AM AWARE OF AND WORKING ON LOCKSCREEN PIN BUGS!!

FEATURES:

- Linux 3.4.113 + a LOT of upstreamed subsystem code.

- Automatic Busybox Installation, Version 1.25.1.

- Cpufreq core backported ENTIRELY from mainline 4.13. All Cores operate independantly. Their governors and tunables can all be different.

- Govorners: Due to a highly upstreamed cpufreq core api, not many custom governors for now except for Interactive, Intelliactive, and the *NEW* Schedutil governor, described in the documentation like so:

The "schedutil" governor aims at better integration with the Linux

kernel scheduler. Load estimation is achieved through the scheduler's

Per-Entity Load Tracking (PELT) mechanism, which also provides

information about the recent load [1]. This governor currently does

load based DVFS only for tasks managed by CFS. RT and DL scheduler tasks

are always run at the highest frequency. Unlike all the other

governors, the code is located under the kernel/sched/ directory.

Sysfs files:

* rate_limit_us:

This contains a value in microseconds. The governor waits for

rate_limit_us time before reevaluating the load again, after it has

evaluated the load once.

For a great, comprehensive blog regarding the specifics of each governor, as well as the settings found below, please check out the link I've referenced in post #3.

- HARDLIMIT and THERMAL: Incorporated Yank555's CPU Limiting solution, Hardlimit. ALL hardlimits, cpu boost limits, and thermal limits are now PER CORE. I have included it directly in the core cpufreq code, and it is the primary controller for THERMAL, INPUT BOOST and user controlled hardlimits. Thermal overrides both user-selected and input-boost limits, and you can monitor the limiting in real time. Also, the thermal driver now accounts for each core's temperature, and saves time/lock-contention by skipping core control if the temps are below the frequency limiting value.

-CPU HARDPLUG: A driver I built that hooks into the main cpu hotplug API and allows you to disable any core you want, configurable for screen on/off.

- Hotplugs: MX Hotplug, personally built from scratch and uses a real-time kthread for its calculation work. Intelliplug 15.8 (Personally Updated), Alucard Hotplug, MSM_sleeper, Lazyplug, Blu Plug, and Bricked hotplug.

Hotplug Notes: I changed the names of certain functions in the Alucard and MSM Sleeper hotplugs, so that their tunables could be streamlined in Synapse. Synapse is cleaner and simpler than ever, but if you use a third party app, Alucard and MSM Sleeper's max cores and max cores during suspend settings will not be tunable. So anyone who uses a third party app with this kernel let me know and I'll devise a workaround. Mpdecision removed entirely. The "mpdecision" in our sysfs is actually bricked hotplug.

-GPU:Machinactive, Interactive, Conservative, Ondemand, Performance and Powersave GPU Governors, GPU touchboost (fixed suspend issue), ability to lock the min/max freqs, and more!

-Updated version of fauxsound (5.4) (flar2, alesaiko, me). I limited the options in the code to the 4 controls that actually work for our device, and you'll notice a significant stability improvement. Slimbus:Golden-ratio-based operation is pristine. Sound quality is hardware-perfected. The version number is largely arbitrary and I increment when I make any significant improvements. NO MORE USERSPACE CALCULATIONS NEEDED!!!

-A gamot of colour, brightness, and panel options that I frankly didn't think would be feasible for our device, but it's working! MDNIE HIJACK selection, KCAL, and Cyanogen's generic PCC colour control are implemented in Synapse. Note that MDNIE/KCAL stuff is a battery thief, and I've not tested PCC colour control enough for power consumption to give you a definitive statement on it. Note: PCC values are from 1000 (safety limit) to 32768 (or a number close to that), meaning your tuning control is as FINELY GRAINED as possible for this device. I can't believe Synapse actually supports its ridiculous number of steps (and well, I might add). Faux's generic "colour control presets' are in there and they actually work! The stock colours much more vivid, and lower brightness settings benefit from them as I have modified top brightness to my liking.

-HBM:Qualcomm High Brightness Mode: unlocked! This can be controlled via a checkbox in Synapse, but you can also use flar2's HBM widget from the play store. I tried it before and HBM would flicker, but i pulled off a VERY hacky way of making it userspace controllable. Be careful! Though it doesn't seem to drain the battery or overheat the device, it's purely experimental and could cause Chuck Norris to come to your house and personally smash your phone. Now SEPARATE from autobrightness! "SCREEN FLICKER FIX" on PAGE 2

- Completely upstreamed and overhauled cpu, power, scheduling...you name it. Updated Powersuspend to the point where I had to rename it, because it is now closely integrated with the core suspend/power api. Introducing: Prometheus. The driver now calls suspend directly when you turn the screen off, unless a) music is playing, b) the phone is plugged in or c) you choose to disable the feature.

-All the TCPIP tweaks etc, updates to random/frandom, android-specific autogrouping, limited but significant LMK/OOM updates.

-BACKPORTED "codel" fair-queueing net-scheduler, for a faster/more consistent networking experience.

-persistent ram, kexec-support, fast-charge, etc. Drop Caches button in Synapse is useful.

-Utilizing Qualcomm's built-in QRNGD (qualcomm random number generator daemon) with randomness optimized in the kernel = entropy for days.

-BOOTLOADER: Officially only 5.0.1 Bootloaders are supported. Unofficially, someone tried it with a KK bootloader and it worked fine for him so what do I know?

-COMPLETE Synapse support. Download, update, AND install Busybox On Rails from the PlayStore before you install the kernel for best compatibility and support. UPDATE: FULL Busybox installation is now included in machinex installer script. If you have any issues, still feel free to install Busybox on Rails. Upon kernel installation, you'll find Synapse installed in your system apps. If you want to get rid of it, just remove it from /system/priv-app with your file manager.

-CPU and GPU VOLTAGE Control: Both in Synapse. I DO NOT SUPPORT ISSUES IF YOU CHANGE VOLTAGE. YOU ARE ON YOUR OWN.

MENTIONS:

To those listed here, I cannot express how grateful I am for your assistence, patience, and kindness towards me as I badgered you throughout my journey. Though saying "thank you" doesn't feel like enough, thank you all. If I missed someone here, please tell me.

Thankyou:

friedrich420

Slim80

Tkkg1994

flar2

osm0sis

alesaiko

HybridMax

Kushan

Alucard24

Ausdim

Ktoonsez

neobuddy89

javelinanddart

Andreilux

theHacker911

UpInTheAir

Pafcholini

Placiano

Dorimanx

faux123 (seriously like the godfather of s4 kernel hax)

jcadduono

FransiscoFranco

Cyanogen

Meticulus

Eliminator74

Matthew-333 (moonshine kernel)

klabit87

apbaxel

yank555

ion-storm

yseras

PDesireAudio

lsswizard

arter97

Grarek

mrg666

showp1984

gsstudios

Lord Boeffla (andip)

Chainfire

TeamTrickster

tommygreenus

Andycar (For being the best bloody coding buddy I could ask for)

The Machinex Testing Team! - AMAZING folks, just amazing.

My Awesome Testers from this thread.

Again, I'm sure there's tons more.

On to the fun part then

INSTALLATION INSTRUCTIONS:More importantly, the uninstallation instructions. The install pretty much takes care of itself.

There are two links below that you must download in order to safely have an install/uninstall solution for this kernel. The one labelled "machinex-MarkOneHundred.zip" is the kernel. UPDATE: Busybox On Rails isn't required anymore. The second zip is crucial for uninstalling, aptly named "machinex-uninstaller-Jan12.zip." When this kernel is installed (and everytime it boots), it will rename mpdecision, thermald, thermal-engine, and power.default.so with an appended "-bak" suffix, because they all interfere with the updated power/cpu code in the kernel. If you switch to a different kernel, I INSIST that you flash the uninstaller (or take a look at the scripts yourself and do the stuff manually). ATTENTION: SLIM80'S KERNEL CLEANING SCRIPT IS NO LONGER NECESSARY WHEN FLASHING THIS KERNEL!!!!!! I HAVE INTEGRATED MY OWN CLEANUP PROCESS IN THE INSTALLER!!!!!!!!!!

TLDR: NO NEED FOR BUSYBOX ON RAILS, flash zip. use uninstaller zip to uninstall.

DOWNLOADS:

!!!JANUARY 12, 2017:UPDATE!! NEW UNINSTALLER for EVERY VERSION!!!!

DO NOT MIRROR THESE ELSEWHERE. DO NOT INCLUDE THEM IN YOUR ROM WITHOUT ASKING MY PERMISSION FIRST. I AM HAPPY TO COLLABORATE, NOT TO BE ON THE RECEIVING END OF BUG REPORTS CAUSED BY THIRD PARTY DOWNLOADERS.

UNINSTALLER-JAN12: https://www.androidfilehost.com/?fid=385035244224412313

md5: 295ac70bbb17ad2e5dc59e4ca1288e79

MarkOneHundred

INSTALLER: https://www.androidfilehost.com/?fid=745849072291685412

md5: 03af9cfc399d3eda3141254291668563

SOURCE: https://www.github.com/robcore/machinex

(be gentle on my ridiculous commit history, my git skills are shoddy at best).

So keep in mind this a development thread, blah blah blah, but if we all have good discussions (let's TRY to keep it on topic), I'm more than happy to have some fellow nerd friends to talk about my passion with. Heck, I want to use this thread as a chance to meet some other developers who wanna work on stuff together, exchange ideas, learn, and teach me how to get better at git.

Enjoy!

XDA:DevDB Information

Machinex, Kernel for the Samsung Galaxy S4

Contributors

robcore

Source Code: https://www.github.com/robcore/machinex

Kernel Special Features:

Version Information

Status: Stable

Current Stable Version: MarkOneHundred

Stable Release Date: 2017-10-31

Created 2016-09-05

Last Updated 2017-10-31