[G3 Android Development] Robshr:
It's now in its final version but I'll still update as I see needed

[Donate here]

* IMPORTANT *

Read ENTIRE OP for compatibility and install instructions as I will not respond to a question that is answered in the op

OP has been updated with the new instructions

OK Here's the New CTTMod for marshmallow ROMs​

Working to improve performance eliminate lag along with lowering the core temps allowing your phone to continue to run smoothly after long or heavy periods of use. Now with faster charging times

Any developers feel free to use the mod in your ROMs just please give proper credit thanks ​

Please Read The Entire OP before installing

I Am Not Responsible For Anything You Do To Your Device.

How to determine if your G3 set up is compatible with this mod and INSTRUCTIONS and DOWNLOADS are in the 2ND post

Everyone I need your feedback with certain details which I list below in the 2nd post to be able to create an accurate list of which devices are compatible and which devices I'm currently working to make a compatible version for..

Remember always make a full nandroid backup before doing anything

I've decided to go into a little more detail in this thread to give people a better understanding of how and what this mod does, mostly by detailing how the thermal controls work and what I changed within in them. I also went into detail about governors because they go hand in hand controlling the CPU's frequency in different ways. which I'll go into more detail below in hopes of helping you understand when and how the CTTMod will improve your performance

______________________________________________

Governors and thermal control​

How & why they effect your phones performance

First here are a quick summaries of what a governor does and what the thermals do then I'll get into more detail below

Note I tried to write and explain everything as simple as possible in the hopes of helping even the newcomers to android to be able to understand and gain little knowledge and insight.

Also I hope this helps everyone also understand why and when this mod starts doing it's thing and why sometimes it might feel like it's not working and other times feel like it's working great.

There are a lot of variables and different criteria that has to be met for each process to be enacted.

The kernels governor manages the CPU's frequency mainly by the amount of load the cpu is under and other preset values.

Thermal control which determines the frequency by the temperature of the CPU and is told by preset values set in thermal files when it (cpu),should lower its frequency depending on temperature

Both play big rolls in how well your phone performs but in opposite ways the governor basically start out by trying to keep your phone running smoothly by increasing the clock speed to match the load on the cpu, whereas thermal control does the opposite where it kicks in after the cpu reaches a preset limit and starts lowering the clock speed in an attempt the cool down the CPU to keep the phone running smoothly

Now the governor bases what the clock speed is set to and determines the point the kernel will increase the CPU's frequency by the load value set in the governor which is preset by the OEM or dev. With a rooted phones most of these values can be changed. The load values based on numbers with 0 being the phone just sitting idle not under any load so the governor will have the cpu frequency set to the preset minimum allowed frequency set by the kernel. And as the work load increases the governor raises the frequency in steps also preset by the governor until the CPU reaches a frequency that handles the increase in work load and continues to raise the clockspeed as the load increases. Now once the CPU's load reaches the preset target load value it will be running at the maximum allowed frequency set in the kernel. Different governors have a different numbers of load and other settings some can be changed and some can't depending on the governor and what features were added by the builder

For example the conservative governor sets it's target load values high usually around 95 and a step value of say 14 (step value being the amount of frequencies it will go thru to reach the maximum set frequency. Which helps improve battery life but you sacrafice performance. As say the interactive governor with the target load value set at 70 (Target load value being the highest amount of work load on the CPU before bumping it up to the maximum allowed CPU frequency set in RJ kernel and a step value of 7 will have better performance that the conservative .

All but one governor (performance) which is set to run at the maximum CPU frequency all the time) has parameters that can be tuned to your liking with one of the many CPU/kernel control apps out. But not all kernels and the governors come with the same settings. The builder/OEM/dev. of the kernel can pick and choose what features and governors to put in the kernel and also what settings are allowed to be changed. Also not all particular governors come with the same allowed settings. One developer might only put in the interactive governor and only put a few settings that can be changed whereas a kernel from another developer will add in every setting there is for the interactive governor.

