[SCRIPT] Random Boot Animations

Search This thread

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
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.​
 

Attachments

  • RandomBootAnimationsScriptOnly.zip
    156 KB · Views: 738
Last edited:

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
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.
 

dhruvraj

Senior Member
Dec 9, 2011
171
28
london
Thanks a lot mate!

Its attached

Also attached, are the screenshots (available at http://xdaforums.com/showthread.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) ?
 

Attachments

  • log.zip
    45 KB · Views: 31
Last edited:

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
Thanks a lot mate!

Its attached

Also attached, are the screenshots (available at http://xdaforums.com/showthread.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) ?

Okay, it doesn't look like your ROM executes init.d scripts... which is required.

Is it this ROM: http://xdaforums.com/showthread.php?t=1372376

If so that one's a little too close to stock... if you want to run a stock ROM that has init.d support I suggest a free MCR (MoDaCo) ROM.

Can't help with the crazy display sorry... :confused:
 

Lizard King

Member
Dec 16, 2011
31
2
Very interested in this, but have a scrub question... so all I do is download then flash through cwm and I 'm all set?

Sent from my LTE GNex
 

raniosman

Senior Member
Jun 11, 2008
55
8
Toronto
I'm ok AOKP Milestone2 with franco kernal #12. works great! genius!

I'm on the same ROM and kernal and having difficulty with the script. Did you just copy the animation file to just /data/local/bootanimations or to /system/media as well?

- I ran the script
- Copied the few bootanimations I downloaded to /data/local/bootanimations
- Rebooted
- Black screen
 

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
I'm on the same ROM and kernal and having difficulty with the script. Did you just copy the animation file to just /data/local/bootanimations or to /system/media as well?

- I ran the script
- Copied the few bootanimations I downloaded to /data/local/bootanimations
- Rebooted
- Black screen

When you say you "ran" the script, do you mean you flashed it in CWM? Hope so.

Other than that your steps are correct... nothing needs to go in /system/

The script logs to logcat... if you can get a boot logcat I can tell you if it's initiating.
 

raniosman

Senior Member
Jun 11, 2008
55
8
Toronto
When you say you "ran" the script, do you mean you flashed it in CWM? Hope so.

Other than that your steps are correct... nothing needs to go in /system/

The script logs to logcat... if you can get a boot logcat I can tell you if it's initiating.
Yea, I meant ran it on CWM. Phone is rooted and has the CWM recovery. Using AOKP Milestone2 custom rom with the franco kernal #12

But all I get is a blank black screen after the 'Google' word until the phone reaches the lock screen. None of the bootanimations are loading.

Trying it with the bootanimations:
ITCrowd, DoctorWho, and TheRoosevelt-Sharp-ICS
 

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
Yea, I meant ran it on CWM. Phone is rooted and has the CWM recovery. Using AOKP Milestone2 custom rom with the franco kernal #12

But all I get is a blank black screen after the 'Google' word until the phone reaches the lock screen. None of the bootanimations are loading.

Trying it with the bootanimations:
ITCrowd, DoctorWho, and TheRoosevelt-Sharp-ICS

Okay, I'll need a log really to see what's happening... perhaps it's permissions on the /data/local/bootanimations directory.

if you can do this:

Code:
adb logcat > boot.log

From phone off all the way to home screen and attach it here I can look at it for you.
 

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
Yea, I meant ran it on CWM. Phone is rooted and has the CWM recovery. Using AOKP Milestone2 custom rom with the franco kernal #12

But all I get is a blank black screen after the 'Google' word until the phone reaches the lock screen. None of the bootanimations are loading.

Trying it with the bootanimations:
ITCrowd, DoctorWho, and TheRoosevelt-Sharp-ICS

See my comment above as well but I have a question... did you create the /data/local/bootanimation directory yourself?

If so, delete it (copy the contents elsewhere temporarily) and reboot the phone. If the directory is re-created the script is firing. Then copy the files back in a reboot... that will fix any problems with the permissions that exist.

If the dir is not re-created automatically I'll need the log.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 32
    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.​
    1
    ok, so... i just got the boot animation off the forum and flashed it instead of moving it on the phone. and it works note. so i don't konw if i corrupted or did something to the files or if the frame rates don't work well... i have the google gears one and it works great at 60 fps. i don't know. most of the animations are way too choppy and slow. i like smooth animations.

    Perhaps you did as someone else above? Sometimes boot animations are distributed within another zip file... you need to take them out of that first.

    In my zip with the sample animations the frame rates are all suitable.
    1
    Hey there, I just got a Galaxy Nexus 2 days ago, and was quite surprised to see this thread! :) I stopped work on the script for the Nexus One because I had problems accessing the sdcard during init.d process, but with the GNexus that problem is solved. It's great that you've got it working here and thanks for the compilation of boot animations. :D
    1
    Hey there, I just got a Galaxy Nexus 2 days ago, and was quite surprised to see this thread! :) I stopped work on the script for the Nexus One because I had problems accessing the sdcard during init.d process, but with the GNexus that problem is solved. It's great that you've got it working here and thanks for the compilation of boot animations. :D

    Dude! :D

    TBH I thought you were long gone... glad to hear you've picked up the best replacement for the Nexus One ever. Although of course no phone will ever be a great as the N1 was...

    I remember that init.d problem and eventually modded the script for Kang-o-rama on the N1 to use the sd-ext partition that was kernel-mounted - fixed the problem (as by that time almost everybody with a N1 was using some form of sd-ext).

    I also "deployed" it for the LG Optimus 2x and G2x so it's had a fair bit of run-time. Full credit to you I've needed to make almost no changes, robust scripting, thanks for that... :)

    Since you really deserve the credit, if you want me to decommission this thread so you can start your own feel free to let me know, I've got no problems with that.

    Cheers,

    Dave
    1
    Dude! :D

    TBH I thought you were long gone... glad to hear you've picked up the best replacement for the Nexus One ever. Although of course no phone will ever be a great as the N1 was...

    I remember that init.d problem and eventually modded the script for Kang-o-rama on the N1 to use the sd-ext partition that was kernel-mounted - fixed the problem (as by that time almost everybody with a N1 was using some form of sd-ext).

    I also "deployed" it for the LG Optimus 2x and G2x so it's had a fair bit of run-time. Full credit to you I've needed to make almost no changes, robust scripting, thanks for that... :)

    Since you really deserve the credit, if you want me to decommission this thread so you can start your own feel free to let me know, I've got no problems with that.

    Cheers,

    Dave


    Nah, I'm too busy with work to follow XDA much (other than just after getting a new phone :p) so it's probably better if you leave this thread open. Keep up the good modding work! :)