Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
freeza
Old
(Last edited by freeza; 24th July 2012 at 08:22 PM.)
#1  
freeza's Avatar
Recognized Developer - OP
Thanks Meter 6879
Posts: 3,797
Join Date: May 2006
Location: Pasadena, CA

 
DONATE TO ME
Default [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
Attached Files
File Type: zip LG2KernelWithBootanimationSupport.zip - [Click for QR Code] (5.15 MB, 127 views)
.:Team Synergy:.
Current Phone: Sprint Galaxy S III
ROMs: Galaxy S fre3 2.53 | Stock Jelly Bean L710VPBMD4
Sites: freeza inc. | free HQ Mobile Wallpapers&Ringtones
Facebook: Add me | Google Talk: @gmail.com
The Following 16 Users Say Thank You to freeza For This Useful Post: [ Click to Expand ]
 
clark44
Old
#2  
clark44's Avatar
Senior Member
Thanks Meter 5864
Posts: 2,513
Join Date: Mar 2011
Location: Virginia

 
DONATE TO ME
Nice job Mr.Freeze. A lot of noobs are going to appreciate this haha.
Device list:
HTC Diamond> Samsung Seek> HTC Hero> Samsung Moment> HTC EVO> Samsung Epic> HTC EVO> HTC EVO3D> EVO 4G LTE> Samsung Galaxy S3

Just your average Android Dev.





Phone: Samsung Galaxy S3 16GB White
Recovery: TWRP!
ROM: FreeGS3 v3.0.0 JB
Modem: LJ7

IRC Channel: #TeamSonic Freenode
FreeGS3 For Sprint By Team Sonic
Lean Stock SGS3 Sprint
Bekinged EVO 4G
Absurd Rom
How-To Root S-OFF Evo 3D
ICS SDK Port For HTC EVO3D
The Following 3 Users Say Thank You to clark44 For This Useful Post: [ Click to Expand ]
 
jptesar
Old
#3  
jptesar's Avatar
Senior Member
Thanks Meter 27
Posts: 158
Join Date: Sep 2010
Location: Houston, TX
Quote:
Originally Posted by clark44 View Post
Nice job Mr.Freeze. A lot of noobs are going to appreciate this haha.
I'm not ashamed to raise my hand, thanks Freeza.
The Following 2 Users Say Thank You to jptesar For This Useful Post: [ Click to Expand ]
 
Tsudeily
Old
#4  
Tsudeily's Avatar
Senior Member
Thanks Meter 78
Posts: 334
Join Date: May 2009
Location: New London, CT

 
DONATE TO ME
I'm going to sound like a broken record, but I am okay with that. You never disappoint. Thanks.
"Home is where the heart is." -- Right now that is at xda-developers!
The Following User Says Thank You to Tsudeily For This Useful Post: [ Click to Expand ]
 
RPerry435
Old
#5  
Senior Member
Thanks Meter 23
Posts: 233
Join Date: Nov 2008
Thank you sir

Sent from my SPH-L710 using xda app-developers app
The Following User Says Thank You to RPerry435 For This Useful Post: [ Click to Expand ]
 
CNDow
Old
#6  
CNDow's Avatar
Senior Member
Thanks Meter 26
Posts: 145
Join Date: Feb 2011
Location: California
I flashed the zip & now it is stuck on the android animation. The screen will crt off & when i press the power button the screen comes back on but its still stuck.
I''l wipe the caches & see if that fixes it
 
freeza
Old
#7  
freeza's Avatar
Recognized Developer - OP
Thanks Meter 6879
Posts: 3,797
Join Date: May 2006
Location: Pasadena, CA

 
DONATE TO ME
Quote:
Originally Posted by CNDow View Post
I flashed the zip & now it is stuck on the android animation. The screen will crt off & when i press the power button the screen comes back on but its still stuck.
I''l wipe the caches & see if that fixes it

Your bootanimation.zip probably wasn't made properly. You will need to delete it from ADB. Once Android is booted you will have to modify your bootanimation.zip's desc.txt file
.:Team Synergy:.
Current Phone: Sprint Galaxy S III
ROMs: Galaxy S fre3 2.53 | Stock Jelly Bean L710VPBMD4
Sites: freeza inc. | free HQ Mobile Wallpapers&Ringtones
Facebook: Add me | Google Talk: @gmail.com
 
CNDow
Old
#8  
CNDow's Avatar
Senior Member
Thanks Meter 26
Posts: 145
Join Date: Feb 2011
Location: California
Quote:
Originally Posted by freeza View Post
Your bootanimation.zip probably wasn't made properly. You will need to delete it from ADB. Once Android is booted you will have to modify your bootanimation.zip's desc.txt file
I just flashed the above zip
 
freeza
Old
#9  
freeza's Avatar
Recognized Developer - OP
Thanks Meter 6879
Posts: 3,797
Join Date: May 2006
Location: Pasadena, CA

 
DONATE TO ME
Quote:
Originally Posted by CNDow View Post
I just flashed the above zip
What I mean is.......well first, what animation are you seeing upon boot?
.:Team Synergy:.
Current Phone: Sprint Galaxy S III
ROMs: Galaxy S fre3 2.53 | Stock Jelly Bean L710VPBMD4
Sites: freeza inc. | free HQ Mobile Wallpapers&Ringtones
Facebook: Add me | Google Talk: @gmail.com
 
CNDow
Old
#10  
CNDow's Avatar
Senior Member
Thanks Meter 26
Posts: 145
Join Date: Feb 2011
Location: California
Quote:
Originally Posted by freeza View Post
What I mean is.......well first, what animation are you seeing upon boot?
the small case android with the backward "a"

I've reflashed Phantom 1.6 & all is good now

The Following User Says Thank You to CNDow For This Useful Post: [ Click to Expand ]
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...