Here's a great page explaining just about everything you should know about governors it's a must read.

http://xdaforums.com/gene...ors-o-t3048957

OK now thermal control works by throttling the CPU down to preset frequencies at preset temperatures and is also done in a preset # of steps. Thermals also monitor and play parts in controlling other components like the GPU, battery and a couple of other things.

First let me be clear about one thing

The CTTMod does not turn off thermal throttling. Now the trick of going into the hidden menu and turning thermal mitigation and thermal control on. That does turn off all thermal monitoring and control and I highly advise against ever doing it. You take a huge risk of frying your phone.

Now let me explain a little what gets changed by installing this mod, and how and when the thermal control do there thing.

What i did is changed the first 3 bump downs (steps). I did this raising the preset frequency in the phones thermal file that tells the CPU to slow it's clockspeed down when the cpu reaches a preset temperture. Now in reality the thermal just sits and monitors the temperature of different components. It doesn't affect the CPU at all until it reaches a preset temperature.

Now there are 6 steps 5 of which throttle your cpu down. The first one being you CPUs max frequency and as long as the cpus actual temperature is below the one predefined in the file the CPU is allowed to scale as high as it needs to in order to complete the task in an efficient and speedy manner. So until it reaches that temperature it's the kernels governor that is deciding what the CPUs frequency needs to be by the load that the CPU is under at any given time. Now each different governor has its own way of how and at what load points it'll tell the cpu it can scale up or down by the values set in parameter settings of the governor and also tells the CPU how many steps ( scaling frequencies) to go thru and how long to stay at each step before moving on. So in short but not the entire story is that the governor controls when to speed up the cpu by the load it's under and the thermal controls tell the cpu when to step down to certain frequencies that corresponds with temperature points that are set in the thermal file in an effort to keep the temperature of the CPU down to try and keep the phone running smoothly and within an efficient operating temperature

Now what I have done is raised the first 3 points at which the thermal tells the cpu to be at. But left the last two and the shut off values at their stock values so it doesn't let the phone get hot enough to burn up. That's why you might notice with this mod after a long period of time using your phone under heavy load and the cpu reaches that forth step down temp. that when you'll notice a dramatic slow down. The thermals also control a what i would consider a fail safe temp setting that will automatically shut your phone down. Which is set at 120°c and won't let you turn your phone back on until the temp lowers to 115°c which I also left at the factory settings.

Now hopefully after reading this you have an understanding of what the mod does and how it affects the performance of your phone. And how the settings in whichever governor you are using also affects the performance of the phone. So if your governor is not tuned to your usage. You will not see a difference after flashing the CTTMod.

Now I'll explain what changes I made to the first bump down to. I changed the first frequency bump down to 2.26 and raised the tempurture it has to reach to 70°c Stock was set to drop the cpu down to 1.5 GHz at 60°c

Now at stock they scale your clockspeed by almost half of the processors actual top speed of 2.45 ghz which is why the g3 has such bad lag when after a short time of moderate to heavy use. So as a result of increasing the first set frequency to 2.26 GHz and raising the temperature limit will allow you turn operate you phone for a much longer period of time before you start to notice the phone slowing down .

Also in the LP versions I was able to tweak some of the battery values to keep the phones temperature down which I had discovered by accident and for most people they say there battery now stays cooler compared to stock. And tweaked the GPU. The second version that is now up implements the cpu throttling and battery improvements and I hope to hand the GPU tweaked and working in the next version.

I Hope this has helped you have a little more insight on what this mod does and how you devices improvement might not be noticeable compared to someone else who show a great improvement in performance. It all depends things we do to our phones to customize them .ie different ROMs kernels, settings and mods we add to them.

Let me know how the mod works for you and what carrier version and ROM and kernel you are on and governor being used

Thanks Rob

Also with the vs985 MM firmware the thermal file in system/etc is thermal-engine-8974.conf

So check to see what thermal file/s you have. If they're different send me a link to your thermal files and I'll take a look and see what I can do modifying them