Don't use rm, use mv instead (rename). If you have several boot animation, just name it as bootanimation1.zip, 2, 3, etc. And use mv to rename the one you want to use. This is safer than deleting the file.
Your /system usually mounted as ro (read-only). You can check using
Code: Select all
mount | grep /system
mount | grep "/system type"
So before renaming, remount the system as rw first
Code: Select all
mount -o remount,rw /system
mv /system/media/bootanimation.zip /system/media/bootanimation.ori.zip
mv /system/media/bootanimation1.zip /system/media/bootanimation.zip
To revert back to original boot animation
Code: Select all
mount -o remount,rw /system
mv /system/media/bootanimation.zip /system/media/bootanimation1.zip
mv /system/media/bootanimation.ori.zip /system/media/bootanimation.zip
remount maybe only needed once per every reboot, depends on your ROM
RAMdrive
In my experience and many others in other forum, the most common android hardware problem after several years is battery (of course). The second most devastating problem is eMMC, especially with those mid-class phone. 2 of my phones broken because of eMMC. Flagship usually have better eMMC (or now typically MCP/uMCP, MCP = eMMC + LPDDR, uMCP = UFS + LPDDR). Even then, it still have MTBF. My friend's Galaxy note 3 last for 5 years. Actually after 3,5 years, I have been warning her, and she still hold it. And then one day it just fail and can't save any of the data inside. Nandflash eventually degraded until it is broken down. And the problem is it take down our data with it. So I better do whatever I can to minimize the write cycle and move intensive writing to the RAM. Most users don't need it, but I use it everyday, so it benefits me.
I will call it ramdrive to avoid ambiguity, as we also have ramdisk inside kernel/boot.img. When I googling it for a long time, can't find any precise way to create it. The app from playstore also fake. After multiple try and errors, all point to tmpfs. So I use mount to find all existing tmpfs.
I got it a /storage and /mnt. After trying, I found /mnt/user/0/primary is the link to the internal virtual storage. So I can create at /mnt/user/0/ramdrive (or can be other name), and then chmod it to 777. I then create folder inside for multiple usages. MiXplorer can access this folder too as regular folder (of course root required)
To confirm that the ramdrive is real, free RAM must decreased and the files stored at there should disappear after restart. Check using
I got
tmpfs 1895020 187820 1707200 10% /mnt
/dev/block/mmcblk0p53 28144 732 26760 3% /mnt/vendor/persist
By default, tmpfs size is dynamically adjusted to the usage, up to maximum half of the usable RAM. At my phone, RAM 4GB, max is 2GB. As the tmpfs show, I use 187820 KB (around 188 MB, 10% of the max). I can restart the phone, and the files disappear, the usage back to 0%.
I don't know if all ROM has the same tmpfs on the /mnt. But if other device has the same, you can create the ramdrive using simple mkdir command and chmod it.
Code: Select all
mkdir /mnt/user/0/ramdrive
chmod 777 /mnt/user/0/ramdrive
You can create more folder inside. Just remember that every restart, everything in this folder is nuked. That's why it is for temporary file only. Of course we can create a flow to copy the content first to internal storage, but that kinda defeat the purpose of the temporary files.