Monday, September 5, 2016

[Kernel][TW][5.0.1][I9505/i337m][Machinex][MarkOne]

Machinex
MarkOne
"if life gives you shrapnel in the chest, build an Arc Reactor"

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 feel like I have done so, though perhaps in the future you will see a MarkTwo (though by then I hope to have a newer phone).


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.


FEATURES
:
- A ton of sweet governors

- Hotplugs: Latest Intelliplug 5.4 (default), msm_hotplug, msm_sleeper, zen_decision, and bricked hotplug. Note: stock mpdecision is not supported by this kernel, and bricked hotplug is its replacement (it's called mpdecision in the ksysfs, but is all bricked baby:cool:). Maaaaybe more to come.

- Intellithermal - faux123's thermal replacement. As it stands, the way its tuned keeps the device cool. It pretty much never heats up. Winning. NOTE: NEVER disable it, as this kernel literally disables thermald (it's a long story, but I'm gonna ask you to trust me on this...). Okay no don't blindly trust me, thermald just straight up doesn't work with the updated cpu structure in the kernel, and the intellithermal implementation completely negates the need for a pesky daemon that constantly tries to override perfectly working kernel function. Come to think of it, I'm going to remove the option to disable this in the next kernel.

- *Minimal* but effective kgsl/gpu updates. I've found that for TW kernels, like 99% of instability issues seem to come from codeaurora/cm graphics code that just doesn't play nice with Samsung's OS. Our OCTA (on-cell Touch Amoled) panel is also very unique, and has little in common with much of the others that use a snapdragon600/8064/8960 chipset. That said, I thew in Faux's SIMPLE governor, alongside updated tweaks from Franco that actually make it a battery saving powerhouse while still giving snappy performance. *Cockney British accent*: I was pleasantly surprised, I was.

- A cleaner/updated version of fauxsound (4.3), coded by flar2 and alesaiko (and a little bit of me :P but nothing important enough TBH). I limited the options in the code to the four controls that actually work consistently for our device, and you'll notice a significant stability improvement.

- 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 Profile selection in Synapse, KCAL (just RGB, but still pretty cool) also implemented in Synapse, Gamma control (left in, but not implemented in Synapse because kcal and mdnie settings really overshadow a need for it). Note that MDNIE/KCAL stuff is a battery thief, so use sparingly.

- HBM - Qualcomm High Brightness Mode: unlocked! I put on and off buttons 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. It's powerful. BUT it's also SUPER effective when it comes to seeing your bloody screen when it's bright out. FYI: On/off sequences are: echo 6 > /sys/class/backlight/panel/auto_brightness for on or 0 for off.

- Completely upstreamed and overhauled cpu, power, scheduling...you name it. I got rid of early suspend and implemented autosleep with faux's power suspend/panel hooks. It's working beautifully for now until I get off my arse and update all the drivers to using wakeup sources. I strongly encourage you to leave powersuspend alone, because "user control" is really a useless option at this point (remind me to remove it from the code altogether). Panel hook works perfectly.

- All the TCPIP tweaks and garbage,
updates to random/frandom, android-specific autogrouping, limited but significant LMK/OOM updates (not the fancy lg stuff that breaks everything, just the upstreamy/codeaurora/samsung-update stuff to make it work smoother).

-persistent ram, kexec-support, fast-charge, otg-hack, etc. With persistent ram, btw, dropping caches for this kernel has kind of become a must for the time being. I've set it by default to echo 3 > /proc/sys/vm/drop_caches and put a button in synapse for times where the system stability starts having issues. I need to work on some dcache stuff but for now this has been an acceptable workaround for me. This is an experimental kernel after all.

-COMPLETE Synapse support. Download Busybox On Rails from the PlayStore before you install the kernel, and 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) Screenshots to come.

BUGS: A great deal of time (pretty much a year, maybe a year and a half?) went into ironing out some of the major bugs that came with upgrading so many crucial subsystems for a barely supported SoC such as ours. (ironically, it has like full 4.6 device-tree support so...cool)
A good hunk of this kernel's infrastructure is 3.10-3.18-even a little 4.0+ based, and as such, there are certain drivers that I have hacked my way into preserving functionality, all while maintaining compatibility with android/touchwiz userspace. It's a delicate tightrope act to say the least.

- I've gotten rid of Random Reboots that persisted on charging while updating the power code, and now the only sleep/wake issue is that the gsm/lte radio lags a little when waking up from sleep, and a split second extra when turning on the phone. ONCE IN A WHILE the radio might stay off after a long deep sleep, and you'll have to reboot the phone (happens to me at least). Once I figure out where to update the driver code for the modem, I will do so.

- for like a month I couldn't switch governors without the phone freezing up and rebooting, lol that is now fixed. Though if you have any governor issues, PLEASE let me know. Synapse has a built in log collection feature that will be of much use if you'd like to help to debug this bad boy.

- Again, drop caches once in a while. Persistent ram and dcache code need some more work, but I will get to it. Right now I'm busy making a
fancy shmancy kernel thread.

- I tune my stuff for performance because I REFUSE to accept lag, though it means that with my high usage I blaze through battery. I'm sure that given reasonable settings, and normal person usage (not crazy, development-obsessed people like me), the battery should do well. ON THAT NOTE, IMPORTANT: Reset your fuel-guage (also made a button for it in Synapse) if you find your battery/system getting laggy or weird anywhere below 50%. I still have some power-driver updating to do and the fuelguage gets wonky.

- Nothing else off the top of my head, but I'm sure I'll be editing this page tons when something pops in my head.

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. I may have missed someone here. Iff so, please remind me. :)

Thankyou:

friedrich420
Slim80
Tkkg1994
flar2
osm0sis
alesaiko
HybridMax
Kushan
Alucard
Ausdim
Ktoonsez
javelindart
Andreilux
theHacker911
UpInTheAir
Pafcholini
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
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 marked "machinex-MarkOne-REL-sep5.zip" is the kernel. Just make sure to install busybox on rails from the PlayStore before flashing the zip in TWRP (only method I tested) and you're all set. The second zip is crucial for uninstalling, aptly named "machinex-uninstaller.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), and I recommend that you flash Slim80's kernel cleaning script as well.
TLDR: install busybox on rails, flash zip. use uninstaller zip to uninstall.

DOWNLOADS:

UNINSTALLER: http://ift.tt/2clZV5g
md5:cfa41b874e9c7057497baf2739343bb4

INSTALLER: http://ift.tt/2cdA4iD
md5:c52dbb4d61303f75751dec31e7efcafc

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!






from xda-developers http://ift.tt/2cm1905
via IFTTT

No comments:

Post a Comment