Remove/rename bootanimation (during post-fs stage)?

Search This thread

OldMid

Senior Member
Feb 5, 2018
560
786
I'm currently working on a way to inject multiple different bootanimations on Samsung phones (because they support both .qmg and .mp4 for some reason). Now to use the video as a bootanimation I need to first get rid of the original bootanimation in /system/media/bootsamsung.qmg by either deleting it or renaming it. This needs to happen at the post-fs stage if I understood the documentation correctly.

Is there a way to do that or is this not possible using Magisk?
How Magisk works is that there is no need to remove or rename any files. If you would like to replace the current files, add the files to the replace section of the config.sh file. My module, MidnightCore, supports Samsung's .qmg format, what i do is simply replace the existing file by placing the bootanimation in /system/media. Magisk takes care of the rest. Basically don't remove or rename anything:good:

The thing about bootanimations though is that they need to be loaded much earlier in the boot process. This is done with a post-fs-data script. you can take a look at the one in my module to see what I did. Credits got to @osm0sis though, i got it from there.

Sent from my OnePlus5T using XDA Labs
 
  • Like
Reactions: osm0sis and 0xE2

Jaymin.0.1910

Senior Member
Sep 20, 2017
554
489
Himmatnagar
I'm currently working on a way to inject multiple different bootanimations on Samsung phones (because they support both .qmg and .mp4 for some reason). Now to use the video as a bootanimation I need to first get rid of the original bootanimation in /system/media/bootsamsung.qmg by either deleting it or renaming it. This needs to happen at the post-fs stage if I understood the documentation correctly.

Is there a way to do that or is this not possible using Magisk?

You can bind mount over the existing one by placing your animation at /cache/magisk_mount/system/media/bootsamsung.qmg. But since it is post-fs mode, you can not delete or rename it, That can only be done at post-fs-data mode.
 
  • Like
Reactions: 0xE2

OldMid

Senior Member
Feb 5, 2018
560
786
You can bind mount over the existing one by placing your animation at /cache/magisk_mount/system/media/bootsamsung.qmg. But since it is post-fs mode, you can not delete or rename it, That can only be done at post-fs-data mode.
This is what i was referring to @0xE2:good:

Sent from my OnePlus5T using XDA Labs
 
  • Like
Reactions: 0xE2

osm0sis

