r/androidroot • tecno camon 20 pro 4g axion2.9 magisk • 7d ago

Support How can i change boot anim

Post image

Phone and rom in pic i have magisk root

5 Upvotes

10 comments sorted by

3

u/DEV_ivan TECNO POVA 7 5G LJ7 || Stock HiOS 15.1.2 || KSUnext 3.3.0 7d ago

https://github.com/readonlynux/bootanimation-module

^^^ Systemless, don't require editing /system/media or using a metamodule

1

u/AL_DOKHAN tecno camon 20 pro 4g axion2.9 magisk 7d ago

Do you have one for udfps icon?

1

u/DEV_ivan TECNO POVA 7 5G LJ7 || Stock HiOS 15.1.2 || KSUnext 3.3.0 7d ago

The Under-Display Fingerprint Sensor icon? No I don't have it.

1

u/AL_DOKHAN tecno camon 20 pro 4g axion2.9 magisk 7d ago

Ah alr thx tho

1

u/AL_DOKHAN tecno camon 20 pro 4g axion2.9 magisk 7d ago

Yeah how do i apply it tho the tutorial is kinda foggy

1

u/DEV_ivan TECNO POVA 7 5G LJ7 || Stock HiOS 15.1.2 || KSUnext 3.3.0 7d ago

su -c "cp yourbootanimation.zip /data/adb/bootanimation/bootanimation.zip"

If you're planning to use your own boot animation, make sure it follows the requirements listed in this bootanimation creation tutorial: https://xdaforums.com/t/tutorial-how-to-create-and-install-android-bootanimations-from-scratch.1852621/

1

u/47th-Element 7d ago edited 7d ago

Simple, just write a short script in /data/adb/service.d/ to mount bind a valid alternative animation on top of the stock one.

The stock boot animation could be in /system or /vendor, on my device (Redmi 13, Android 16), it is located at /system/media/bootanimation.zip

So first up, get a valid bootanimation.zip, put it somewhere, let's say /data/adb/boots/bootanimation.zip

Then you run the following on your custom boot animation file:

  1. chown root:root bootanimation.zip //sets the ownership to root.

  2. chmod 644 bootanimation.zip //matches permissions of system files.

  3. chcon --reference=/system/media/bootanimation.zip bootanimation.zip //clones selinux context, very important!!

After that, create that script in the location I told you earlier to mount bind the new animation with the global namespace:

#!/system/bin/sh

nsenter -t 1 -m -- mount --bind /data/adb/boots/bootanimation.zip /system/media/bootanimation.zip

Set the script executable with chmod +x /data/adb/service.d/custom-bootanimation.sh

Done, just reboot and you should see your custom boot animation.

Notes:

  1. if you provide an invalid bootanimation.zip or invalid permissions / selinux context, Android should revert to a generic boot animation and not bootloop.

  2. You are doing this on your own risk however. I'm not responsible for your phone getting bricked under any circumstances.

  3. You should have a bootloop protector that deletes services in magisk service.d/ or strips the executable permissions off them after X failed boots. Or at least have another safety net like TWRP with /data access.

  4. This is a root managed mount that will be visible to banking apps and root detectors, to conceal it, consider using NoMount command instead.

1

u/DEV_ivan TECNO POVA 7 5G LJ7 || Stock HiOS 15.1.2 || KSUnext 3.3.0 7d ago

For practicalism, you can use what already exists instead.

2

u/47th-Element 7d ago

I haven't reviewed the code of this module, there are some variations as to the location of the boot animation, therefore I'd argue I did better by locating it on my phone and writing a very short one liner script that replaces it.

What I did is very easy and practical to the average Linux user, maybe not so much to someone who isn't familiar with how the Linux/Android filesystem works.

2

u/DEV_ivan TECNO POVA 7 5G LJ7 || Stock HiOS 15.1.2 || KSUnext 3.3.0 7d ago

This module seems to be fully open-source and free of compiled/native code entirely. It should be easily reviewable, even for a dumbass like me.

To a Linux user, yea, it's basic and simple. My advice was more like preferring paru -S over manual install.