14

I'm trying to compile AOSP with a custom bootanimation, but with no success. And I just have run out of approaches... To change bootanimation, I've already done:

  1. created a .zip file with the following structure: bootanimation.zip { desc.txt part0 { 000.png, 001.png, ... ..., 010.png } part1 { 011.png, 012.png, ... ..., 021.png } }

  2. edited permissions on system/core/include/private/android_filesystem_config.h

  3. placed the bootanimation.zip file in /system/media/

However, when Android boots up, it just shows the Google trademark, skipping the boot animation. Can someone point what I'm missing?

PS: I'm successfully compiling AOSP. It boots up with all features ok. My problem is only with bootanimation customization on the compiled project.

Marcelo
  • 2,075
  • 5
  • 21
  • 38
  • 1
    can you explain the complete solution so that others can use it too? – 4aRk Kn1gh7 Mar 27 '15 at 12:23
  • Can you add the change you made in android_filesystem_config.h or link to where you found the instructions for editing the permissions for a bootanimation.zip? – Patrick May 08 '15 at 01:03
  • 3
    Patrick, to use the custom bootanimation you should edit your device configuration makefile. In my case (LGE, Nexus 5 - Hammerhead), it was localized in /device/lge/hammerhead/full_hammerhead.mk. In this file, I've put the instruction "PRODUCT_COPY_FILES += vendor//bootanimation/bootanimation.zip:system/media/bootanimation.zip", and then in the referenced vendor file, I've placed the bootanimation.zip file. With this, after AOSP compilation, the ROOM file was generate with my custom bootanimation. – Marcelo May 08 '15 at 06:11
  • 4aRk Kn1gh7, what you mean by "complete solution"? To create a custom bootanimation, you need to place a file named "bootanimation.zip" with the system directory /system/media. – Marcelo May 08 '15 at 06:22
  • 2
    mthama, i have tried to define it as you say, but in compile time it throwing error "bootanimation.zip has unknown owner. Stop." I presume here I have to define permissions for the new bootanimation.zip file. The question is where and how? – AlexS Jun 09 '15 at 13:48
  • Woland, in my project structure the complete path of my bootanimation file is /vendor//bootanimation/bootanimation.zip. Have you tried to run "ls -l" command to check ownership? When I run ls command I get: "-rw-r----- 1 mthama mthama 2620642 Jan 16 15:26 bootanimation.zip". As we can see, the file owner is me (the third field is file owner). How it appears to you? Maybe if you run "chown" you can fit something – Marcelo Jun 09 '15 at 23:15
  • And maybe, you should run "make clobber" and "make clean" to clear cached files that were compiled in previous attempt. – Marcelo Jun 12 '15 at 18:54
  • Can you add the change you made in android_filesystem_config.h or link to where you found the instructions for editing the permissions for a bootanimation.zip? – Abdullah Oct 14 '16 at 06:16

2 Answers2

7

@mthama writes:

Ok. I've solved my problem. The issue was that besides all the things I've done, the bootanimation.zip file MUST be compressed with store method.

The solution is to not use any compression when packing the archive. This can be achieved on Linux with the following command:

zip -0r bootanimation.zip desc.txt part0 part1

The -0 option says to not use any compression and the -r option says to include contents of part0 and part1 recursively.

There are also ways doing this with a graphical interface, e.g. with 7-Zip as shown in this answer: https://superuser.com/a/337087/295453

Community
  • 1
  • 1
justfortherec
  • 1,590
  • 1
  • 13
  • 17
6

Ok. I've solved my problem. The issue was that besides all the things I've done, the bootanimation.zip file MUST be compressed with store method.

Marcelo
  • 2,075
  • 5
  • 21
  • 38
  • I am about to do the same changes ? Could you create an tutorial or update this thread. You marked your answer but with minimum details, what do you mean "Store method". This would be a great help for me and other dev. – mask Sep 10 '15 at 21:15
  • Hi mask, The store method is a compression method type that you can specify as option when using zip. Sorry for writing this very resumed answer. I've answered like this as the fact of using store method was the point to resolve my problem. Clearly we can see that the best approach is to write a good tutorial about this topic as AOSP is a huge and complex project. For now, I'd like to ask for apologize as I'm out of time to write some good one. If you're taking bad times to implement your own bootsplash, please email me at mthama@nic.br. I'll be very happy to help. – Marcelo Sep 16 '15 at 21:30
  • @mthama - could you explain how you created the boot animation zip file, and what you put in it ? – Rahul Iyer Nov 10 '15 at 04:07
  • @Marcelo It would be useful if you'd include the part about modifying the build file to account for bootanimation.zip file in your answer. – Dean Dec 25 '22 at 14:56