[HTC EVO 3D] freeza:
Hi everyone! We're back at it again with another DIY guide and this time it's everyone's favorite: Dual Cores.

This guide will assume you don't use any other software that will affect this, such as but not limited to: SetCPU, Virtuous OC.

I'm not sure how Virtuous OC works, as I've never used it, but I included in there just in case. SetCPU has been tested by me to render this useless, as it resets the permissions on the second core.

There are a number of ways to go about doing this:

ramdisk

init.d

init.post_boot.sh

But, the easiest fastest way to get this accomplished is to either upload and post your init.post_boot.sh file, which is located in /system/etc/, OR edit it manually yourself.

There are other ways but this file already exists, and has most of what you need in it and it gets executed at boot anyway.

Take note of the permissions set for this file, because they will need to be set back if you choose to edit outside of Android. You can also edit the file with Android's file editor if you use Root Explorer.

If you choose to edit it yourself and outside of Android, you will need to open the file with Notepad++ (Or whatever qualified editor you use) and add this in anywhere before the line "chown system /sys/devices/system/cpu/cpu0/online"

echo "1" > /sys/devices/system/cpu/cpu1/online

chmod 0444 /sys/devices/system/cpu/cpu1/online

echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

chmod 0644 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

What this does is set the second core's online state to 1 (enabled) and the second line sets this value as read-only, so that the system can't disable its online state when it feels the second core is no longer needed. The third line sets the governor, and I assume you can use any governor that's available in the kernel. However, I'm not sure if both cores can have separate governors. Changing one may change the other. I haven't tested this myself, but sampling frequency and up-threshold works like this, so I assume governors may as well. The last line, if it has anything in common with the third, sets the governor so that you may infact change it with CPU Tuner (since it has the ability to control the second core as well as the first). This line may be obsolete and was only added in as a fail safe.

While you're in there, you can tune your cores even more (assuming you don't use anything like virtuous OC, CPU Tuner, ETC) and set the min and max values by adding this (there should already be something like this for the first core so you can go ahead and add this below that):

echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

echo 192000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

echo 594000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

As a way to conserve battery life, I set the second core to run at half its max (stock kernel), This works fantastically for CPU Master, which only controls the first core, as you can have all your profiles set, without messing with the second core. (I've found that you can run the first core at 192MHz with the screen off/low battery while still maintaining minimal lag by setting the second core's max to 594MHz!)

Once you've edited the file, you can go ahead and push it back to your device (assuming you've edited it outside of android) and set the permissions back to what they were and reboot.

As always, if any of this is overwhelming, I'll be happy to edit the file for you.

The other methods mentioned above work in pretty much the same fashion (adding those lines in), and if you prefer to use one of those methods, then that's fine as well.

To check whether or not your edits were successful, you can navigate with root explorer to /sys/devices/system/cpu1 and look for "online" which should have permissions of r--r--r-- You can view the file and see if "1" is in there, indicating that the second core is active. You can also use SystemPanel to check your CPU activity, which should show both cores active. As a legend, a grey pie chart means the second core isn't active, but they should both be green and actively being used.

Good luck!