Trouble understanding the "coding" in bootanimation.zip

Tepee

New Member
Joined
Apr 3, 2010
Messages
13
Reaction score
0
Location
Virginia
I've been looking at the files in bootanimation.zip.

The desc.txt file contains the lines:

480 720 15
p 0 0 part0

and there is a subfolder, part0, that contains the five png files (00.png to 04.png).

The 480 and 720 are obviously the dimensions of the png and 'part0' is the name of the folder, but what are the other parameters?

btw, the stock animation's desc.txt file contains:

480 427 30
p 1 0 part0
p 0 10 part1

There are two subfolders, part0 and part1. part0 contains 76 files (480_427_00000.png through 480_427_00075.png) and part1 contains 480_427_00076.png through 480_427_00091.png.

I'd like to try to make some kind of animation with my bike, but I can't decipher the meaning of the ones and zeros:). I'm guessing that they're number of iterations or timing. Any help would be appreciated. Thanx.
 
Hi Tepee. You put your post in the Hacking erroneous output of SBF Codec topic and it's not really "on topic" there. I moved it to a new topic. Here is the desc.txt from the R2D2 boot animation for the Droid2. It is well commented and should answer all your questions.

Code:
# 480 wide, 854 high, 15 frames a second
480 854 15

# p means we're defining a part
# first number is repeat count, 0 means infinite
# second number is delay in frames before performing the next part
# so if you are playing 15 frames a second 15 would be... one second
# string defines the directory to load files from
# files will be loaded in order but names don't matter

# s defines a sound for a part
# sounds will be loaded from /data/local
# oggs with loop points will loop automatically
# only one sound will play at a time
# timing is driven by the part, not the sounds
# if you want no sound, declare 'none'

# stars for 30 frames 
p 1 30 part0
s none

# R2D2 rises
p 1 0 part1
s none

# Looping R2D2
p 0 0 part2
s d2_r2d2_pu.ogg

# must have newline after each part
 
I am also trying to install a custom boot animation that my son created for me. When the phone boots up, I don't see anything.

Here is what is in my desc.txt file:

480 848 20
p 1 0 part0
p 0 0 part1

The part0 directory contains files 240_424_0000.png through 240_424_0065.png and the part1 directory contains files 240_424_0066.png through 240_424_0086.png.

Each file is 240 x 424 pixels.

I copied the bootanimation.zip file that I created into /system/media and did a chmod 775. It is owned by root:root.

Any idea what I am doing wrong?
 
I am also trying to install a custom boot animation that my son created for me. When the phone boots up, I don't see anything.

Here is what is in my desc.txt file:

480 848 20
p 1 0 part0
p 0 0 part1

The part0 directory contains files 240_424_0000.png through 240_424_0065.png and the part1 directory contains files 240_424_0066.png through 240_424_0086.png.

Each file is 240 x 424 pixels.

I copied the bootanimation.zip file that I created into /system/media and did a chmod 775. It is owned by root:root.

Any idea what I am doing wrong?


Try changing the first line in the desc.txt file to:

240 424 20

Also, try putting the file into /data/local

Read Post #1 in "Droid 1 custom bootloader logos to replace Motorola logo"
 
Hmmmm, no luck.

I put back the original boot animation and rebooted the phone to make sure that it worked ok.

Then I put my new bootanimation.zip file in /data/local and nothing. I tried with a desc.txt file that said "240 424 20" as the first line and a second one with "480 848 20". They both did the same thing - nothing.

I am wondering if there is something wrong with my zip file. It has part0 then part1 and then desc.txt (the same order as the original one).

Any other thoughts?
 
Hmmmm, no luck.

Then I put my new bootanimation.zip file in /data/local and nothing. I tried with a desc.txt file that said "240 424 20" as the first line and a second one with "480 848 20". They both did the same thing - nothing.

I am wondering if there is something wrong with my zip file. It has part0 then part1 and then desc.txt (the same order as the original one).

Any other thoughts?

What I did was to use MotoCache1's animation.zip (there's a link to it in his post). That will verify your technique. If that works, then it'll be a problem with your file. I'm assuming that the png files are viewable on your PC?


Another thought:

How are you putting the files in /data/local? You need to use the 'adb push' command. If you're trying to move the file around on your Droid itself, you'll need Superuser permission (root). I can see the file using terminal emulator (after su) but not with Astro file manager. I believe there's a file manager that does get superuser perms, but I don't have that.
 
Last edited:
Well, I followed the procedure to push the file to /data/local and was able to see other boot animations, so I am pretty sure that the problem is with either the zip file or the contents.

To ensure that the problem isn't with the zip archive, I will package one of the existing ones that I have that does work and install it.

I don't suppose that there are any log files created when booting that might have error messages?
 
Well, it appears that the problem is with the way I am creating the zip file. I took an existing boot animation that I loaded onto the phone that works. I extracted it on my computer and then created a new bootanimation.zip file from what I extracted. I loaded that new zip file onto my phone and it wouldn't work.

I tried creating zip archive on my PC (Windows XP using WinZip Pro 11.2 ST1) and then on a Solaris 10 machine using /usr/bin/zip. Neither of them worked.

I must really be missing something here.
 
At least you're making progress :unsure:.

Didn't reply to your previous post since I don't know if log files are generated.

I've been working my own animation, but haven't tried creating the zip file or loading it on my Droid yet. I'll try that tonight and see if I run into the same problem. I've got XP on one machine and Vista :cus: on another. I'll let you know what I find out.


Had another thought. Make sure that your zip file doesn't contain the path to the files.
 
Last edited:
Got it to workdancedroid


Was having the same problem (blank screen) and it took three or four tries to get it right. The following are all things I did:

1. Set compression to none - create an archive, not a compressed archive.

2. You do need the path to the subdirectory where the png files are located in the archive, but Winzip puts the complete path from root down. I put the desc.txt file and the png file subfolder in the root directory when making the zip file.

3. The desc.txt file is funky (technical term). When I open it in Wordpad, the entries appear on multiple lines; when I open it in notepad the entries appear on a single line with a space between the frames/sec value and the 'p'. I've verified that it's just a space (0x20) in frhed (hex editor). I used a known good working copy of desc.txt and just changed the values. Don't know why, but it worked. :confused:
 
That did it! The trick is not using compression on the zip file.

By the way, the desc.txt file is in the Unix format which has only a new-line character at the end. The Windows(DOS) format as a new-line and carriage return character at the end of each line.

Thanks for your help. Finally got to see the animation that my son created for me. :icon_ banana:
 
so we push bootanimation.zip on to the device uncompressed? Any ideas on how to do that on a mac?
 
There are some "unofficial p7zip" packages available on 7-zip's download site. The command to archive uncompressed using 7-zip command-line version in Windows would be something like:
7za a -mx0 <path>\bootanimation.zip <path>\filename.png

In linux, etc. I imagine the '\' would become '/' but otherwise should be pretty much the same. Use 7za -h for help.

Well, or read this, using p7zip command line
 
Back
Top