Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,988 Members 45,199 Now Online
XDA Developers Android and Mobile Development Forum

[SCRIPT] Random Boot Animations

Tip us?
 
djmcnz
Old
(Last edited by djmcnz; 8th July 2014 at 02:11 AM.)
#1  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1504
Posts: 5,484
Join Date: Oct 2009
Location: Amsterdam, NL
Wink [SCRIPT] Random Boot Animations

Introduction
Here's a repackage and repost of my modified Random Boot Animation script. This was originally conceived by Nighthound many moons ago and was long abandoned. I picked it up and modified it for my Kang-o-rama ROM and the Optimus 2x.

And here it is for you Galaxy Nexus pleasure!
What it Does
There are various apps out there that can achieve the same result but this is a simple script that uses a random number generator to swap in a random boot animation each time you boot. The script runs one just before the animation and never again until you boot the next time.

You can have any number of animations that will randomise and you can also set a flag to have just one run without needing to delete the others.
How it Works
The script executes on startup, generates a random number, assigns this number to a boot animation stored in /data/local/bootanimations/, copies that animation to /data/local/bootanimation.zip and let's Android take over from there. Android will automatically prefer /data/local/bootanimation.zip to the one stored by your ROM in /system/media/.

You just put any valid boot animation in /data/local/bootanimations/ - calling it what you wish - and the script will do the rest. You should not try and call all of your boot animations "bootanimation.zip" - you need to give them a unique name.
Installation
Upon installing the script will automatically back up any custom animation you have in /data/local/ to /data/local/bootanimations/CustomAnimBackup.zip and this animation will be among those randomly selected.
  1. Download one of the files below
  2. Flash from recovery
  3. Reboot and enjoy
  4. Hit 'Thanks' below
System Requirements
This script will run on any custom Galaxy Nexus ROM with init.d support (which is most).
Notice
Some boot animations are distributed within another zip archive. You need to extract the bootanimation.zip file from that archive and rename it before you put it in the bootanimations directory.
Downloads

Update 08 July 2014

The script, in install.zip format has been attached to this post.
Single Animation Flag
If you want to view a single animation only you can do so without moving or changing any of the other files.

Simply Create a file called "bootanimation.use" in /data/local/bootanimations/. In this file place a single line with the filename of the boot animation you want to use. For example:

Code:
CustomAnimBackup.zip
When you want to revert to random animations again delete "bootanimation.use" from the directory.
Attached Files
File Type: zip RandomBootAnimationsScriptOnly.zip - [Click for QR Code] (156.0 KB, 28 views)
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
The Following 32 Users Say Thank You to djmcnz For This Useful Post: [ Click to Expand ]
 
plisk3n
Old
#2  
Senior Member
Thanks Meter 47
Posts: 159
Join Date: Apr 2010
Location: Outer Heaven
Oh this is very cool! Will test it out shortly. Thanks.
 
androg421
Old
#3  
androg421's Avatar
Member
Thanks Meter 11
Posts: 89
Join Date: Aug 2011
Location: Albuquerque
I rather enjoy bootanimations. Thank you for this lovely script!
 
zombieflanders
Old
#4  
zombieflanders's Avatar
Senior Member
Thanks Meter 60
Posts: 252
Join Date: Mar 2011
Quote:
This script will run on any custom Galaxy Nexus ROM with init.d support (which is most).
Does this mean it doesn't work on rooted stock?
 
djmcnz
Old
#5  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1504
Posts: 5,484
Join Date: Oct 2009
Location: Amsterdam, NL
Quote:
Originally Posted by zombieflanders View Post
Does this mean it doesn't work on rooted stock?
Correct. You need a custom kernel at minimum and a /system/etc/init.d/ directory.
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
 
dhruvraj
Old
#6  
Senior Member
Thanks Meter 19
Posts: 153
Join Date: Dec 2011
Location: london
Quote:
Originally Posted by djmcnz View Post
Correct. You need a custom kernel at minimum and a /system/etc/init.d/ directory.
I'm on bigxie build 8 and Franco kernel - and this didn't work for me

I flashed the zip with animations and nothing seem to have happened
 
djmcnz
Old
#7  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1504
Posts: 5,484
Join Date: Oct 2009
Location: Amsterdam, NL
Quote:
Originally Posted by dhruvraj View Post
I'm on bigxie build 8 and Franco kernel - and this didn't work for me

I flashed the zip with animations and nothing seem to have happened
That's odd. It does log what's happening at boot, know how to get a logcat?
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
 
dhruvraj
Old
#8  
Senior Member
Thanks Meter 19
Posts: 153
Join Date: Dec 2011
Location: london
Quote:
Originally Posted by djmcnz View Post
That's odd. It does log what's happening at boot, know how to get a logcat?
Don't but would love to know. Some app? Script? Or cmd on terminal emulator?

Sent from my Galaxy Nexus using XDA App
 
djmcnz
Old
#9  
djmcnz's Avatar
Recognized Developer - OP
Thanks Meter 1504
Posts: 5,484
Join Date: Oct 2009
Location: Amsterdam, NL
Quote:
Originally Posted by dhruvraj View Post
Don't but would love to know. Some app? Script? Or cmd on terminal emulator?

Sent from my Galaxy Nexus using XDA App
Via adb, it's quite easy:

adb logcat > log.txt

Will save the log to log.txt

Turn phone off, plug in, type command, start phone, wait till boot completes, ctrl+c to stop logging. Attach file here.

Remember to boot a few time first, just to make sure you're not getting random animations.
[Nexus One], [Optimus 2x > /dev/null], [Galaxy Nexus], [Transformer Prime], [Nexus 5]
 
dhruvraj
Old
(Last edited by dhruvraj; 15th January 2012 at 10:36 PM.)
#10  
Senior Member
Thanks Meter 19
Posts: 153
Join Date: Dec 2011
Location: london
Thanks a lot mate!

Its attached

Also attached, are the screenshots (available at http://forum.xda-developers.com/show....php?t=1446531) that I am having a seperate problem with, not sure if you would know but just checking with you.

My screen is all screwed up when it boots, if I stop the launcher and restart it seems to be okay though. Any pointers to what it could be because (if it is glaringly visible in the log file) ?
Attached Files
File Type: zip log.zip - [Click for QR Code] (45.0 KB, 16 views)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes