1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

Trouble understanding the "coding" in bootanimation.zip

Discussion in 'Droid Labs' started by Tepee, Sep 9, 2010.

  1. Tepee
    Offline

    Tepee New Member

    Joined:
    Apr 3, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    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.
  2. MotoCache1
    Offline

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    0
    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
  3. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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?
  4. Tepee
    Offline

    Tepee New Member

    Joined:
    Apr 3, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Virginia

    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"
  5. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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?
  6. Tepee
    Offline

    Tepee New Member

    Joined:
    Apr 3, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Virginia
    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: Sep 13, 2010
  7. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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?
  8. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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.
  9. Tepee
    Offline

    Tepee New Member

    Joined:
    Apr 3, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Virginia
    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: Sep 14, 2010
  10. Tepee
    Offline

    Tepee New Member

    Joined:
    Apr 3, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Virginia
    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:
  11. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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:
  12. CyberSurvivor
    Offline

    CyberSurvivor New Member

    Joined:
    Oct 28, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    so we push bootanimation.zip on to the device uncompressed? Any ideas on how to do that on a mac?
  13. djakrse
    Online

    djakrse Active Member

    Joined:
    Jun 9, 2010
    Messages:
    1,122
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    TX
    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
Search tags for this page

having problem putting bootanimation on s3

,

mb810 coding

,

p1000 bootanimasyon sound zip

,

what is desc.txt on bootanimation.zip file