Senior Recognized Developer / Recognized Contribut
  • Mar 14, 2012
    14,586
    32,842
    Halifax
    GT-i9250
    Nexus 7 (2013)
    @OldMid, just to make you aware, there's a plan right now to move the /cache/magisk_mount stuff to /data/adb and have it run at post-fs-data instead of post-fs (which should still be early enough; that's when the bind runs with SuperSU). It hasn't been implemented yet, but probably in the next Magisk beta or so. :good:
     
    Last edited:

    Jaymin.0.1910

    Senior Member
    Sep 20, 2017
    554
    489
    Himmatnagar
    @OldMid, just to make you aware, there's a plan right now to move the /cache/magisk_mount stuff to /data/adb and have it run at post-fs-data instead of post-fs (which should still be early enough; that's when the bind runs with SuperSU). It hasn't been implemented yet, but probably in the next Magisk beta or so. :good:
    Hi @osm0sis,
    I was planning to create a one single module, say a 'Systemless system modifier', which will let users manage /system and /vendor systemlessly via Magisk. Currently only CLI, I'm not yet mastered the GUI and Java, etc. Is there a plan of shipping such an app along with Magisk to allow users use it rather than creating their own modules ?? Would you recommend I go ahead with my plan ??
    MCMotherEffin'
     

    osm0sis

    Senior Recognized Developer / Recognized Contribut
  • Mar 14, 2012
    14,586
    32,842
    Halifax
    GT-i9250
    Nexus 7 (2013)
    Hi @osm0sis,
    I was planning to create a one single module, say a 'Systemless system modifier', which will let users manage /system and /vendor systemlessly via Magisk. Currently only CLI, I'm not yet mastered the GUI and Java, etc. Is there a plan of shipping such an app along with Magisk to allow users use it rather than creating their own modules ?? Would you recommend I go ahead with my plan ??
    MCMotherEffin'

    Well, you can already do that with the /cache/magisk_mount functionality (which will eventually switch to /data/adb as I said). Doesn't need a UI because all you need is a file explorer.
     
    • Like
    Reactions: Jaymin.0.1910

    oreo27

    Senior Member
    Sep 24, 2012
    649
    142
    @OldMid, just to make you aware, there's a plan right now to move the /cache/magisk_mount stuff to /data/adb and have it run at post-fs-data instead of post-fs (which should still be early enough; that's when the bind runs with SuperSU). It hasn't been implemented yet, but probably in the next Magisk beta or so. :good:

    That sounds like a step forward. For instance, on my device, there is no cache partition so I'm unable to change my boot animation systemlessly as I've done previously on other devices. I just wanted to know if there's a workaround for it:

    So I've run into an issue that I can't seem to get past.

    I used to replace my old device's boot animation systemlessly by placing a modified version of it in /cache/magisk_mount/system/media/bootanimation.zip but as mentioned in the readme:

    - https://github.com/topjohnwu/Magisk/blob/master/docs/details.md#simple-mount-details

    And this is exactly the case as my new device is utilizing the A/B partition scheme. However, the readme doesn't state how one can get around this.

    In my personal mod (This is not published anywhere except Github) - https://github.com/0reo27/mia1module

    0. I've tried as described above (by placing a modified version of it in /cache/magisk_mount/system/media/bootanimation.zip)
    1. I've tried replacing the boot animation by simply placing it in the path.
    2. I've also tried adding the file into config.sh like so:

    Code:
    REPLACE="
    /system/media/bootanimation.zip
    "

    However, as far as I understand, this is only for entire directories.

    Perhaps someone can point me in the right direction?
     

    OldMid

    Senior Member
    Feb 5, 2018
    560
    786
    @OldMid, just to make you aware, there's a plan right now to move the /cache/magisk_mount stuff to /data/adb and have it run at post-fs-data instead of post-fs (which should still be early enough; that's when the bind runs with SuperSU). It hasn't been implemented yet, but probably in the next Magisk beta or so. :good:
    Interesting, appreciate the heads up!

    Sent from my OnePlus5T using XDA Labs
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 3
      @OldMid, just to make you aware, there's a plan right now to move the /cache/magisk_mount stuff to /data/adb and have it run at post-fs-data instead of post-fs (which should still be early enough; that's when the bind runs with SuperSU). It hasn't been implemented yet, but probably in the next Magisk beta or so. :good:
      2
      I'm currently working on a way to inject multiple different bootanimations on Samsung phones (because they support both .qmg and .mp4 for some reason). Now to use the video as a bootanimation I need to first get rid of the original bootanimation in /system/media/bootsamsung.qmg by either deleting it or renaming it. This needs to happen at the post-fs stage if I understood the documentation correctly.

      Is there a way to do that or is this not possible using Magisk?
      How Magisk works is that there is no need to remove or rename any files. If you would like to replace the current files, add the files to the replace section of the config.sh file. My module, MidnightCore, supports Samsung's .qmg format, what i do is simply replace the existing file by placing the bootanimation in /system/media. Magisk takes care of the rest. Basically don't remove or rename anything:good:

      The thing about bootanimations though is that they need to be loaded much earlier in the boot process. This is done with a post-fs-data script. you can take a look at the one in my module to see what I did. Credits got to @osm0sis though, i got it from there.

      Sent from my OnePlus5T using XDA Labs
      1
      I'm currently working on a way to inject multiple different bootanimations on Samsung phones (because they support both .qmg and .mp4 for some reason). Now to use the video as a bootanimation I need to first get rid of the original bootanimation in /system/media/bootsamsung.qmg by either deleting it or renaming it. This needs to happen at the post-fs stage if I understood the documentation correctly.

      Is there a way to do that or is this not possible using Magisk?

      You can bind mount over the existing one by placing your animation at /cache/magisk_mount/system/media/bootsamsung.qmg. But since it is post-fs mode, you can not delete or rename it, That can only be done at post-fs-data mode.
      1
      You can bind mount over the existing one by placing your animation at /cache/magisk_mount/system/media/bootsamsung.qmg. But since it is post-fs mode, you can not delete or rename it, That can only be done at post-fs-data mode.
      This is what i was referring to @0xE2:good:

      Sent from my OnePlus5T using XDA Labs
      1
      Hi @osm0sis,
      I was planning to create a one single module, say a 'Systemless system modifier', which will let users manage /system and /vendor systemlessly via Magisk. Currently only CLI, I'm not yet mastered the GUI and Java, etc. Is there a plan of shipping such an app along with Magisk to allow users use it rather than creating their own modules ?? Would you recommend I go ahead with my plan ??
      MCMotherEffin'

      Well, you can already do that with the /cache/magisk_mount functionality (which will eventually switch to /data/adb as I said). Doesn't need a UI because all you need is a file explorer.