[Treble-Enabled Device Guides, News, & Discussion] AlejandroTercero:
I love GSI roms and all Project Treble related, i swear i test every rom in my phone, Alcatel 1 8.1 Go, i can make an overlay for fix battery drains and other stuff, but.........i found some interesting things, so, i decided to experiment and post here my conclusions, READ CAREFULLY

According to this: source.android.com/devices/tech/power/values, The Android framework uses CPU core numbers when it reads statistics from the sysfs files in: /sys/devices/system/cpu/cpu<number>/cpufreq/stats, ok fine, nothing special, so, i decide to experiment with this and i found a really great thing here, if Android reads the CPU core number values from /sys/devices/system/cpu/cpu<number>/cpufreq/stats, when i edit my power profile overlay i found a number 1 but my device has 4 cores, but the system overrides number 1 with the real core numbers from /sys/devices/system/cpu/cpu<number>/cpufreq/stats, so i put a zero in <array name="cpu.clusters.cores"> inside power_profile.xml and when i think Android is overriding the value, IS NOT! now the system reads the value from power_profile_test.xml and screw everything, so, i put a zero in every array found in <array name="cpu.clusters.cores"> inside power_profile_test.xml AND WORKS! now Android reads the value from /sys/devices/system/cpu/cpu<number>/cpufreq/stats

But, there are more CPU values right? Guess What? put zeros in every CPU value inside power_profile.xml and power_profile_test.xml, this changes forces Android System to read every CPU values from /sys/devices/system/cpu, NOW THE BATTERY DRAIN CAUSED BY WRONG CPU VALUES ARE GONE!!!

The CPU values edited with zeros in power_profile.xml

<array name="cpu.clusters.cores">

<value>0</value>

</array>

<array name="cpu.speeds.cluster0">

<value>0</value>

</array>

<array name="cpu.active.cluster0">

<value>0</value>

</array>

<item name="cpu.idle">0</item>

the CPU values edited with zeros in power_profile_test.xml

<array name="cpu.clusters.cores">

<value>0</value>

<value>0</value>

</array>

<item name="cpu.suspend">0</item>

<item name="cpu.idle">0</item>

<item name="cpu.active">0</item>

<item name="cpu.cluster_power.cluster0">0</item>

<item name="cpu.cluster_power.cluster1">0</item>

<array name="cpu.core_speeds.cluster0">

<value>0</value>

</array>

<array name="cpu.core_speeds.cluster1">

<value>0</value>

</array>

<array name="cpu.core_power.cluster0">

<value>0</value>

</array>

<array name="cpu.core_power.cluster1">

<value>0</value>

</array>

Confirmed Working, so, my conclusions are

-Values in power_profile_test.xml overrides the values found in power_profile.xml if you replace values with zeros

-If we want to let Android decide which values gonna use, you need to put zeros in power_profile_test.xml too

-This confirmed work with CPU values and other values that Android can read and override, i test with <item name="battery.capacity">0</item> putting zeros and works ok, nothing happens

-I experiment with screen, gps, radio, camera, bluetooth, etc values but these values its better to be more specific because sometimes these values are not in vendor partition or kernel, so, there is no values to read from

My Recommendation for Project Treble and every person involved, since its impossible to include all treble-overlays for fix all Android phone models of the world, there is no space in system partition to do that

-Its better to create a Power Profiles Database and bool, integer, arrays and other needed files in Project Treble Experimentations page and use the PHH-TrebleApp for reading values from server and apply values with a reboot or

-Create a PowerProfileConfiguration in PHH-TrebleApp for input Power Profile values manually

Thanks for reading this!!!

Special Thanks to [MENTION=1915408]phhusson[/MENTION] and every GSI Project Treble Developer