[MOD/KernelLG2] Enable bootanimations without the negative side effects
So, you guys may have read and/or applied the fix I posted a few days ago regarding dual cores. Allow me to go into further detail before posting what I believe is a good compromise and hopefully keeps the same battery life improvements.
Well, we all know that Sprint's GS3 (Not sure about other US variants) uses weird boot and shutdown animations. It actually uses the same boot animations as the 2 year old EVO 4G. How outdated! At any rate, in order to achieve these boot and shutdown animations, they use Samsung's qmg format, which requires the files "samsungani" and "samsungpowersoundplay" in /system/bin/ The problem is, samsungani only supports qmg formats so our custom boot animations weren't working. Now, it was posted somewhere that in order to have them work, we needed to rename samsungani to something else, and then rename bootanimation to samsungani. While this sounded like a great plan, it unknowingly produced a bad side effect. I have no idea WHY, but if the samsungani OR samsungpowersoundplay files aren't present or are tampered with (by renaming etc) this causes the dual core functions on the phone to act wonky. Why? Beats me. But they will default to the "performance" governor without you ever knowing and mpdecision would no longer control the second core the way it's supposed to. The second core would either remain on or off depending on how your phone was setup. Unless you were to use a cpu scaling app.to see this, you'd never know what was happening and as a result, battery life took a complete hit.
I have came up with a solution

It involves editing the kernel ramdisk to load both bootanimation and samsungani/powersoundplay files. However, I have stripped the samsung files of their ability to control boot sounds and bootanimations, while allowing the original bootanimation file to load bootanimation.zips. This means we can use our custom bootanimation zip files without having terrible battery life with cores that default to performance governors.
It requires a simple edit, but I will also include a flashable kernel with support for it.
Once you extract the kernel ramdisk, open the init.rc file with your editor of choice and navigate to:
Code:
service powersnd /system/bin/samsungpowersoundplay
class main
user media
group system
oneshot
service samsungani /system/bin/samsungani
class main
user graphics
group graphics system
disabled
oneshot
Remove the user and group portions from both and add "disabled" to the samsungpowersoundplay line. They should look like this when done:
Code:
service powersnd /system/bin/samsungpowersoundplay
class main
disabled
oneshot
service samsungani /system/bin/samsungani
class main
disabled
oneshot
Now for the last part, add support for bootanimations by adding this section above the samsungpowersoundplay line "service powersnd /system/bin/samsungpowersoundplay"
Code:
service bootanim /system/bin/bootanimation
class main
user graphics
group graphics
oneshot
When complete, it should look like this:
Code:
service bootanim /system/bin/bootanimation
class main
user graphics
group graphics
oneshot
service powersnd /system/bin/samsungpowersoundplay
class main
disabled
oneshot
service samsungani /system/bin/samsungani
class main
disabled
oneshot
Go ahead and save changes and make your boot.img. You're done!
I've uploade my boot.img with the changes. It also has support for init.d as well as adb shell root and "boot speed plus" which changes the governors to "performance" as the system is booting but will obey anything set in init.qcom.post_boot.sh (which more than likely will be OnDemand, since that's default). So basically, it'll get set back to whatever the default governor in that file is